Page 1 of 2

AMD64 compile errors

Posted: 27 Aug 2006, 00:05
by rig0r
Trying to build 2.0.4 from source, or 2.0.3 through a gentoo ebuild. I get the following error:

Code: Select all

gcc  -g -O2  -DNDEBUG -DDEFAULT_DATADIR=\"/usr/local/warzone2100/share/warzone2100\" -I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include/SDL -DYY_STATIC -m32  -o warzone2100  version.o scriptvals_parser.o scriptvals_lexer.o level_lexer.o ai.o aiexperience.o astar.o action.o advvis.o atmos.o bridge.o buildpos.o cdspan.o cheat.o cluster.o cmddroid.o combat.o component.o console.o data.o design.o difficulty.o disp2d.o display.o droid.o e3demo.o edit2d.o edit3d.o effects.o environ.o fpath.o feature.o findpath.o formation.o frontend.o gateway.o gatewayroute.o gatewaysup.o geometry.o group.o hci.o init.o intdisplay.o intimage.o intorder.o intelmap.o keybind.o keymap.o levels.o lighting.o loop.o main.o map.o mapdisplay.o mapgrid.o mechanics.o message.o miscimd.o move.o multiint.o multimenu.o multiopt.o multisync.o multibot.o multistat.o objmem.o objects.o optimisepath.o order.o player.o powercrypt.o radar.o raycast.o research.o scores.o scriptai.o scriptcb.o scriptextern.o scriptfuncs.o scriptobj.o scripttabs.o scriptvals.o selection.o stats.o text.o texture.o transporter.o visibility.o warcam.o wrappers.o ani.o arrow.o aud.o audio_id.o bucket3d.o clparse.o configuration.o csnap.o display3d.o drive.o function.o game.o ingameop.o keyedit.o loadsave.o mission.o multigifts.o multijoin.o multilimit.o multiplay.o multistruct.o oprint.o power.o projectile.o seqdisp.o structure.o target.o warzoneconfig.o ../lib/framework/libframework.a ../lib/sound/libsound.a ../lib/netplay/libnetplay.a ../lib/script/libscript.a ../lib/ivis_common/libivis_common.a ../lib/ivis_opengl/libivis_opengl.a ../lib/gamelib/libgamelib.a ../lib/sequence/libsequence.a ../lib/widget/libwidget.a -lphysfs -lpng -ljpeg -lz -lm   -lSDL -lpthread -L/usr/X11R6/lib -lSDL_net -lGL -lGLU -lopenal -lvorbisfile -lvorbis -logg -lmad
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/X11R6/lib/libphysfs.so when searching for -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/X11R6/lib/libphysfs.a when searching for -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libphysfs.so when searching for -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libphysfs.a when searching for -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libphysfs.so when searching for -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libphysfs.a when searching for -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lphysfs
collect2: ld returned 1 exit status
make[3]: *** [warzone2100] Error 1
make[3]: Leaving directory `/home/spja/Desktop/warzone2100-2.0.4/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/spja/Desktop/warzone2100-2.0.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/spja/Desktop/warzone2100-2.0.4'
make: *** [all] Error 2
Any idea how I can fix this ? Looking forward to trying this game  :)

Re: AMD64 compile errors

Posted: 27 Aug 2006, 13:19
by DevUrandom
This is a known bug, see https://gna.org/bugs/?func=detailitem&item_id=5930
I thought I told Gentoo Games that they shall mask that -x86_64 ...

Re: AMD64 compile errors

Posted: 27 Sep 2006, 05:24
by coyote
hello,

same compile error on ubuntu 64
I tried to compile the lastest Physfs version in 64 bits (same error) and to force in 32 bits, while compile it wrtiten sdl is missing (wich is installed of course)

Maybe thats possible to debug by ssh if you have not an 64 bits cpu, DevUrandom ?
Or use an amd64 emulator like http://bochs.sourceforge.net/

Re: AMD64 compile errors

Posted: 27 Sep 2006, 19:49
by DevUrandom
Is it lav_coyote25?

It doesn't matter what distribution you use... A 32 bit program can't link to a 64 bit library. I guess you need a whole 32 bit system for this to work.

But we got a great new developer, Stefan, who is working on bringing 64 bit support to Warzone 2100. But it is a long way till then...

Re: AMD64 compile errors

Posted: 28 Sep 2006, 03:10
by lav_coyote25
no it isnt me asking that question... funny though... seems he is just a ordinary coyote.... unlike myself which is the mechanical type... ;D\

one of many sites featuring the ol coyote25

Re: AMD64 compile errors

Posted: 27 Dec 2006, 12:49
by rig0r
Fyi, I just successfully compiled the game from SVN on my amd64 system and am now trying it out  :)

Re: AMD64 compile errors

Posted: 27 Dec 2006, 14:53
by DevUrandom
Yep, current SVN should compile on x86_64 and I think it also runs for a while... But if I remember correctly there were some (int->pointer, pointer->int) issues left. :(

Re: AMD64 compile errors

Posted: 28 Dec 2006, 18:45
by rig0r
DevUrandom wrote: Yep, current SVN should compile on x86_64 and I think it also runs for a while... But if I remember correctly there were some (int->pointer, pointer->int) issues left. :(
Could that be the cause of the segfault I encountered ?  ::)

Re: AMD64 compile errors

Posted: 29 Dec 2006, 10:36
by kage
DevUrandom wrote: It doesn't matter what distribution you use... A 32 bit program can't link to a 64 bit library. I guess you need a whole 32 bit system for this to work.
luckily, that only appears to be almost the case. the x protocol is platform independent, even when using unix sockets (which is almost always the case in most x setups). so, while you do need 32-bit libc, gl, glut, libogg, and everything else that warzone dynamically links to, you can still run it in a 64-bit x server. in other words, the lucky bit is that you can still run 32-bit and 64-bit apps in the same x server, though, i am unsure as to whether 32-bit and 64-bit opengl apps can coexist, which is probably a bit dependent on the driver, as to whether or not you can even run a 32-bit opengl app with dri on a 64-bit x server (in other words, you *should* be able to run 64-bit firefox and 32-bit warzone on the same 32-bit x server, but not necessarily on the same 64-bit x server).

in any case, i've been playing around with 64-bit warzone on my pure 64-bit system: compiled splendidly, but segfaults pretty soon after any game start (like when i'm building a power generator or a research facility). i'll see about writing up a bug report some time soon.

Re: AMD64 compile errors

Posted: 29 Dec 2006, 13:51
by DevUrandom
???

*How* do you want to run something on a X server if your app is incompatible to libX11???
Your *app* will never have any contact with the X11 *protocol* itself... If you'd say that you can see the output of an eg. 64bit program over an X11 connection through a network on a 32bit PC, well ok, that's possible, but I don't think any desktop user will do that...

And even if it would work with libX11: Warzone does in no way directly use libX11 AFAIK, so it wouldn't matter anyway...

Re: AMD64 compile errors

Posted: 31 Dec 2006, 03:23
by Mr. Pig

Re: AMD64 compile errors

Posted: 31 Dec 2006, 04:46
by lav_coyote25
would it be possible to place that in the warzone Document Project.?? ;D

Re: AMD64 compile errors

Posted: 31 Dec 2006, 12:40
by DevUrandom
Kim:
Scourge wrote:Copyright 2006, may NOT be reproduced without explicit permission.

Re: AMD64 compile errors

Posted: 31 Dec 2006, 14:51
by kage
DevUrandom wrote: ???

*How* do you want to run something on a X server if your app is incompatible to libX11???
Your *app* will never have any contact with the X11 *protocol* itself... If you'd say that you can see the output of an eg. 64bit program over an X11 connection through a network on a 32bit PC, well ok, that's possible, but I don't think any desktop user will do that...
not only possible, but is a designed strength of X -- that's the same reason you can get an x86 machine to act as an application server for an X display server running on a 32-bit ppc system with no quirks. as strangelove would say: "it's not only possible... it's essential!"

afaik, libX11 does not generally communicate to the x server using shared memory or similar techniques except in few circumstances, and under no circumstance are such techniques the default -- communication between the client and the server is almost always via either unix sockets or networking, and opengl bypasses X whenever direct rendering is involved.

specifically, though, what i was talking about was not a "64bit program over an X11 connection through a network on a 32bit PC", but was a "32-bit program over an X11 connection through unix sockets on the same machine, which happens to be a 64-bit linux os running a 64-bit X server". that setup is entirely feasible as long as the video card drivers support it, as it is X-abi-agnostic (in fact, i'm doing that very thing to get diablo 2 with wine running on my 64-bit machine).

don't ask me how vid card drivers allow for 32-bit opengl libraries to interface with their 64-bit kernel module with the same abi as the 64-bit opengl libs use... that's way beyond me.
DevUrandom wrote: And even if it would work with libX11: Warzone does in no way directly use libX11 AFAIK, so it wouldn't matter anyway...
it might not *directly* interface with any of the xlibs, but one of the dependencies of its dependencies *has to* if it is able to draw a window on an X server -- there's simply no way around that without constructing an alternative library to handle the x protocol, which is pointless, since you'd have a really difficult time making your "reinvented wheel" perform anywhere near as well, or be nearly as compatible to spec as the current xlibs.

Re: AMD64 compile errors

Posted: 31 Dec 2006, 15:24
by DevUrandom
Well, we were talking about linking a 32bit app with 64bit libs. Nothing about sockets and X connections...