Page 1 of 1

Problem compiling 2.0 and 2.1

Posted: Fri Jan 10, 2014 2:54 pm
by heilkitty
2.0 and 2.1 from svn fail to build on Ubuntu 13.10 64 bit (glib v2.38.1) with the following error:

Code: Select all

make[3]: Entering directory `/home/heilkitty/soft/freeciv/S2_0/client'
gcc  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations   -o civclient  audio_sdl.o   attribute.o citydlg_common.o cityrepdata.o civclient.o chatline_common.o connectdlg_common.o climisc.o climap.o clinet.o control.o goto.o helpdata.o mapctrl_common.o mapview_common.o messagewin_common.o packhand.o packhand_gen.o plrdlg_common.o options.o repodlgs_common.o text.o tilespec.o audio.o audio_none.o ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0    -L/usr/lib/x86_64-linux-gnu -lSDL -lSDL_mixer  -lz  
/usr/bin/ld: gui-gtk-2.0/libguiclient.a(gtkpixcomm.o): undefined reference to symbol 'floor@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [civclient] Error 1
make[3]: Leaving directory `/home/heilkitty/soft/freeciv/S2_0/client'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/heilkitty/soft/freeciv/S2_0/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/heilkitty/soft/freeciv/S2_0'
make: *** [all] Error 2
I guess these versions ain't supported anymore, but was anyone able to fix this?

Re: Problem compiling 2.0 and 2.1

Posted: Fri Jan 10, 2014 4:01 pm
by cazfi
heilkitty wrote:2.0 and 2.1 from svn fail to build on Ubuntu 13.10 64 bit (glib v2.38.1) with the following error:

Code: Select all

make[3]: Entering directory `/home/heilkitty/soft/freeciv/S2_0/client'
gcc  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations   -o civclient  audio_sdl.o   attribute.o citydlg_common.o cityrepdata.o civclient.o chatline_common.o connectdlg_common.o climisc.o climap.o clinet.o control.o goto.o helpdata.o mapctrl_common.o mapview_common.o messagewin_common.o packhand.o packhand_gen.o plrdlg_common.o options.o repodlgs_common.o text.o tilespec.o audio.o audio_none.o ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0    -L/usr/lib/x86_64-linux-gnu -lSDL -lSDL_mixer  -lz  
/usr/bin/ld: gui-gtk-2.0/libguiclient.a(gtkpixcomm.o): undefined reference to symbol 'floor@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [civclient] Error 1
make[3]: Leaving directory `/home/heilkitty/soft/freeciv/S2_0/client'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/heilkitty/soft/freeciv/S2_0/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/heilkitty/soft/freeciv/S2_0'
make: *** [all] Error 2
I guess these versions ain't supported anymore, but was anyone able to fix this?
I may later look if I can compile those versions, but note that it's not glib (base gnome library) but glibc (GNU c-library) that the error message refers to.

Re: Problem compiling 2.0 and 2.1

Posted: Sat Jan 11, 2014 4:14 am
by heilkitty
GNU C Library v2.17.

UPD: I've managed to link civclient manually with a command

Code: Select all

gcc  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations   -o civclient  audio_sdl.o   attribute.o citydlg_common.o cityrepdata.o civclient.o chatline_common.o connectdlg_common.o climisc.o climap.o clinet.o control.o goto.o helpdata.o mapctrl_common.o mapview_common.o messagewin_common.o packhand.o packhand_gen.o plrdlg_common.o options.o repodlgs_common.o text.o tilespec.o audio.o audio_none.o ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0    -L/usr/lib/x86_64-linux-gnu -lSDL -lSDL_mixer  -lz -lm
thanks to this (the main part is -lm at the end). I don't know what ./configure options should I set or what changes should be made to Makefiles.

Re: Problem compiling 2.0 and 2.1

Posted: Sat Jan 11, 2014 6:45 am
by cazfi
heilkitty wrote:GNU C Library v2.17.

UPD: I've managed to link civclient manually with a command

Code: Select all

gcc  -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations   -o civclient  audio_sdl.o   attribute.o citydlg_common.o cityrepdata.o civclient.o chatline_common.o connectdlg_common.o climisc.o climap.o clinet.o control.o goto.o helpdata.o mapctrl_common.o mapview_common.o messagewin_common.o packhand.o packhand_gen.o plrdlg_common.o options.o repodlgs_common.o text.o tilespec.o audio.o audio_none.o ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a ../utility/libcivutility.a  ../common/libcivcommon.a ../common/aicore/libaicore.a agents/libagents.a gui-gtk-2.0/libguiclient.a -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0    -L/usr/lib/x86_64-linux-gnu -lSDL -lSDL_mixer  -lz -lm
thanks to this (the main part is -lm at the end). I don't know what ./configure options should I set or what changes should be made to Makefiles.
Does it work if you manually set LDFLAGS when running configure:
> ./configure LDFLAGS="-lm"
or (less preferred):
> LDFLAGS="-lm" ./configure

Re: Problem compiling 2.0 and 2.1

Posted: Sat Jan 11, 2014 12:12 pm
by JTN
Maybe bug #15973? This was fixed in 2.2.1 and later, but never backported S2_1 or S2_0. (I haven't checked if the issue actually applies to those branches, mind.)

Re: Problem compiling 2.0 and 2.1

Posted: Sat Jan 11, 2014 2:12 pm
by heilkitty
cazfi wrote:Does it work if you manually set LDFLAGS when running configure:
> ./configure LDFLAGS="-lm"
or (less preferred):
> LDFLAGS="-lm" ./configure
No. -lm should be at the end of all options, it seems.

Code: Select all

./configure LIBS="-lm -lz"
does the trick.