AMD64 compile errors

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket

AMD64 compile errors

Postby rig0r » 27 Aug 2006, 00:05

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  :)
rig0r
New user
 
Posts: 3
Joined: 26 Aug 2006, 23:59

Re: AMD64 compile errors

Postby DevUrandom » 27 Aug 2006, 13:19

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 ...
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: AMD64 compile errors

Postby coyote » 27 Sep 2006, 05:24

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/
Last edited by coyote on 27 Sep 2006, 05:34, edited 1 time in total.
coyote
New user
 
Posts: 1
Joined: 27 Sep 2006, 05:16

Re: AMD64 compile errors

Postby DevUrandom » 27 Sep 2006, 19:49

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...
Last edited by DevUrandom on 29 Sep 2006, 17:34, edited 1 time in total.
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: AMD64 compile errors

Postby lav_coyote25 » 28 Sep 2006, 03:10

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
‎"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.
User avatar
lav_coyote25
Professional
Professional
 
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: AMD64 compile errors

Postby rig0r » 27 Dec 2006, 12:49

Fyi, I just successfully compiled the game from SVN on my amd64 system and am now trying it out  :)
rig0r
New user
 
Posts: 3
Joined: 26 Aug 2006, 23:59

Re: AMD64 compile errors

Postby DevUrandom » 27 Dec 2006, 14:53

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. :(
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: AMD64 compile errors

Postby rig0r » 28 Dec 2006, 18:45

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 ?  ::)
rig0r
New user
 
Posts: 3
Joined: 26 Aug 2006, 23:59

Re: AMD64 compile errors

Postby kage » 29 Dec 2006, 10:36

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.
User avatar
kage
Regular
Regular
 
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: AMD64 compile errors

Postby DevUrandom » 29 Dec 2006, 13:51

???

*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...
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: AMD64 compile errors

Postby Mr. Pig » 31 Dec 2006, 03:23

Mr. Pig
Rookie
Rookie
 
Posts: 24
Joined: 11 Dec 2006, 06:02

Re: AMD64 compile errors

Postby lav_coyote25 » 31 Dec 2006, 04:46

would it be possible to place that in the warzone Document Project.?? ;D
‎"to prepare for disaster is to invite it, to not prepare for disaster is a fools choice" -me (kim-lav_coyote25-metcalfe) - it used to be attributed to unknown - but adding the last bit , it now makes sense.
User avatar
lav_coyote25
Professional
Professional
 
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: AMD64 compile errors

Postby DevUrandom » 31 Dec 2006, 12:40

Kim:
Scourge wrote:Copyright 2006, may NOT be reproduced without explicit permission.
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: AMD64 compile errors

Postby kage » 31 Dec 2006, 14:51

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.
User avatar
kage
Regular
Regular
 
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: AMD64 compile errors

Postby DevUrandom » 31 Dec 2006, 15:24

Well, we were talking about linking a 32bit app with 64bit libs. Nothing about sockets and X connections...
User avatar
DevUrandom
Regular
Regular
 
Posts: 1690
Joined: 31 Jul 2006, 23:14

Next

Return to Technical Help / Troubleshooting

cron