How to build Oolite source on Ubuntu

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: winston, another_commander, Getafix

User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: How to build Oolite source on Ubuntu

Post by Gimi »

From the Berlios main page:
BerliOS: Technical improvements and cooperation with SourceForge

Dear BerliOS developers and users,

Since announcing that BerliOS will continue to operate, the BerliOS team has worked hard to improve the portal. Among the technical improvements at BerliOS is the new NFS file server with increased storage capacity. The transfer of other services to the new hardware is in progress. In addition, automatic snapshots were introduced, so that accidentally deleted files can be restored easily by the user. Snaphots are available every hour, every week and every month under /net/nfs-bd/vol1/.zfs/snapshot.

In order to guarantee safe operation and maintain download availability to the user, BerliOS needed mirror servers. For this purpose, a cooperation agreement was signed with SourceForge. The main focus of the collaboration is to utilize SourceForge’s global mirror network for BerliOS downloads. Primary and secondary SourceForge mirrors are available for BerliOS users as of February 18th, 2012. Moreover, for each BerliOS project there is now a corresponding project website available on SourceForge under the URL http://sourceforge.net/projects/${name}.berlios/. This makes it possible to load files, even if the BerliOS project server is offline. An automatic redirection to the local BerliOS Download Server is provided:

- at a total black-out of SourceForge,
- if a file can not be found on the mirror, or
- if a download is requested from a U.S. export embargo country.

All downloads on SourceForge can be reviewed using the new comprehensive statistics package at SourceForge. A sample project is available at http://sourceforge.net/projects/avidemux.berlios/files, and sum statistics can be found under https://sourceforge.net/projects/avidem ... s/timeline.

The BerliOS Community is currently drafting a statute which will create a clear structure of the future Association that will govern the operation of the platform. You'll find all the details on the creation of this association on the BerliOS Mailing list: https://lists.berlios.de/mailman/listin ... ios-verein.

Fraunhofer FOKUS
http://www.fokus.fraunhofer.de
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Lone_Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 546
Joined: Wed Aug 08, 2007 10:59 pm
Location: Netherlands

Re: How to build Oolite source on Ubuntu

Post by Lone_Wolf »

thanks for the info, gimi .
seems i was right that sourceforge is now the primary source for oolite files, but we still should goto berlios to find them.
OS : Arch Linux 64-bit - rolling release

OXPs : My user page

Retired, reachable at [email protected]
Halfhand
Competent
Competent
Posts: 32
Joined: Thu Jan 17, 2013 6:07 pm

Re: How to build Oolite source on Ubuntu

Post by Halfhand »

Hi

This thread is quite old now and only refers to 1.75.x, but because its a sticky I thought I'd update it with some new years joy :)

I'm running Linux Mint 13 KDE 64 bit and already have 1.77 installed for all users with lots of OXPs.

I've successfully built and run 1.77 from source based on info in this thread, building and running didn't affect my install and i can run either one independently, nice because I intend trying my hand at a few changes. without affecting my installed game.

I got the source from svn.berlios.de/svnroot/repos/oolite-linux/tags/1.77 and built it in ~/oolite-source like this

Code: Select all

sudo apt-get install gobjc gnustep-core-devel libsdl-mixer1.2-dev subversion libespeak-dev libnspr4-dev curl libgnustep-base-dev libsdl-image1.2-dev libglu1-mesa-dev
added this to .bashrc

Code: Select all

#GNUSTEP Environment vars
. /usr/share/GNUstep/Makefiles/GNUstep.sh
and created the AddOns folder in ~/.Oolite and copied the debug oxp there from the source folder.

then buit and ran it

Code: Select all

 make -f Makefile release
  oolite.app/oolite


sweet :)
_____________________________
When the revolution comes, stand clear of all walls!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: How to build Oolite source on Ubuntu

Post by Diziet Sma »

Sweet indeed.. good to hear it all went painlessly.. 8)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Halfhand
Competent
Competent
Posts: 32
Joined: Thu Jan 17, 2013 6:07 pm

Re: How to build Oolite source on Ubuntu

Post by Halfhand »

oh noes, there is a little overlap.

My installed game also searches ~/.Oolite/AddOns so it sees any OXPs that are installed for my compiled version.

