link error on building CVS (with gcc under linux)

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
Barak
Trader
Trader
Posts: 16
Joined: Wed Feb 23, 2005 8:16 pm
Location: Montreal, CANADA

link error on building CVS (with gcc under linux)

Post by Barak »

After a fresh CVS and running make I get:

/usr/bin/g++ -pipe -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/include/SDL -D_REENTRANT -pthread -pipe -L/usr/X11R6/lib -L/usr/X11R6/lib -o soundserver inet.o inet_file.o soundserver.o -L/usr/local/lib -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lSDL_mixer -lvorbisfile -lvorbis -logg -lutil -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lGL -lGLU -L/usr/X11/lib -lglut -lXi -lXmu -lexpat -lpng -lz -lm -ljpeg -lopenal -lvorbisfile -lvorbis -logg -lpython2.4 -Xlinker -export-dynamic -pthread
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../../i686-pc-linux-gnu/bin/ld: warning: libstdc++.so.5, needed by /usr/lib/libSDL.so, may conflict with libstdc++.so.6
soundserver.o(.text+0x114c): In function `PlayMusic(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Mix_Music*)':
: undefined reference to `Mix_SoftVolume_Change(int, double, double, Mix_SoftVolume_Shape)'
soundserver.o(.text+0x1160): In function `PlayMusic(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Mix_Music*)':
: undefined reference to `Mix_SoftVolume_AutoStopMusic(int, int)'
soundserver.o(.text+0x11c9): In function `PlayMusic(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Mix_Music*)':
: undefined reference to `Mix_SoftVolume_Force(int, double)'
soundserver.o(.text+0x123f): In function `PlayMusic(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Mix_Music*)':
: undefined reference to `Mix_SoftVolume_Force(int, double)'
soundserver.o(.text+0x1268): In function `PlayMusic(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _Mix_Music*)':
: undefined reference to `Mix_SoftVolume_Change(int, double, double, Mix_SoftVolume_Shape)'
soundserver.o(.text+0x1fc1): In function `main':
: undefined reference to `Mix_SoftVolume_Change(int, double, double, Mix_SoftVolume_Shape)'
collect2: ld returned 1 exit status
make[4]: *** [soundserver] Error 1
make[4]: Leaving directory `/home/ronis/Project/notar/games/vegastrike_0_4_3/vegastrike/src/networking'
make[3]: *** [all-recursive] Error 1


This worked a while ago.

David
Barak
Trader
Trader
Posts: 16
Joined: Wed Feb 23, 2005 8:16 pm
Location: Montreal, CANADA

Post by Barak »

I found the problem. It seems that configure doesn't add softvolume.o to the list of dependencies for soundserver (specifically in am_soundserver_OBJECTS). It doesn't get compiled or linked. I manually added it to the list
the Makefile in networking and I'm happily compiling again.

On the other hand, I've discovered more link errors, now related to collide_map. This is the same sort of problem, now in src/cmd.

Ditto for src/ship_commands.o, src/command.o and src/rendertext.o

I'm still getting unresolved externals, now

ship_commands.o(.text+0x116): In function `ShipCommands::pymenu()':
: undefined reference to `CommandInterpretor'
ship_commands.o(.text+0x147): In function `ShipCommands::pymenu()':
: undefined reference to `CommandInterpretor'
ship_commands.o(.gnu.linkonce.t._ZN12ShipCommandsC1Ev+0x87): In function `ShipCommands::ShipCommands()':
: undefined reference to `CommandInterpretor'
ship_commands.o(.gnu.linkonce.t._ZN12ShipCommandsC1Ev+0x10e): In function `ShipCommands::ShipCommands()':
: undefined reference to `CommandInterpretor'
ship_commands.o(.gnu.linkonce.t._ZN12ShipCommandsC1Ev+0x19d): In function `ShipCommands::ShipCommands()':
: undefined reference to `CommandInterpretor'
ship_commands.o(.gnu.linkonce.t._ZN12ShipCommandsC1Ev+0x25c): more undefined references to `CommandInterpretor' follow
rendertext.o(.text+0x5f1): In function `RText::draw_text(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, float, float, int)':
: undefined reference to `TextPlane::TextPlane(GFXColor const&, GFXColor const&)'
rendertext.o(.text+0x651): In function `RText::draw_text(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, float, float, int)':
: undefined reference to `TextPlane::Draw(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool, bool)'
rendertext.o(.text+0x664): In function `RText::draw_text(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, float, float, int)':
: undefined reference to `TextPlane::~TextPlane()'
rendertext.o(.text+0x67d): In function `RText::draw_text(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, float, float, int)':
: undefined reference to `TextPlane::~TextPlane()'
collect2: ld returned 1 exit status
dandandaman
Artisan
Artisan
Posts: 1270
Joined: Fri Jan 03, 2003 3:27 am
Location: Perth, Western Australia
Contact:

Post by dandandaman »

Great, Thanks! :-) (about teh soundserver one) .. been looking for that one for a bit. For the others though, I have never come across them, everything non-soundserver related works fine for me...

Dan.a
"Computers are useless. They can only give you answers."
-- Pablo Picasso
Barak
Trader
Trader
Posts: 16
Joined: Wed Feb 23, 2005 8:16 pm
Location: Montreal, CANADA

Post by Barak »

Turns out that the problem was fixed by running the aclocal -- autoheader programs again and
recompiling. There's now a bootstrap-sh file that automates this.
Post Reply