Jump to content

Home

problems with linux build


bsah
 Share

Recommended Posts

So, well.

 

$ cd ~/Hack
$ svn co http://opensvn.csie.org/ojp/ ojp/
[ > 200 mb downloaded... ]
$ cp -r ojp/Basic/ mymod-src/
$ cd $_/source/game/
$ make
[ *build* *build* *fail* ]

 

uh oh...

 

aotctc_holocron.c: In function ‘AOTCTC_Holocron_Loadpositions’:
aotctc_holocron.c:170: error: lvalue required as left operand of assignment

 

Hm.

 

$ head -170 aotctc_holocron.c |tail -1
                       (float)stats[statnum] = (float)atof(t);

wtf?

oh well

 

s/\(float\)stats/stats/

 

$ make

 

Yeah! Got the jampgamei386.so.

 

$ cd ~/jk3
$ mkdir mymod
$ cd $_
$ ln -s ~/Hack/mymod-src/source/game src
$ ln -s src/jampgamei386.so ./
$ cd ..
$ ./linuxjampded +set dedicated 2 +set net_port 21000 +set fs_game mymod +map mp/ffa3
JAmp: v1.0.1.1 linux-i386 Nov 10 2003
[blah blah blah]
Loading dll file jampgame.
Sys_LoadDll(/mnt/junk/jk3/GameData/mymod/jampgamei386.so)...
Sys_LoadDll(/mnt/junk/jk3/GameData/mymod/jampgamei386.so) failed: "/mnt/junk/jk3/GameData/mymod/jampgamei386.so: cannot open shared object file: No such file or directory"
Sys_LoadDll(./linuxjampded/mymod/jampgamei386.so) failed: "./linuxjampded/mymod/jampgamei386.so: cannot open shared object file: Not a directory"
Resolving masterjk3.ravensoft.com
masterjk3.ravensoft.com resolved to 63.146.124.53:29060
Sending heartbeat to masterjk3.ravensoft.com
Sending heartbeat to masterjk3.ravensoft.com
Sys_Error: Sys_LoadDll(jampgame) failed dlopen() completely!

$ echo $?
1

 

Uh oh. Halp?

 

Stock basejka .so works O.K.

 

SVN revision number is 599. I'm using Debian sid, apt-get updated & upgraded as of today. I get the same results with GCC 4.2.3 and 3.4.6. Also:

 

$ file `chase {base,mymod}/jampgamei386.so`
/mnt/junk/jk3/GameData/Base/jampgamei386.so:            ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
/home/harry/Hack/mymod-src/source/game/jampgamei386.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

 

Stripping it doesn't help :p

 

$ ldd `chase {base,mymod}/jampgamei386.so`
/mnt/junk/jk3/GameData/Base/jampgamei386.so:
       linux-gate.so.1 =>  (0xffffe000)
       libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7593000)
       libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb756d000)
       libcxa.so.1 => /usr/lib/libcxa.so.1 (0xb7564000)
       libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7409000)
       /lib/ld-linux.so.2 (0x80000000)
/home/harry/Hack/mymod-src/source/game/jampgamei386.so:
       linux-gate.so.1 =>  (0xffffe000)
       libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7443000)
       libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb72e8000)
       /lib/ld-linux.so.2 (0x80000000)

 

That yields something interesting. I've got libcxa1 in place, but GCC is refusing to link against it:

 

$ gcc -shared -o jampgamei386.so [a-sh*tload-of-.o's] -lm -ldl -lcxa
/usr/bin/ld: cannot find -lcxa
collect2: ld returned 1 exit status

 

WTF? :(

Link to comment
Share on other sites

Hm :)

 

The same little error with casting lvalue (does the ms' cc just look the other way? o,O)... And btw what's the point of casting a float to a float?...

 

...and the Enhanced build works OK :D <hurray!> so someone must've broken Basic.

Link to comment
Share on other sites

Read my first post - this isn't an issue, when I removed that cast everything compiled OK but the jampded thing is refusing to load the .so and just crashes. Enhanced builds and works perfectly, but I'd like to play around with basic, and possibly make my own mod on top of it.

 

BTW I made a diff between basic and enhanced source tree, and as I've looked in places like g_main.c or g_local.h, nothing suspicious found have I. As the windows build seems to work, the breakage might be very subtle =/

 

Hm. Maybe an older revision would work, but I'm a total SVN newb and I dunno how to check it out :p halp? :D

Link to comment
Share on other sites

I keep everything somewhere on /mnt (lost the track of directory hierarchy under /mnt years ago), and GameData/ is symlinked to ~/jk3/:

 

$ ls ~/jk3/
[cut!]
base
linuxjampded
mymod       (aka ojp basic)
mybettermod  (aka ojp enhanced)
[cut!]
$ ls -l mymod/ mybettermod/
mybettermod/:
total 1069
-rw-r--r-- 1 harry users 733184 2008-03-18 18:34 cgamex86.dll
-rw-r--r-- 1 harry users  10361 2008-03-18 18:38 jampconfig.cfg
lrwxrwxrwx 1 harry users     19 2008-03-18 18:14 jampgamei386.so -> src/jampgamei386.so
lrwxrwxrwx 1 harry users     54 2008-03-18 18:15 src -> /home/harry/Hack/mybettermod-src/Enhanced/source/game/
-rw-r--r-- 1 harry users 348160 2008-03-18 18:34 uix86.dll

mymod/:
total 0
lrwxrwxrwx 1 harry users 19 2008-03-18 16:13 jampgamei386.so -> src/jampgamei386.so
lrwxrwxrwx 1 harry users 38 2008-03-18 15:52 src -> /home/harry/Hack/mymod-src/source/game

 

Both Basic and Enhanced build cleanly, but jampded doesn't like Basic jampgamei386.so:

 

Loading dll file jampgame.
Sys_LoadDll(/mnt/junk/jk3/GameData/mymod/jampgamei386.so)...
Sys_LoadDll(/mnt/junk/jk3/GameData/mymod/jampgamei386.so) failed: "/mnt/junk/jk3/GameData/mymod/jampgamei386.so: undefined symbol: DisableStackTrace"
Sys_LoadDll(./linuxjampded/mymod/jampgamei386.so) failed: "./linuxjampded/mymod/jampgamei386.so: cannot open shared object file: Not a directory"
Resolving masterjk3.ravensoft.com
masterjk3.ravensoft.com resolved to 63.146.124.53:29060
Sending heartbeat to masterjk3.ravensoft.com
Sending heartbeat to masterjk3.ravensoft.com
Sys_Error: Sys_LoadDll(jampgame) failed dlopen() completely!

 

But I'm just repeating myself now.

 

$ file $( chase mymod/jampgamei386.so )
/home/harry/Hack/mymod-src/source/game/jampgamei386.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

 

$ file $( chase mybettermod/jampgamei386.so )
/home/harry/Hack/mybettermod-src/Enhanced/source/game/jampgamei386.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

 

I have no clue what's wrong with this... I doubt that the fault is on the side of the filesystem or directory layout... Although when I rm'd the symlink to the .so the server crashed in a somewhat similar way.

 

Hm, the command for getting an older revision seems to be "svn co -r [number] url". I'll try that later. BTW has anyone else had problems with building & running Basic on Linux? Some people actually /do/ build in on Linux from time to time, right?

Link to comment
Share on other sites

ah, there's the problem...

Sys_LoadDll(/mnt/junk/jk3/GameData/mymod/jampgamei386.so) failed: "/mnt/junk/jk3/GameData/mymod/jampgamei386.so: undefined symbol: DisableStackTrace"

 

Basically, that's a linking error that's telling you that it can't find the definition for DisableStackTrace. Probably means that a file isn't being compiled, or something was changed in the Enhanced to prevent that error.

 

Try searching thru the code in Basic and Enhanced and figure out where it is defined.

Link to comment
Share on other sites

g_crash.o is not in the Basic makefile like it is for Enhanced.

 

I just added g_crash.o to the list of .o's in the Makefile and... damn, it works now :D

 

Great thanks :D btw, someone who's in charge of Linux stuff should update the CVS now.

Link to comment
Share on other sites

Great thanks :D btw, someone who's in charge of Linux stuff should update the CVS now.

It sure would be nice if we HAD a linux person. :D

 

Bug me on PM about it and I'll try to remember to update it myself when I'm back at a system with SVN access setup.

Link to comment
Share on other sites

 Share

×
×
  • Create New...