Dependencies

4 views
Skip to first unread message

AF

unread,
Oct 27, 2008, 12:42:13 PM10/27/08
to Spring On OS X
We need to collect dependencies spring needs and figure out their
appropriate Mac counterparts, as well as identify those dependencies
that are not supported on Mac, IIRC DevIL is one such library, but
that will need checking.

Jack Overfull

unread,
Oct 27, 2008, 12:49:50 PM10/27/08
to Spring On OS X
You can build DevIL on mac too. I managed to build it last year, while
i was trying to build spring...

Rodney Degracia

unread,
Oct 27, 2008, 12:55:10 PM10/27/08
to spring-...@googlegroups.com

I am able to successfully build Boost on the Mac (thanks to a script
someone wrote on the web, that I downloaded).


Sharkey

Rodney Degracia

unread,
Oct 27, 2008, 3:46:58 PM10/27/08
to spring-...@googlegroups.com

The Visual Studio 2005 Spring engine build, may be the easiest to
build at the moment. I think from VS2005 engine build, we can
determine what exactly the VS2005 dependencies are and then determine
which are currently needed for Spring on OS X.


Sharkey


On Oct 27, 2008, at 12:42 PM, AF wrote:

Jack Overfull

unread,
Oct 28, 2008, 12:23:14 PM10/28/08
to Spring On OS X
Isn't visual studio a ms thing? the unix version of spring, wich is
reported to build on linux and freebsd, should build on os x too with
minor changes, although it will not look a lot like a mac os x app...

unluckily currently i'm following 2 projects and have a lot of other
projects in my queue, so i can't afford to dedicate much time to this
right now, but i was able to build all the needed libs last year, the
main problem was in the spring code itself (nothing that cannot be
fixed, anyway).

Rodney Degracia

unread,
Oct 28, 2008, 12:32:17 PM10/28/08
to spring-...@googlegroups.com
Jack,

You have a good point about building the *nix version of Spring, to
get the dependency list, since OS X has a Unix compliant core.


Sharkey

Rodney Degracia

unread,
Oct 30, 2008, 3:41:51 PM10/30/08
to Spring On OS X
After a few hours, I finally got Spring 0.77b5 to compile on Debian.
I will need to re-verify my procedure, so that we can replicate the
process. Unfortunately, this was done on a virtual machine and when I
try to run the spring binary, there is a video driver error.

Have either of you successfully compiled the latest Spring on your
*nix distribution of choice?


Once I verify the procedure, I can reply with the dependency list for
Debian and then from that we can determine what dependencies we need
to compile for OS X.


Sharkey

AF

unread,
Nov 5, 2008, 1:30:44 PM11/5/08
to Spring On OS X
Okay no progress appears to be being made, can we have:

1) How to build DevIL
2) Any other libraries/binaries

Rodney Degracia

unread,
Nov 5, 2008, 3:12:19 PM11/5/08
to spring-...@googlegroups.com
I apologize for the delay.

It took a while, but I was able to get Spring 0.77b5 to compile on
Debian.

The main problem is twofold:

a) GCC 4.3 is not available on Debian Etch, but required to compile
Spring
b) free-java-sdk is not available on Debian Lenny (beta2), but
necessary for Spring bindings

The solution is to install onto Debian Etch the necessary packages to
compile boost and cmake, then update GCC to v4.3 and install the
remaining packages and finally compiling Spring source.


Here are the steps I've taken, taken from my notes. This MUST be peer
verified, by another developer, to replicate the procedure and make
sure I did not leave out any steps.

Please reply with your results.


Sharkey

------

This was done on a VMware instance Debian Etch stable 4.0, installed
via network installation.


1) Install Debian Etch (stable 4.0) and specify the Base install +
Workstation install

1a) Log into X and open a terminal window


2) Make sure the apt cache is current:
apt-get update

2a) Install the Etch essential build tools

apt-get install build-essential

2b) Be sure to install SSHD:
apt-get install ssh


2c) From another workstation, you SSH into the Debian Etch workstation
and continue the remaining steps from within the ssh session.


3a) SSH into the Debian Etch workstation and su

3b) Install the following packages, required for the full build/
installation of Boost 1.36:

apt-get install libbz2-dev
apt-get install python-all-dev
apt-get install zlib1g-dev

4) Download Boost 1.36.0 and extract and build and install it:

tar xvfz boost-1.36.0.tar.gz
cd boost-1.36.0
./configure
make
make install

5) Create a link from /usr/include/boost to /usr/local/include/
boost_1_36_0/boost

ln -s /usr/local/include/boost-1_36/boost /usr/include/boost


6) Download Cmake 2.6.2 and extract and build and install it

tar xvfz cmake-2.6.2.tar.gz
cd cmake-2.6.2
./bootstrap
make
make install


7a) Install the Java SDK, so that we have Java source headers

apt-get install free-java-sdk


7b) Install the following packages, required for build of Spring on
Debian (note: zlib1g-dev is necessary for Spring, but it was already
installed in step 3 so we could build Boost)


apt-get install liboggz1-dev
apt-get install libvorbis-dev
apt-get install libsdl1.2-dev
apt-get install libglew1.5-dev
apt-get install libfreetype6-dev
apt-get install libdevil-dev
apt-get install libopenal-dev
apt-get install libbz2-dev

7c) Make sure that the X headers are available, since Cmake will
complain if they are missing

apt-get install xorg-dev


8) Now we upgrade the GCC to version 4.3

8a) Update and write the /etc/apt/sources.list folder so that it as
follows:
#
# deb cdrom:[Debian GNU/Linux 4.0 r5 _Etch_ - Official i386 NETINST
Binary-1 20081024-15:53]/ etch contrib main

#deb cdrom:[Debian GNU/Linux 4.0 r5 _Etch_ - Official i386 NETINST
Binary-1 20081024-15:53]/ etch contrib main

deb http://ftp.us.debian.org/debian/ lenny main
deb-src http://ftp.us.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib

8b) Update the apt-get cache so that it is current with Lenny

apt-get update


8c) Install the GCC 4.3, which is part of the Lenny essential build
tools

apt-get install build-essential


8d) When prompted to restart services, select OK or YES


11) Re-install the following packages, so that they are current with
Lenny:

apt-get install libbz2-dev
apt-get install python-all-dev


11a) When prompted to restart services always select OK or YES

11b) Install the following, to be current with Lenny:
apt-get install zlib1g-dev


12) Download, extract, and build the Spring 0.77b5 source code

tar xvf spring_0.77b5_src.tar
cd spring_0.77b5_src
/usr/local/bin/cmake .
make
make install

If all goes well, the spring binary will be in /usr/local/bin and the
various spring files will be in /usr/local/share/spring


Here is the Debian package dependencies as well as the version numbers

-----------------------------------------
Boost 1.36.0 package dependencies (Etch):

libbz2-dev 1.0.5-1
python-all-dev 2.5.2-2
zlib1g-dev 1.2.3.3.dfsg-12


------------------------------------------
Spring 0.77b5 package dependencies (Lenny):

zlib1g-dev 1.2.3.3.dfsg-12
liboggz1-dev 0.9.8-1
libvorbis-dev 1.2.0.dfsg-3.1
xorg-dev 7.3+18
libsdl1.2-dev 1.2.13-2
libglew1.5-dev 1.5.0dfsg1-3
libfreetype6-dev 2.3.7-2
libdevil-dev 1.6.8-rc2-3
libopenal-dev 1.4.272-2

Jack Overfull

unread,
Nov 6, 2008, 11:26:22 AM11/6/08
to Spring On OS X


On Nov 5, 9:12 pm, Rodney Degracia <rdegr...@gmail.com> wrote:
> I apologize for the delay.
>
> It took a while, but I was able to get Spring 0.77b5 to compile on  
> Debian.
>
> The main problem is twofold:
>
> a) GCC 4.3 is not available on Debian Etch, but required to compile  
> Spring

This chan be a problem: gcc-4.3 is currently not available on s x too
(latest release of apple gcc is 4.2) and i'm not sure that it is able
to build working mac os x binaries.
We'll have to build it first and hope that it works or we'll have to
wait for the next gcc release by apple (and that can be a lot of
time…) or manage to build spring with gcc 4.2.