not the other way round though, the compiled version can't see any OXPs in my installed game.
_____________________________
When the revolution comes, stand clear of all walls!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: How to build Oolite source on Ubuntu

Post by JensAyton »

Getafix [first post] wrote:

Code: Select all

sudo apt-get install gobjc gnustep-core-devel libsdl-mixer1.2-dev subversion libespeak-dev libnspr4-dev curl
Setting up a new VM, I noticed that g++ is missing from this list.
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Re: How to build Oolite source on Ubuntu

Post by Getafix »

Most probably until Ubuntu 10.04 g++ was brought in automatically as a dependency from the rest of the packages.
I will recheck and update accordingly if needed.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: How to build Oolite source on Ubuntu

Post by Diziet Sma »

My experiences this evening trying to compile the 1.79 source from github on Linux Mint 15, Cinnamon Desktop, 32 bit.


Per the list of dependencies in the first post (and some others mentioned here and there in the Nightly thread), I have:

gobjc 4:4.7.3-1ubuntu10
gnustep-core-devel 7.7
libgnustep-base-dev 1.24.0-1ubuntu1
libsdl-mixer1.2-dev 1.2.12-3
libespeak-dev 1.46.02-2ubuntu1
libnspr4-dev 2:4.9.5-1ubuntu1
libglu1-mesa-dev 9.0.0-0ubuntu1

My .bashrc has had the following appended:

Code: Select all

#GNUSTEP Environment vars
. /usr/share/GNUstep/Makefiles/GNUstep.sh
I installed SmartGit3 and cloned the https://github.com/OoliteProject/oolite repository.

I opened a bash terminal at the source root, and on trying
cim wrote:
Try doing "make -f Makefile pkg-debtest"
I got the following error:

Code: Select all

make: debuild: Command not found
make: *** [pkg-debtest] Error 127
A search on the debuild error turned up that I also needed devscripts, "scripts to make the life of a Debian Package maintainer easier".

I installed devscripts, and on re-running make -f Makefile pkg-debtest I then got this:

Code: Select all

/bin/sh: 1: ../configure: not found
make[1]: *** [deps/mozilla/js/src/build-release/config_stamp] Error 127
make[1]: Leaving directory `/home/diziet/Projects/oolite'
make: *** [build-libjs-stamp] Error 2
debuild: fatal error at line 1339:
couldn't exec fakeroot debian/rules: 
make: *** [pkg-debtest] Error 2
which, ignoring the ../configure: not found error for the time being, looked to me like it might be a Mozilla SpiderMonkey problem, so I installed libmozjs185-dev and tried again.

The result was exactly as before, so I daresay SpiderMonkey was not the source of my problems.

The full output of my last attempt looks as follows. I'm currently searching for the reason for the ../configure: not found error, but not having much luck.

Code: Select all

diziet@Asus-Laptop ~/Projects/oolite $ make -f Makefile pkg-debtest
cat debian/changelog.in | sed -e "s/@@VERSION@@/1.79.0-130829/g" -e "s/@@REVISION@@/0~test0/g" -e "s/@@TIMESTAMP@@/Thu, 29 Aug 2013 03:35:25 +1000/g" > debian/changelog
debuild binary
make -f libjs.make use_deps=no ESPEAK=yes debug=no OO_JAVASCRIPT_TRACE=no
make[1]: Entering directory `/home/diziet/Projects/oolite'

Configuring Javascript library...

