MegaGlest Forum

Archives (read only) => Vanilla Glest => Linux and other ports => Topic started by: scavenger on 29 July 2009, 14:18:13

Title: [SOLVED] Glest 3.2.2 won't link
Post by: scavenger on 29 July 2009, 14:18:13
I downloaded the Glest 3.2.2 source today, tried to compile it and, well... failed. The compilation went okay, but when it was time to link the binary, LD complained about an undefined reference to 'XLoadQueryFont'.

I have all X libraries, dev packages and everything installed, and it seems the compiler can reach them, but the linker can't.

Does anyone of you know what going on here?

(yes, I am aware that there are precompiled binaries availible)
Title: Re: Glest 3.2.2 won't link
Post by: hailstone on 30 July 2009, 00:41:00
Please post the exact error message.
Title: Re: Glest 3.2.2 won't link
Post by: scavenger on 30 July 2009, 14:37:32
Here goes:

Code: [Select]
myusername@myhostname:~/Projects/svn/trunk/mk/linux$ jam
...found 499 target(s)...
...updating 1 target(s)...
LinkApplication glest
/usr/bin/ld: ./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a(gl_wrap.o): in function Shared::Platform::createGlFontBitmaps(unsigned int&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int, Shared::Graphics::FontMetrics&):gl_wrap.cpp(.text+0x2e5): error: undefined reference to 'XLoadQueryFont'
collect2: ld returned 1 exit status

    g++ -o glest < lots of object file names here, snipped >  ./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a   -L/usr/lib -lSDL -lGL  -lm -lGLU -lGL  -lm -lxerces-c -lpthread  -lvorbis -lm -lvorbisfile  -logg -lopenal -L/usr/lib -llua5.1

...failed LinkApplication glest ...
...failed updating 1 target(s)...
Title: Re: Glest 3.2.2 won't link
Post by: hailstone on 31 July 2009, 03:08:19
XLoadQueryFont appears to be in GLX which I have in libgl1-mesa-dev.

You might need to tell the configure script which version if you have multiple versions.
Title: Re: Glest 3.2.2 won't link
Post by: scavenger on 1 August 2009, 11:48:58
Sorry, it was my bad. I had the experimental 'Gold' (Ubuntu package binutils-gold) linker installed, which is a lot faster, but apparently incompatible with Glest. I removed it and it linked perfectly.

Again, I apologize if I wasted anyone's time. I won't let it happen again  :)