> b) free-java-sdk is not available on Debian Lenny (beta2), but  
> necessary for Spring bindings
>
Anyway, java sdks are available on os x (and not strictly necessary
for spring, as you wrote).

> The solution is to install onto Debian Etch the necessary packages to  
> compile boost and cmake, then update GCC to v4.3 and install the  
> remaining packages and finally compiling Spring source.
>
we'll have to to a similar thing.


> 2b) Be sure to install SSHD:
> apt-get install ssh
>
> 2c) From another workstation, you SSH into the Debian Etch workstation  
> and continue the remaining steps from within the ssh session.
>
> 3a) SSH into the Debian Etch workstation and su

why did you do that?

> apt-get install free-java-sdk
>
Didn't you wrote that java wasn't necessary?

> apt-get install liboggz1-dev
> apt-get install libvorbis-dev
Are that used in the build process?
Last time i built those libs weren't used, but maybe in the new
version they are…


Thanks for your contribution.

AF

unread,
Nov 6, 2008, 11:45:12 AM11/6/08
to Spring On OS X
Java is required for the JNI bindings in untisync that i wrote, in
particular the line that includes jni.h

However this dependency can eb removed by using the JNA library, for
which I experimented a little only to find 32bit unitsync + 64bit
windows + 64bti java == barf, and any JNA bindings would require a
little work

Rodney Degracia

unread,
Nov 7, 2008, 10:49:23 AM11/7/08
to spring-...@googlegroups.com
The reason why I SSH into the Debian Etch workstation is because, I
have a VMware server and the Debian Etch workstation it is a VMware
instance. I am using SSH to connect to it rather than the VMware UI
window which is rather small.


It seems Java is necessary for Spring bindings. However Java SDK
package is not available for Debian Lenny RC2, but is available for
Debian Etch.


Ogg and Vorbis are necessary for the latest Spring build.

Sharkey


On Nov 6, 2008, at 11:26 AM, Jack Overfull wrote:

>
>
>
> On Nov 5, 9:12 pm, Rodney Degracia <rdegr...@gmail.com> wrote:

>> <SNIP>

AF

unread,
Nov 7, 2008, 10:54:56 AM11/7/08
to Spring On OS X
We can remove java as a dependency. The projects that require the java
bindigns can use the java JNA library instead as a means to access the
C API of unitsync instead.

AF

unread,
Nov 7, 2008, 5:23:25 PM11/7/08
to Spring On OS X
Can somebody sort out the DevIL library? I cant find reference to this
script to build it and DevIL gave me a huge headache the last time i
tried ot build it, and that was Windows + Visual Studio nevermind Mac
OS X

We need:

DevIL
boost 1.36
OpenAL
glew
sdl
bz2
Zlib
Ogg
Vorbis
Freetype
Glew
python

At the moment we have none of them.

Jack Overfull

unread,
Nov 8, 2008, 8:08:13 AM11/8/08
to Spring On OS X


On Nov 7, 4:49 pm, Rodney Degracia <rdegr...@gmail.com> wrote:
> The reason why I SSH into the Debian Etch workstation is because, I  
> have a VMware server and the Debian Etch workstation it is a VMware  
> instance. I am using SSH to connect to it rather than the VMware UI  
> window which is rather small.
>
ook...
> It seems Java is necessary for Spring bindings. However Java SDK  
> package is not available for Debian Lenny RC2, but is available for  
> Debian Etch.
>

we have them, anyway.
what version of the sdk is needed? 5 is enough or 6 is required?
because the jdk 6 is officially available on mac os x only on 64 bit
systems.

> Ogg and Vorbis are necessary for the latest Spring build.
OK, thanks.
No problem, anyway: they build and runs perfectly on os x.



On Nov 7, 11:23 pm, AF <taren...@gmail.com> wrote:
> Can somebody sort out the DevIL library? I cant find reference to this
> script to build it and DevIL gave me a huge headache the last time i
> tried ot build it, and that was Windows + Visual Studio nevermind Mac
> OS X
>
Trying to building it again.

>OpenAL
Comes with the system

>glew
i have it on my system. Probably still here from the last time.

>sdl
>bz2
>Zlib
comes with the system.

>Ogg
>Vorbis
Builds without problems.

>Freetype
comes with the system, if i recall it correctly.
If not, easily buildable.

>Glew
Again? :D

>python
2.5.2 comes with the system.

Jack Overfull

unread,
Nov 8, 2008, 8:11:49 AM11/8/08
to Spring On OS X
Turns out that boost is still installed on my system too. :D

Jack Overfull

unread,
Nov 8, 2008, 9:50:57 AM11/8/08
to Spring On OS X
Well, the current version of DevIL is really messy, it will not build
as it is on any unix machine.

I've downloaded the debian lenny version, with the debian patches:
http://packages.debian.org/lenny/libdevil-dev
then followed this path...

cd DevIL-1.6.8
patch -p0 < devil_1.6.8-rc2-3.diff
./configure
make

i had a problem only with include/IL/ilut.h:
"../../include/IL/ilut.h:237: error: syntax error before 'FileName'"
Wich is:

ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(Lstring FileName);

I changed it to
ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName);

but i'm not sure it's ok.
Anyway, now make and make install works and it seems installed.

How to test it?

Jack Overfull

unread,
Nov 8, 2008, 10:04:45 AM11/8/08
to Spring On OS X
I see that there are pre built binaries for cmake...

Jack Overfull

unread,
Nov 8, 2008, 10:17:36 AM11/8/08
to Spring On OS X
Installed cmake, trying to build spring.
I have boost 1.33.1, seems that i need a newer version...

Rodney Degracia, you said to make sure that xorg-dev is installed…but
it doesn't seems that significative, according to this:
http://packages.debian.org/lenny/all/xorg-dev/filelist

Jack Overfull

unread,
Nov 8, 2008, 10:18:51 AM11/8/08
to Spring On OS X

Never mind: it is a metapackage, right?

Rodney Degracia

unread,
Nov 8, 2008, 6:44:32 PM11/8/08
to spring-...@googlegroups.com


In regards to compiling Devil 1.7.0 and 1.7.1 and 1.7.2 on OS X 10.5.5:

1) The DevIL developer(s) (mistakenly?) released source that have
embedded ^M characters that make it difficult to compile the sources
under *nix systems.
2) The DevIL developer(s) specify in the CFLAGS the flag "-fgnu89-
inline" which is not supported by OS X gcc 4.0.1


The above two points have made it more difficult than usual to get
devIL compiled on Xcode

Sharkey

On Nov 5, 2008, at 1:30 PM, AF wrote:

Rodney Degracia

unread,
Nov 8, 2008, 6:57:06 PM11/8/08
to spring-...@googlegroups.com

I think for Debian Stable 4.0 (Etch), the xorg-dev package is
required, to build Spring.

When you update Etch to Lenny, it is best to reinstall the xorg-dev
package, since Lenny is constantly being updated.


Sharkey

Jack Overfull

unread,
Nov 9, 2008, 12:11:45 PM11/9/08
to Spring On OS X


On Nov 9, 12:44 am, Rodney Degracia <rdegr...@gmail.com> wrote:
> In regards to compiling Devil 1.7.0 and 1.7.1 and 1.7.2 on OS X 10.5.5:
>
> 1) The DevIL developer(s) (mistakenly?) released source that have  
> embedded ^M characters that make it difficult to compile the sources  
> under *nix systems.
> 2) The DevIL developer(s) specify in the CFLAGS the flag "-fgnu89-
> inline" which is not supported by OS X gcc 4.0.1
>
> The above two points have made it more difficult than usual to get  
> devIL compiled on Xcode
>
> Sharkey
>
Precisely.
With the debian diff it seems to build now.
I din't build with xcode, anyway.


>When you update Etch to Lenny, it is best to reinstall the xorg-dev
>package, since Lenny is constantly being updated.
OK, thanks.
I suppose that these aren't needed on os x.

Anyway, after several hours the build process of boost finished…
skipping 2 packages. I remember i had similar problems last time, but
i'll have to think a solution.
Since my new mac is scheduled to arrive tomorrow and i just finished
backing up everything i'll just wait for it before continuing.
Reply all
Reply to author
Forward
0 new messages