Topic: Ubuntu 64bits compilation failed

Hello,
I have got errors when I try to build "Maratis" on an Ubuntu 64bits.

svn checkout http://maratis.googlecode.com/svn/ maratis-read-only
cd maratis-read-only/trunk/dev/

I run :
python scons.py

and here my first error:

scons: Reading SConscript files ...
  File "/home/kao/maratis-read-only/trunk/dev/var/scons/platformcustom.py", line 3

SyntaxError: Non-ASCII character '\xc3' in file /home/kao/maratis-read-only/trunk/dev/var/scons/platformcustom.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

I just remove the accent on "févr" line 3 on platformcustom.py and I try another time.
python scons.py
And I get this message.

python scons.pyscons: Reading SConscript files ...
Build in release mode
Using 3rdparty libraries in folder: /home/kao/maratis-read-only/3rdparty
scons: done reading SConscript files.
scons: Building targets ...
o build/linux2/release/3rdparty/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.o -c -fpermissive -fPIC -DLINUX -Ibuild/linux2/release/3rdparty/bullet -I/home/kao/maratis-read-only/3rdparty/bullet /home/kao/maratis-read-only/3rdparty/bullet/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
sh: 1: o: not found
o build/linux2/release/3rdparty/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.o -c -fpermissive -fPIC -DLINUX -Ibuild/linux2/release/3rdparty/bullet -I/home/kao/maratis-read-only/3rdparty/bullet /home/kao/maratis-read-only/3rdparty/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
sh: 1: ................a lot of lines...
................/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.o build/linux2/release/3rdparty/bullet/BulletCollision/CollisionShapes/btConvexShape.o build/linux2/release/3rdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.o build/linux2/release/3rdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.o
ar: build/linux2/release/3rdparty/bullet/BulletCollision/CollisionShapes/btConvex2dShape.o: No such file or directory
scons: *** [build/linux2/release/3rdparty/bullet/libbullet.a] Error 1
scons: building terminated because of errors.

The script seems to not find files.

Regards.
Kao

Last edited by kao_chen (2012-01-20 11:04:23)

Re: Ubuntu 64bits compilation failed

thank you for reporting,
if I have an idea I'll let you know.

Re: Ubuntu 64bits compilation failed

Thanks, I will check your next updates, I really appreciate the software.

In my problem, each commands begin with the letter "o"
o build/linux2/release/3rdpart......
And the script seems to believe that "o" is a real file, and in consequence says:
sh: 1: o: not found

I tried to find the misterious "o" in the scons scripts but I don't see where does it come from.

Regards
kao

Re: Ubuntu 64bits compilation failed

Just to make it sure, do you have gcc?
or install build-essential?

Re: Ubuntu 64bits compilation failed

it's working better with build-essential installed wink
So now I  use  this:
sudo apt-get install libopenal-dev libalut-dev scons subversion gcc build-essential
svn checkout http://maratis.googlecode.com/svn/ maratis-read-only
cd maratis-read-only/trunk/dev
python scons.py


but I still have errors   in the compilation process:

gcc -o build/linux2/release/3rdparty/glee/GLee.o -c -fPIC -DLINUX -Ibuild/linux2/release/3rdparty/glee -I/home/kao/maratis-read-only/3rdparty/glee /home/kao/maratis-read-only/3rdparty/glee/GLee.c
In file included from /home/kao/maratis-read-only/3rdparty/glee/GLee.c:43:0:
/home/kao/maratis-read-only/3rdparty/glee/GLee.h:66:20: fatal error: GL/gl.h: No such file or directory
compilation terminated.
scons: *** [build/linux2/release/3rdparty/glee/GLee.o] Error 1
scons: building terminated because of errors

Perhaps a problem with mesa? I think the error comes from this block of the GLee.h file:

#ifdef WIN32
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #include <GL/gl.h>
#elif defined(__APPLE__) || defined(__APPLE_CC__)
    #define GL_GLEXT_LEGACY
    #include <OpenGL/gl.h>
#else // GLX
    #define __glext_h_  /* prevent glext.h from being included  */
    #define __glxext_h_ /* prevent glxext.h from being included */
    #define GLX_GLXEXT_PROTOTYPES
    #include <GL/gl.h>
    #include <GL/glx.h>

I tried to find gl.h without success with:
locate gl.h
It's missing, I'll try to find out more about this file.
regards
Kao

Re: Ubuntu 64bits compilation failed

you need to install a opengl dev package or something like that

Re: Ubuntu 64bits compilation failed

Ok, I needed the libgl1-mesa-dev and also libxxf86vm-dev to continue.

I am stopped after that, with this error

/usr/bin/ld: skipping incompatible /home/kao/maratis-read-only/3rdparty/openal/linux/libopenal.so when searching for -lopenal
/usr/bin/ld: skipping incompatible /home/kao/maratis-read-only/3rdparty/libsndfile/linux/libsndfile.so when searching for -lsndfile
/usr/bin/ld: skipping incompatible /home/kao/maratis-read-only/3rdparty/libsndfile/linux/libsndfile.a when searching for -lsndfile
/usr/bin/ld: cannot find -lsndfile
collect2: ld returned 1 exit status
scons: *** [build/linux2/release/Examples/ManualUse/ManualUse] Error 1
scons: building terminated because of errors.

The libs are already installed,

locate libopenal.so libsndfile.so

/usr/lib/x86_64-linux-gnu/libopenal.so
/usr/lib/x86_64-linux-gnu/libopenal.so.1
/usr/lib/x86_64-linux-gnu/libopenal.so.1.13.0
/usr/lib/x86_64-linux-gnu/libsndfile.so.1
/usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25


But I suspect that the scons have problem with them because they are build for an 64bits platform.

I tried to fool it with this, but without success:
sudo ln -s x86_64-linux-gnu/libopenal.so lib32/libopenal.so

I could try to install the lib32 but it will not solve the real problem, in my opinion.
Regards
Kao

Re: Ubuntu 64bits compilation failed

You need openal to compile Maratis and, as Maratis is 32bit, trying to link to x64 won't work. Also, there is a copy of libsndfile provided with Maratis itself, using one in /usr/lib(32) will possibly create problems.

Why do you think the lib32 won't solve the problem?