lfnetwork.com mark read register faq members calendar

Thread: problems with linux build
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 03-18-2008, 12:18 PM   #1
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
problems with linux build

So, well.

Code:
$ 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...

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

Code:
$ head -170 aotctc_holocron.c |tail -1
                        (float)stats[statnum] = (float)atof(t);
wtf?
oh well

s/\(float\)stats/stats/

Code:
$ make
Yeah! Got the jampgamei386.so.

Code:
$ 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:

Code:
$ 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

Code:
$ 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:

Code:
$ 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?
bsah is offline   you may: quote & reply,
Old 03-18-2008, 12:37 PM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,171
It's possible that an old update broke the build. Have you tried building Enhanced?

Can someone with a Windows system try building Basic?

And yeah, if that line is like that, that looks messed up.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 03-18-2008, 01:30 PM   #3
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
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 <hurray!> so someone must've broken Basic.
bsah is offline   you may: quote & reply,
Old 03-18-2008, 01:38 PM   #4
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Might as well just do

Code:
stats[statnum] = (float)atof(t);
or

Code:
stats[statnum] = atof(t);
atof actually returns a double, not a float.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 03-18-2008, 02:00 PM   #5
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
Quote:
atof actually returns a double, not a float.
Of course, the name is suggesting that.
bsah is offline   you may: quote & reply,
Old 03-20-2008, 12:45 PM   #6
DarthDie
Junior Member
 
DarthDie's Avatar
 
Join Date: May 2005
Location: The Matrix
Posts: 407
Basic compiles fine here (on windowz).


OJP Sponsors and websites

"...and what about all those screenshots in there of DarthDie with a swastika of demo charges."
DarthDie is offline   you may: quote & reply,
Old 03-20-2008, 01:13 PM   #7
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,171
Sounds like a typo then. Try changing the line to....

Code:
stats[statnum] = (float)atof(t);
...and see if that compiles.

My guess is that VS ignores this bad syntax while gcc craps out on it.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 03-20-2008, 02:50 PM   #8
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
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?

Last edited by bsah; 03-20-2008 at 03:06 PM.
bsah is offline   you may: quote & reply,
Old 03-21-2008, 12:41 PM   #9
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,171
Oh for that it sounds like it's simply in the wrong place. Where are you placing it in relation to the JA directories?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 03-21-2008, 05:56 PM   #10
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
I keep everything somewhere on /mnt (lost the track of directory hierarchy under /mnt years ago), and GameData/ is symlinked to ~/jk3/:

Code:
$ 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:

Code:
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.

Code:
$ 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
Code:
$ 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?
bsah is offline   you may: quote & reply,
Old 03-21-2008, 07:21 PM   #11
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,171
ah, there's the problem...
Code:
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 03-21-2008, 07:43 PM   #12
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
g_crash.o is not in the Basic makefile like it is for Enhanced.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 03-22-2008, 08:47 AM   #13
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
Quote:
Originally Posted by ensiform
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

Great thanks btw, someone who's in charge of Linux stuff should update the CVS now.
bsah is offline   you may: quote & reply,
Old 03-22-2008, 12:15 PM   #14
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
CVS? Thats not used anymore. :S


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 03-22-2008, 12:59 PM   #15
bsah
Rookie
 
Join Date: Mar 2008
Posts: 16
Whoops, I meant SVN :P
bsah is offline   you may: quote & reply,
Old 03-24-2008, 03:05 AM   #16
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,171
Quote:
Originally Posted by bsah
Great thanks 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.

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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Community > Hosted Forums > Open Jedi Project (OJP) > problems with linux build

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:55 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.