Latest CVS fails to compile!

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
rychlik
Space Krill
Posts: 4
Joined: Fri Oct 07, 2005 1:40 pm

Latest CVS fails to compile!

#1 Post by rychlik »

Downloaded latest GiGi (compiled OK) and FreeOrion sources from CVS today (7h of October 05).

make drops with this after several minutes of compiling:

/usr/bin/ld: `.gnu.linkonce.t._ZNK8ValueRef9OperationIdE4EvalEPK14UniverseObjectS4_' referenced in section `.rodata' of universe/server-Effect.o: defined in discarded section `.gnu.linkonce.t._ZNK8ValueRef9OperationIdE4EvalEPK14UniverseObjectS4_' of universe/server-Effect.o

/usr/bin/ld: `.gnu.linkonce.t._ZNK8ValueRef9OperationIdE4EvalEPK14UniverseObjectS4_' referenced in section `.rodata' of universe/server-Effect.o: defined in discarded section `.gnu.linkonce.t._ZNK8ValueRef9OperationIdE4EvalEPK14UniverseObjectS4_' of universe/server-Effect.o

universe/server-ResourceCenter.o(.text+0x3d8d): In function `ResourceCenter::SetPrimaryFocus(FocusType)':
: undefined reference to `MeterToFocus(MeterType)'
universe/server-ResourceCenter.o(.text+0x3f4a): In function `ResourceCenter::SetPrimaryFocus(FocusType)':
: undefined reference to `MeterToFocus(MeterType)'
universe/server-ResourceCenter.o(.text+0x418b): In function `ResourceCenter::SetSecondaryFocus(FocusType)':
: undefined reference to `MeterToFocus(MeterType)'
universe/server-ResourceCenter.o(.text+0x4348): In function `ResourceCenter::SetSecondaryFocus(FocusType)':
: undefined reference to `MeterToFocus(MeterType)'
collect2: ld returned 1 exit status
make[1]: *** [freeoriond] Error 1
make[1]: Leaving directory `/usr/src/FreeOrion'
make: *** [all] Error; 2
where there is the problem? Who may help?

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#2 Post by Yoghurt »

This belongs in the Programming Board...

What GCC Version are you using?

rychlik
Space Krill
Posts: 4
Joined: Fri Oct 07, 2005 1:40 pm

My GCC version is...

#3 Post by rychlik »

... 3.3.3

rychlik
Space Krill
Posts: 4
Joined: Fri Oct 07, 2005 1:40 pm

#4 Post by rychlik »

It seems that bug was fixed. But in recent CVS sources (10.10.05), I got newer bug:
if g++ -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetype2 -I/usr/include/GG -I/usr/include/GG/dialogs -I/usr/include/GG/SDL -I/usr/include/GG -I/usr/include/GG/dialogs -I/usr/include/GG/net -I/usr/include/GG/net -I/usr/include/GG -I/usr/include/GG/dialogs -DFREEORION_BUILD_HUMAN -I/usr/local/include/graphviz -DFREEORION_LINUX -Wall -O3 -funroll-loops -MT client/human/client-HumanClientApp.o -MD -MP -MF "client/human/.deps/client-HumanClientApp.Tpo" -c -o client/human/client-HumanClientApp.o `test -f 'client/human/HumanClientApp.cpp' || echo './'`client/human/HumanClientApp.cpp; \
then mv -f "client/human/.deps/client-HumanClientApp.Tpo" "client/human/.deps/client-HumanClientApp.Po"; else rm -f "client/human/.deps/client-HumanClientApp.Tpo"; exit 1; fi
client/human/HumanClientApp.cpp:86: error: `FSOUND_OUTPUT_NOSOUND' was not
declared in this scope
client/human/HumanClientApp.cpp:86: error: enumerator value for `
SOUND_DRIVER_NOSOUND' not integer constant
client/human/HumanClientApp.cpp:87: error: `FSOUND_OUTPUT_DSOUND' was not
declared in this scope
client/human/HumanClientApp.cpp:87: error: enumerator value for `
SOUND_DRIVER_DIRECT_SOUND' not integer constant
client/human/HumanClientApp.cpp:88: error: `FSOUND_OUTPUT_WINMM' was not
declared in this scope
client/human/HumanClientApp.cpp:88: error: enumerator value for `
SOUND_DRIVER_WINDOWS_MULTIMEDIA_WAVEOUT' not integer constant
client/human/HumanClientApp.cpp:89: error: `FSOUND_OUTPUT_ASIO' was not
declared in this scope
client/human/HumanClientApp.cpp:89: error: enumerator value for `
SOUND_DRIVER_ASIO' not integer constant
client/human/HumanClientApp.cpp:90: error: `FSOUND_OUTPUT_OSS' was not declared
in this scope
client/human/HumanClientApp.cpp:90: error: enumerator value for `
SOUND_DRIVER_OSS' not integer constant
client/human/HumanClientApp.cpp:91: error: `FSOUND_OUTPUT_ESD' was not declared
in this scope
client/human/HumanClientApp.cpp:91: error: enumerator value for `
SOUND_DRIVER_ESD' not integer constant
client/human/HumanClientApp.cpp:93: error: `FSOUND_OUTPUT_ALSA' was not
declared in this scope
client/human/HumanClientApp.cpp:93: error: enumerator value for `
SOUND_DRIVER_ALSA' not integer constant
client/human/HumanClientApp.cpp: In function `
std::vector<<unnamed>::SoundDriver, std::allocator<<unnamed>::SoundDriver> >
<unnamed>::GetSoundDrivers()':
client/human/HumanClientApp.cpp:108: error: `FSOUND_OUTPUT_ALSA' undeclared
(first use this function)
client/human/HumanClientApp.cpp:108: error: (Each undeclared identifier is
reported only once for each function it appears in.)
client/human/HumanClientApp.cpp:108: error: `FSOUND_SetOutput' undeclared
(first use this function)
client/human/HumanClientApp.cpp:108: error: `FSOUND_GetNumDrivers' undeclared
(first use this function)
client/human/HumanClientApp.cpp:110: error: `FSOUND_OUTPUT_OSS' undeclared
(first use this function)
client/human/HumanClientApp.cpp:112: error: `FSOUND_OUTPUT_ESD' undeclared
(first use this function)
client/human/HumanClientApp.cpp:116: error: `FSOUND_OUTPUT_NOSOUND' undeclared
(first use this function)
client/human/HumanClientApp.cpp: In function `void <unnamed>::InitFMOD(unsigned
int, unsigned int)':
client/human/HumanClientApp.cpp:130: error: `FSOUND_GetVersion' undeclared
(first use this function)
client/human/HumanClientApp.cpp:134: error: `FSOUND_SetMemorySystem' undeclared
(first use this function)
client/human/HumanClientApp.cpp:135: error: `FSOUND_GetError' undeclared (first
use this function)
client/human/HumanClientApp.cpp:138: error: `FSOUND_SetOutput' undeclared
(first use this function)
client/human/HumanClientApp.cpp:139: error: `FSOUND_SetDriver' undeclared
(first use this function)
client/human/HumanClientApp.cpp:140: error: `FSOUND_GetOutput' undeclared
(first use this function)
client/human/HumanClientApp.cpp:142: error: `FSOUND_INIT_USEDEFAULTMIDISYNTH'
undeclared (first use this function)
client/human/HumanClientApp.cpp:142: error: `FSOUND_Init' undeclared (first use
this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::PlayMusic(const std::string&, int)':
client/human/HumanClientApp.cpp:303: error: `FSOUND_2D' undeclared (first use
this function)
client/human/HumanClientApp.cpp:303: error: `FSOUND_Stream_Open' undeclared
(first use this function)
client/human/HumanClientApp.cpp:304: error: `FSOUND_FREE' undeclared (first use
this function)
client/human/HumanClientApp.cpp:304: error: `FSOUND_Stream_Play' undeclared
(first use this function)
client/human/HumanClientApp.cpp:305: error: `FSOUND_SetVolumeAbsolute'
undeclared (first use this function)
client/human/HumanClientApp.cpp:307: error: `FSOUND_Stream_GetLengthMs'
undeclared (first use this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::StopMusic()':
client/human/HumanClientApp.cpp:314: error: `FSOUND_Stream_Close' undeclared
(first use this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::PlaySound(const std::string&)':
client/human/HumanClientApp.cpp:326: error: `FSOUND_SAMPLE' undeclared (first
use this function)
client/human/HumanClientApp.cpp:326: error: `sample' undeclared (first use this
function)
client/human/HumanClientApp.cpp:326: error: `FSOUND_Sample_Get' undeclared
(first use this function)
client/human/HumanClientApp.cpp:327: error: `FSOUND_PlaySound' undeclared
(first use this function)
client/human/HumanClientApp.cpp:335: error: `FSOUND_Sample_Load' undeclared
(first use this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::FreeSound(const std::string&)':
client/human/HumanClientApp.cpp:347: error: `FSOUND_Sample_Get' undeclared
(first use this function)
client/human/HumanClientApp.cpp:347: error: `FSOUND_Sample_Free' undeclared
(first use this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::FreeAllSounds()':
client/human/HumanClientApp.cpp:356: error: `FSOUND_Sample_Get' undeclared
(first use this function)
client/human/HumanClientApp.cpp:356: error: `FSOUND_Sample_Free' undeclared
(first use this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::SetMusicVolume(int)':
client/human/HumanClientApp.cpp:366: error: `FSOUND_SetVolumeAbsolute'
undeclared (first use this function)
client/human/HumanClientApp.cpp: In member function `void
HumanClientApp::SetUISoundsVolume(int)':
client/human/HumanClientApp.cpp:373: error: `FSOUND_SetSFXMasterVolume'
undeclared (first use this function)
client/human/HumanClientApp.cpp: In member function `virtual void
HumanClientApp::SDLQuit()':
client/human/HumanClientApp.cpp:701: error: `FSOUND_Close' undeclared (first
use this function)
make[1]: *** [client/human/client-HumanClientApp.o] Error 1
make[1]: Leaving directory `/usr/src/FreeOrion'
make: *** [all] Error 2
Any ideas?

P.S. GCC 3.3.3

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#5 Post by Yoghurt »

You need FMOD 3.74 (not FMOD4 aka FMODEx) as well as graphviz. The configure script does not check for those.

rychlik
Space Krill
Posts: 4
Joined: Fri Oct 07, 2005 1:40 pm

Ok, it compiled but unusable.

#6 Post by rychlik »

So, I compiled this CVS version.

Tried to launch but it reports:

FreeOrion]# ./freeorion
./freeorion[0x806cf98]
[0xffffe420]
/usr/lib/libstdc++.so.6(_ZNSt15_List_node_base4hookEPS_+0x17)[0xb7a23ec7]
/usr/lib/libboost_signals.so.1(_ZNSt4listIN5boost7signals10connectionESaIS2_EE6insertESt14_List_iteratorIS2_ERKS2_+0x41)[0xb7c32e0d]
/usr/lib/libboost_signals.so.1(_ZNK5boost7signals9trackable16signal_connectedENS0_10connectionERNS0_6detail12bound_objectE+0x29)[0xb7c32335]
/usr/lib/libboost_signals.so.1(_ZN5boost7signals6detail9slot_base17create_connectionEv+0xad)[0xb7c395ad]
./freeorion[0x814d4eb]
./freeorion[0x8149431]
./freeorion[0x813c451]
./freeorion[0x80ba838]
./freeorion[0x80ba792]
./freeorion[0x80725d2]
/usr/lib/libGiGiSDL.so(_ZN8SDLGGApp3RunEv+0x26)[0xb7be1d7e]
/usr/lib/libGiGi.so(_ZN2GG3AppclEv+0xf)[0xb7cd522b]
/usr/lib/libGiGiSDL.so(_ZN8SDLGGAppclEv+0x1b)[0xb7be15ef]
./freeorion[0x80902ce]
/lib/tls/libc.so.6(__libc_start_main+0xd2)[0xc87e52]
./freeorion(_ZN2GG7ListBox12LDoubleClickERKNS_2PtEj+0x41)[0x8067e0d]
Segmentation fault
I copied data.zip to /data and to /default then with no result.

Where is the problem then?

Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#7 Post by Yoghurt »

Coud you run it in gdb

Code: Select all

gdb ./freeorion
, then type run, and when it crashes, post the first 8 lines or so of the output of "bt"

toxodont
Space Krill
Posts: 6
Joined: Mon Feb 20, 2006 3:06 pm

#8 Post by toxodont »

I have a similar problem, but I get a segmentation fault as soon as I run freeorion with no feedback at all.

Code: Select all

$ ./freeorion
Segmentation fault
Here is my gdb + bt output.

Code: Select all

Starting program: /FreeOrion/freeorion
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 23658)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 23658)]
0x40777d5e in std::ostream::flush () from /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6
(gdb) bt
#0  0x40777d5e in std::ostream::flush ()
   from /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6
#1  0x40777e79 in std::ostream::sentry::sentry ()
   from /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6
#2  0x40778a8e in std::ostream::operator<< ()
   from /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6
#3  0x08098c74 in boost::lexical_cast<std::string, double> ()
#4  0x0828f923 in OptionsDB::Add<double> ()
#5  0x08312c16 in (anonymous namespace)::AddOptions ()
#6  0x0818a196 in GetOptionsDB ()
#7  0x081e0e54 in main ()
As you can see I am using GCC 3.4.4. (Gentoo). I recompiled all the dependancies with GCC 3.4.4 as 3.3.x wasn't working for me. Everything compiled seemingly ok this time, but I just keep seg faulting.

Any input appreciated!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#9 Post by Geoff the Medio »

Are you compiling with the latest versions of GiGi and FO from SVN?

Also, see this page, which is currently the most up-to-date set of instructions for linux compilation. It's actually for Debian, but might be of some use to you.

If this was completely unhelpful, then sorry... I'm not a linux programmer. Someone should be along to help you better in a while...

toxodont
Space Krill
Posts: 6
Joined: Mon Feb 20, 2006 3:06 pm

#10 Post by toxodont »

Geoff the Medio wrote:Are you compiling with the latest versions of GiGi and FO from SVN?

Also, see this page, which is currently the most up-to-date set of instructions for linux compilation. It's actually for Debian, but might be of some use to you.

If this was completely unhelpful, then sorry... I'm not a linux programmer. Someone should be along to help you better in a while...
Yeah those were both compiled from SVN... I also read both stories about Debian and Gentoo, which helped me get everything working as it is now! It's just these darn seg faults that are killing me.

I did an ldd on freeorion as well and got the following output, but am having trouble deciphering it.

Code: Select all

# ldd freeorion
        linux-gate.so.1 =>  (0xffffe000)
        libGiGiSDL.so => /usr/local/lib/libGiGiSDL.so (0x4002d000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x40033000)
        libGiGiNet.so => /usr/local/lib/libGiGiNet.so (0x40093000)
        libIL.so.1 => /usr/lib/libIL.so.1 (0x4009c000)
        libILU.so.1 => /usr/lib/libILU.so.1 (0x40197000)
        libILUT.so.1 => /usr/lib/libILUT.so.1 (0x401ad000)
        libGiGi.so => /usr/local/lib/libGiGi.so (0x401b1000)
        libboost_signals.so.1.33.1 => /usr/lib/libboost_signals.so.1.33.1 (0x40385000)
        libboost_filesystem.so.1.33.1 => /usr/lib/libboost_filesystem.so.1.33.1 (0x40396000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0x403a7000)
        libGLU.so.1 => /usr/lib/libGLU.so.1 (0x4042a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40494000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x404e7000)
        libz.so.1 => /lib/libz.so.1 (0x4054b000)
        libboost_serialization.so.1.33.1 => /usr/lib/libboost_serialization.so.1.33.1 (0x4055b000)
        libfmod-3.74.so => /usr/lib/libfmod-3.74.so (0x405bb000)
        libcdt.so.0 => /usr/local/lib/graphviz/libcdt.so.0 (0x40654000)
        libcommon.so.0 => /usr/local/lib/graphviz/libcommon.so.0 (0x40659000)
        libdotgen.so.0 => /usr/local/lib/graphviz/libdotgen.so.0 (0x406a8000)
        libdotneato.so.0 => /usr/local/lib/graphviz/libdotneato.so.0 (0x406c3000)
        libgraph.so.0 => /usr/local/lib/graphviz/libgraph.so.0 (0x406c5000)
        libgvrender.so.0 => /usr/local/lib/graphviz/libgvrender.so.0 (0x406ce000)
        libpathplan.so.0 => /usr/local/lib/graphviz/libpathplan.so.0 (0x406d2000)
        liblog4cpp.so.3 => /usr/lib/liblog4cpp.so.3 (0x406dd000)
        libstdc++.so.6 => /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6 (0x40707000)
        libm.so.6 => /lib/libm.so.6 (0x407cd000)
        libgcc_s.so.1 => /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libgcc_s.so.1 (0x407f0000)
        libc.so.6 => /lib/libc.so.6 (0x407f8000)
        libdl.so.2 => /lib/libdl.so.2 (0x4090f000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x40913000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x409c4000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0x409d1000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x409fb000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x40a14000)
        libmng.so.1 => /usr/lib/libmng.so.1 (0x40a5b000)
        liblcms.so.1 => /usr/lib/liblcms.so.1 (0x40aaa000)
        libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x40ad2000)
        libnvidia-tls.so.1 => /usr/lib/libnvidia-tls.so.1 (0x41290000)
        libstdc++.so.5 => /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5 (0x41292000)
        /lib/ld-linux.so.2 (0x40000000)
        libgd.so.2 => /usr/lib/libgd.so.2 (0x4134c000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x41396000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x413c0000)
        libneatogen.so.0 => /usr/local/lib/graphviz/libneatogen.so.0 (0x413de000)
        libtwopigen.so.0 => /usr/local/lib/graphviz/libtwopigen.so.0 (0x413f8000)
        libfdpgen.so.0 => /usr/local/lib/graphviz/libfdpgen.so.0 (0x413fb000)
        libcircogen.so.0 => /usr/local/lib/graphviz/libcircogen.so.0 (0x41404000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4140b000)
        libpack.so.0 => /usr/local/lib/graphviz/libpack.so.0 (0x41421000)
libstdc++.so.5 => /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5 (0x41292000)

libstdc++.so.6 => /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6 (0x40707000)

Could these be conflicting with each other? If so, is there a way to find out what programs were compiled with what gcc? I went through the dependancies and recompiled everything I could based on gcc-3.4.4. Would python also need to be recompiled?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#11 Post by Geoff the Medio »

I can't help you... but you might have a look at this post:

http://freeorion.org/forum/viewtopic.php?p=22324#22324

which seems to be dealing with similar-sounding issues...

(edit: changed linked to better post)

tzlaine
Programming Lead Emeritus
Posts: 1092
Joined: Thu Jun 26, 2003 1:33 pm

#12 Post by tzlaine »

toxodont wrote:I did an ldd on freeorion as well and got the following output, but am having trouble deciphering it.

[SNIP]

libstdc++.so.5 => /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5-20050130/libstdc++.so.5 (0x41292000)

libstdc++.so.6 => /usr/lib/gcc/i386-pc-linux-gnu/3.4.4/libstdc++.so.6 (0x40707000)

Could these be conflicting with each other?
Absolutely. This is your whole problem.
If so, is there a way to find out what programs were compiled with what gcc?
Nope. Just recompile everything with whatever compiler your system came with, and everything should work fine.
I went through the dependancies and recompiled everything I could based on gcc-3.4.4.
If that's not what your system shipped with, that could be exactly the wrong thing to do.
Would python also need to be recompiled?
No. Python code is all C, not C++, and so does not suffer from ABI compatability issues.

toxodont
Space Krill
Posts: 6
Joined: Mon Feb 20, 2006 3:06 pm

#13 Post by toxodont »

Hi there.

I tried using gcc-3.3.5 and gcc-3.3.6 but no matter how much I tried gigi wouldn't compile.

I found a comment on the gentoo portage site though about libsdl, which read as follows:

"1.2.8-r1 seems to break some games (xu4 for example) with a segmentation fault."

As the gigi build documentation specifies only libsdl 1.2.7 I unmerged 1.2.8 and put on 1.2.7 and everything works now, with gcc-3.4.4! No matter what I could never get gcc-3.3.x to work.

I don't know if this should be noted anywheres or not, but in my case that was the problem.

Thanks for all your help!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

#14 Post by Geoff the Medio »

toxodont wrote:I don't know if this should be noted anywheres or not, but in my case that was the problem.
It'd be great if you could write up a summary of your efforts, the problems you had and how you resolved them (and even what didn't work that you tried) as a user story on the wiki.

Register on the forums, then make a user page:

Yourusername/Yourdistro

Just like the ones seen here.

Then throw up a link to your new user story on the above-linked compile page.

Post Reply