How to compile from source in Linux?
Moderators: winston, another_commander, Getafix
How to compile from source in Linux?
I've got a Windows laptop where I can play the latest version of Oolite, but there doesn't seem to be a working build for Linux (Ubuntu 7.04 in my case). How would one actually go about building it from the source? Should I even bother thinking about it when my past experiences include only such situations where I've followed someone else's instructions to the letter?
Author of Tales from the Frontier - official Elite 4 anthology.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
You need a ful GNUStep dev install and I'm not sure about feisty but when I attempted it on edgy I found that my libc pakage was too old and would need compiling too... I never got round to it.
I intend to though... when I'm bored enough. If you want to go ahead and need help give me a shout. I'm a little out of practice but I'm sure we'll manage
I intend to though... when I'm bored enough. If you want to go ahead and need help give me a shout. I'm a little out of practice but I'm sure we'll manage
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
An up-to-date walkthrough for building under Linux would be very welcome. I’d reccomend starting with the 1.68 or even 1.65 tag rather than the trunk, though.
A slight problem will be that BerliOS is currently down, so you can’t actually get at the source.
A slight problem will be that BerliOS is currently down, so you can’t actually get at the source.
E-mail: [email protected]
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
BerliOS is up again at the time of writing, with no obvious comment on what happened.
E-mail: [email protected]
Ubuntu Feisty has oolite in Multiverse : http://packages.ubuntulinux.org/feisty/games/oolite
so you might be able to just get it via synaptic?
so you might be able to just get it via synaptic?
Just note that the repository version is an old version of Oolite and that newer ones exist...
My own attempt to play Ooline on my Ubuntu laptop seems to be failing due to stupid ATI driver issues...
My own attempt to play Ooline on my Ubuntu laptop seems to be failing due to stupid ATI driver issues...
Author of Tales from the Frontier - official Elite 4 anthology.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
-
- Average
- Posts: 9
- Joined: Wed May 30, 2007 8:04 am
Compiling dev-source release and SVN
I'm having the same problem using dpkg-buildpackage and make on both SVN and the 1.69.1 source release. Seems to go fine till this stage:
after which I got a screed of undefined references to 'JS_blah'
Any ideas what I'm missing gratefully received.
Code: Select all
Linking objc_program oolite ...
./shared_obj/OOJSScript.o: In function `-[OOJSScript initWithPath:andContext:]':
/home/chaddy/trunk/src/Core/Scripting/OOJSScript.m:91: undefined reference to `JS_GetGlobalObject'
/home/chaddy/trunk/src/Core/Scripting/OOJSScript.m:91: undefined reference to `JS_NewObject'
/home/chaddy/trunk/src/Core/Scripting/OOJSScript.m:96: undefined reference to `JS_AddRoot'
Any ideas what I'm missing gratefully received.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
You seem to be missing a recent enough version of the javascript library or you may not have the javascript import library installed at all. If you already have libjs.a (I believe that's what it's called, in Windows it is libjs32.a), make sure that the compiler is actually able to see inside the folder where it resides. In gcc, you need to pass to the linker the option -L[path to libjs.a] to make this happen. You can do this by editing the GNUmakefile and adding the option to the oolite_LIB_DIRS += line.
Also, make sure you have the most up to date headers for libjs.
Hope this helps.
Also, make sure you have the most up to date headers for libjs.
Hope this helps.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
The current repo/source tarball includes a version of libjs (sometimes known as libmozjs) in deps/Linux-x86-deps/oolite-deps/lib/libmozjs.so. For non-x86 targets, you’ll still have to find it or build it yourself. I had nolittle trouble getting it and building it for OS X.
E-mail: [email protected]
Re: Compiling dev-source release and SVN
I just got trunk to build vs. debian unstable. I didn't have to do anything funky, except, rename the reference to -ljs to -lmozjs in the GNUMakefile. So my problems of the other day are moot. Now let's just see how stable trunk is....chadlongstaff wrote:I'm having the same problem using dpkg-buildpackage and make on both SVN and the 1.69.1 source release. Seems to go fine till this stage:
after which I got a screed of undefined references to 'JS_blah'Code: Select all
Linking objc_program oolite ... ./shared_obj/OOJSScript.o: In function `-[OOJSScript initWithPath:andContext:]': /home/chaddy/trunk/src/Core/Scripting/OOJSScript.m:91: undefined reference to `JS_GetGlobalObject' /home/chaddy/trunk/src/Core/Scripting/OOJSScript.m:91: undefined reference to `JS_NewObject' /home/chaddy/trunk/src/Core/Scripting/OOJSScript.m:96: undefined reference to `JS_AddRoot'
Any ideas what I'm missing gratefully received.
-
- Average
- Posts: 9
- Joined: Wed May 30, 2007 8:04 am
-ljs to -lmozjs worked
Thanks for the help. Now it builds fine, and even runs. Still having some problems with OXPs, the current set I have are causing a Segmentation Fault, so I'll trawl round for some more up to date versions.
Using a truncated set of OXPs: Assassins.oxp, halsis.oxp, thargoidcarrier.oxp, BlackMonks.oxp, hOopyCasino.oxp, thargoid_wars.oxp, Cargo_wrecks_teaser.oxp, military.oxp, Thorgorn_Threat.oxp, dwcobra3.oxp, nuke.oxp, x-ships.oxp, Freaky Thargoids 3.oxp, Ore_processor.oxp, Fuel Tank v2.0.oxp, Python Class Cruiser 2.6.oxp
Working perfectly, actually more stable for me than 1.65 has been.
Using a truncated set of OXPs: Assassins.oxp, halsis.oxp, thargoidcarrier.oxp, BlackMonks.oxp, hOopyCasino.oxp, thargoid_wars.oxp, Cargo_wrecks_teaser.oxp, military.oxp, Thorgorn_Threat.oxp, dwcobra3.oxp, nuke.oxp, x-ships.oxp, Freaky Thargoids 3.oxp, Ore_processor.oxp, Fuel Tank v2.0.oxp, Python Class Cruiser 2.6.oxp
Working perfectly, actually more stable for me than 1.65 has been.
Don't forget to use apt-get build-dep oolite oolite-data
That'll (in theory) install all the required tools (for 1.65-- have they changed for 1.69.1?) I'm on Debian 4.0 (Etch) on AMD64. The distribution version seems to have built OK, though there were some warnings and I haven't tested if it installs, works, etc. I haven't got the trunk to build yet, but I'll be trying that next.
The commands I used were
fakeroot apt-get --build source oolite
fakeroot apt-get --build source oolite-data
The commands I used were
fakeroot apt-get --build source oolite
fakeroot apt-get --build source oolite-data
Ran dpkg-buildpackage in trunk/
It told me I needed gnustep-core-devel and libmozjs-dev, so I ran
aptitude install gnustep-core-devel libmozjs-dev
Started to compile (with a few warnings), but then I got
Edited GNUmakefile, changed -ljs to -lmozjs as Shade suggested, and removed ../oolite_1.69* in case this was preventing my change from taking effect. Same error.
I found a libjs.a in the package libjs0-dev, so I installed it and changed -lmozjs back to -ljs, but that didn't seem to help either.
libmozjs-dev in Etch is version 1.8.0.13-pre070702 Is this not backwards compatible with 1.7?
aptitude install gnustep-core-devel libmozjs-dev
Started to compile (with a few warnings), but then I got
Code: Select all
Compiling file src/Core/Scripting/OOScript.m ...
Compiling file src/Core/Scripting/OOJSScript.m ...
src/Core/Scripting/OOJSScript.m: In function ‘-[OOJSScript initWithPath:properties:context:]’:
src/Core/Scripting/OOJSScript.m:184: warning: pointer type mismatch in conditional expression
Compiling file src/Core/Scripting/OOJavaScriptEngine.m ...
src/Core/Scripting/OOJavaScriptEngine.m: In function ‘-[OOJavaScriptEngine init]’:
src/Core/Scripting/OOJavaScriptEngine.m:167: error: ‘JSVERSION_1_7’ undeclared (first use in this function)
src/Core/Scripting/OOJavaScriptEngine.m:167: error: (Each undeclared identifier is reported only once
src/Core/Scripting/OOJavaScriptEngine.m:167: error: for each function it appears in.)
make[2]: *** [shared_obj/OOJavaScriptEngine.o] Error 1
make[1]: *** [oolite.all.objc-program.variables] Error 2
make[1]: Leaving directory `/home/user/software_products/oolite/trunk'
make: *** [build] Error 2
I found a libjs.a in the package libjs0-dev, so I installed it and changed -lmozjs back to -ljs, but that didn't seem to help either.
libmozjs-dev in Etch is version 1.8.0.13-pre070702 Is this not backwards compatible with 1.7?
Last edited by jynx on Sat Sep 22, 2007 12:58 pm, edited 1 time in total.