mkdir -p deps/mozilla/js/src/build-release
cd deps/mozilla/js/src/build-release && ../configure --disable-shared-js --enable-threadsafe --with-system-nspr --disable-tests
/bin/sh: 1: ../configure: not found
make[1]: *** [deps/mozilla/js/src/build-release/config_stamp] Error 127
make[1]: Leaving directory `/home/diziet/Projects/oolite'
make: *** [build-libjs-stamp] Error 2
debuild: fatal error at line 1339:
couldn't exec fakeroot debian/rules: 
make: *** [pkg-debtest] Error 2
Any thoughts on why javascript won't configure?
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: How to build Oolite source on Ubuntu

Post by Diziet Sma »

Thanks to a clue from another_commander
another_commander wrote:
3. The repository will be cloned inside the folder 'oolite'. Once it's done, there are some submodules that need to be dealt with. Do:
git submodule update --init

This will get you the complete source tree, including any and all binary resources (textures, sounds, dependency dlls etc.).
the errors I referred to above have been resolved.. the code now compiles. 8)

The executable runs, and the game plays.. 8) 8)

However, at the end of the compilation process, when it attempts to build an installer package, a new error appears..

Code: Select all

dh_builddeb -a
dpkg-deb: building package `oolite' in `../oolite_1.79.0-130829-0~test0_i386.deb'.
dh_testdir
dh_testroot
dh_installchangelogs -i Doc/CHANGELOG.TXT
dh_installdocs -i
dh_install -i
cp: cannot stat ‘./oolite.app/Resources/oolite-document.icns’: No such file or directory
dh_install: cp -a ./oolite.app/Resources/oolite-document.icns debian/oolite-data/usr/lib/GNUstep/Applications/oolite.app/Resources/ returned exit code 1
make: *** [binary-indep] Error 2
debuild: fatal error at line 1339:
couldn't exec fakeroot debian/rules: 
make: *** [pkg-debtest] Error 2
garryck@Asus-Laptop ~/Projects/oolite $ 
It turns out that a 'test' installer package has been created, but opening it with GDebi produces the following error:

Code: Select all

Error: Dependency is not satisfiable: oolite-data
(>=1.79.0-130829-0~test0)
I'm hoping somebody can throw some light on this.. in the meantime, I think I'll do make -f Makefile clean and try a regular make -f Makefile pkg-posix-snapshot and see how it goes.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: How to build Oolite source on Ubuntu

Post by JensAyton »

I suspect you can fix that by removing the oolite.app/Resources/oolite-icon.icns line from debian/oolite-data.install. Icns files are Mac OS X-specific, I don’t think you need them.

That said, I don’t know if the debian package is expected to work; it was last updated two years ago.
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Re: How to build Oolite source on Ubuntu

Post by Getafix »

Just to remind that if you use pkg-posix Makefile options, the package will most probably NOT work.
Perhaps it will work on an environment that is pretty much the same as the machine used to build the package.

The problem is that the oolite binary is built using the linux environment libraries, however,
it is distributed with the libraries in deps/Linux-deps/x86[_64]/lib . Confused? :?

This means that when oolite will be executed, it is instructed to get the libraries from

Code: Select all

export LD_LIBRARY_PATH=${OOLITE_ROOT}/oolite-deps/lib
However, these are not the libraries used to build the oolite executable and it will fail.

To circumvent this, I have setup a Linux 8.04 development environment (vbox),
where I have compiled and installed from source, all the libraries distributed.
This environment is also used for the nightly build.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: How to build Oolite source on Ubuntu

Post by Diziet Sma »

JensAyton wrote:
I suspect you can fix that by removing the oolite.app/Resources/oolite-icon.icns line from debian/oolite-data.install. Icns files are Mac OS X-specific, I don’t think you need them.

That said, I don’t know if the debian package is expected to work; it was last updated two years ago.
Ok.. that works.. 3 lines need to be removed though.

Code: Select all

oolite.app/Resources/oolite-document.icns           usr/lib/GNUstep/Applications/oolite.app/Resources
oolite.app/Resources/oolite-expansion-document.icns usr/lib/GNUstep/Applications/oolite.app/Resources
oolite.app/Resources/oolite-icon.icns               usr/lib/GNUstep/Applications/oolite.app/Resources
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: How to build Oolite source on Ubuntu

Post by Diziet Sma »

Given that we've been using Git rather than SVN for a while now, perhaps it's time the Original Post was updated to reflect the current situation, rather than having to read through the entire thread to try and piece things together.. :wink:

An overview of how to check out and compile various branches would be nice to have, too..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Getafix
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 979
Joined: Tue Apr 01, 2008 12:55 pm
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
Contact:

Re: How to build Oolite source on Ubuntu

Post by Getafix »

It's in the To-Do list, but for a strange reason it is being continuously pushed back. :(
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: How to build Oolite source on Ubuntu

Post by Diziet Sma »

I can relate to that.. my own 'to-do' list is both long and in a continual state of flux.. :lol:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply