qubodup
Junior Member
Posts: 5
Threads: 2
Joined: Apr 2009
Reputation:
0
|
Let's compile Penumbra [Linux, CMake, 64bit]
Forum Announcement: READ FIRST! Welcome to the the Frictional Games Open Source Forums helped. So I could start compiling Penumbra.
What I did so far was
git clone http://github.com/FrictionalGames/HPL1Engine.git
git clone http://github.com/FrictionalGames/OALWrapper.git
git clone http://github.com/FrictionalGames/PenumbraOverture.git
and then I tried to compile Penumbra, but it asked for HPL1Engine, so I tried to compile HPL1Engine
cd HPL1Engine
cmake .
make
but I got:
[ 1%] Building CXX object CMakeFiles/HPL.dir/sources/resources/ScriptManager.cpp.o
In file included from /home/qubodup/src/git/HPL1Engine/sources/resources/ScriptManager.cpp:23:0:
/home/qubodup/src/git/HPL1Engine/include/system/Script.h:23:25: fatal error: angelscript.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/HPL.dir/sources/resources/ScriptManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/HPL.dir/all] Error 2
make: *** [all] Error 2
then I saw that you have to get dependencies.zip
so I downloaded it and unzipped it and then
cp dependencies/include/ HPL1Engine/ -r
cp dependencies/lib/ . -r
now `make` finishes. Time to compile Penumbra.
cd ../PenumbraOverture
cmake .
make
This nearly works (You have to install newton, a non-free physics library first) but unfortunately I'm getting following error
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../lib/libNewton.a when searching for -lNewton
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libNewton.a when searching for -lNewton
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../libNewton.a when searching for -lNewton
/usr/bin/ld: skipping incompatible /usr/lib/libNewton.a when searching for -lNewton
/usr/bin/ld: cannot find -lNewton
collect2: ld returned 1 exit status
make[2]: *** [overture.bin] Error 1
make[1]: *** [CMakeFiles/Overture.dir/all] Error 2
make: *** [all] Error 2
If you know how to solve this, please let me know, meanwhile I'm trying to get help on IRC and will keep you updated if I find a solution.
By the way, newton is installed in
/usr/lib/libNewton.a
/usr/include/Newton.h
on my machine.
Update:
I think copying lib/ and include/ to PenumbraOverture/ might help a little, but the basic problem seems to be that there is no 64bit Newton library (old version) and the new one won't work. What we need is a port to Bullet
Request:
Please add the following information to the open source announcement, that would be great. Quote this post to see the source.
IRC Channel
Feel free to use this unofficial channel to get real-time help for compiling Penumbra & co!
Server: irc.freenode.net
Channel: #penumbra
Web client link
|
|
05-14-2010, 02:09 PM |
|
Setlec
Junior Member
Posts: 25
Threads: 3
Joined: May 2010
Reputation:
0
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
AFAIK, Newton is a physics (φx, i'm lazy today... φ means "fi" in ancient Greek) engine a closed one btw! So if the src requires Newton to compile we might need port from newton φx to bullet φx for instance...
|
|
05-14-2010, 03:36 PM |
|
Urkle
FG - Associate
Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation:
21
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
The dependencies folde should be placed next to HPL1Engine as e cmake scripts reference ../dependencies/include and lib.
As for 64bit. The issue is newton 1.53 does not support 64bit nor does the version of angel script we using. Amnesia is using a newer angel script at do support 64bit and a newer newton. But the Apis are different so code we have to be updated in the hpl1engine code to support 64bit.
Re:newton vs bullet. Yes newton is closed and when talking with the least developer before about using bullet, apparently bullet does not support as much functionality as newton.. However the way the hpl1engine is written all on has to do is write a bullet implementation at conforms to the engines's physics interface and you can switch engines easily.. ( we used to have an fmod sound driver in there at one point too.)
Adding a bullet backend is definitely a project worth looking into if all the functionality can be done, as it would allow more openness of is engine..
Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
(This post was last modified: 05-14-2010, 03:56 PM by Urkle.)
|
|
05-14-2010, 03:41 PM |
|
cybersphinx
Junior Member
Posts: 4
Threads: 0
Joined: May 2010
Reputation:
0
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
I finally got a binary compiled, forcing a 32 bit build by adding add_definitions(-m32 -O2)
to all three CMakeList.txts, and set(CMAKE_EXE_LINKER_FLAGS "-m32")
to that in PenumbraOverture. It needs some 32 bit compiler stuff installed to actually work, on Debian the packages are libc6-dev-i386 and g++-4.4-multilib (for stubs-32.h and a 32 bit crtbegin.o). The resulting binary seems to run ok, but sometimes dies on exit with: (0) : fatal error C9999: *** exception during compilation ***
Cg compiler terminated due to fatal errorSegmentation fault
When adding -march=native to the compiler flags, it dies when trying to enter the "real" game, maybe with less optimization it wouldn't crash at all.
|
|
05-14-2010, 06:23 PM |
|
Urkle
FG - Associate
Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation:
21
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
yeah.. you can't do high optimizations or it goes "kaboom".
and the Cg error is probably from not running it in the penumbra game dir.
Do you mind sending a patch for the CmakeLists?
Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
|
|
05-14-2010, 06:47 PM |
|
cybersphinx
Junior Member
Posts: 4
Threads: 0
Joined: May 2010
Reputation:
0
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
I'm not sure those should be in the cmake files, since they are specific to 64 bit Linux systems. But cmake -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32 -DCMAKE_LD_FLAGS=-m32 .
also works, without having to change anything else.
|
|
05-14-2010, 08:01 PM |
|
Urkle
FG - Associate
Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation:
21
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
true true.. Probably need to add a custom CMake config setting to toggle force 32bit builds or not (for when someone makes a bullet physics port and updated angelscript and a 64bit build CAN be done)
Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
|
|
05-14-2010, 08:27 PM |
|
qubodup
Junior Member
Posts: 5
Threads: 2
Joined: Apr 2009
Reputation:
0
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
I'm getting following output when I try the 32bit compilation on 64bit Linux:
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /bin/gcc
-- Check for working C compiler: /bin/gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/qubodup/src/git/PenumbraOverture/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory
`/home/qubodup/src/git/PenumbraOverture/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/qubodup/src/git/PenumbraOverture/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o
/bin/gcc -m32 -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
/home/qubodup/src/git/PenumbraOverture/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/bin/gcc -m32 CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o
cmTryCompileExec -rdynamic
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/libgcc.a when searching for
-lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status
make[1]: *** [cmTryCompileExec] Error 1
make[1]: Leaving directory
`/home/qubodup/src/git/PenumbraOverture/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
|
|
05-15-2010, 04:52 PM |
|
Urkle
FG - Associate
Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation:
21
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
Do you have the 32bit compiler components installed?
Try a simple test application in 32bit mode ie.
#include <stdio.h>
int main(int argc, char *argv[]) {
printf ("test\n");
return 0;
}
And run it with
Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
|
|
05-15-2010, 05:30 PM |
|
cybersphinx
Junior Member
Posts: 4
Threads: 0
Joined: May 2010
Reputation:
0
|
RE: Let's compile Penumbra [Linux, CMake, 64bit]
Sounds like you don't have all needed 32 bit packages, find out which has the 32 bit libgcc and install that.
I also had to remove the libstdc++ from dependencies, since my libc was too new for that.
|
|
05-15-2010, 05:31 PM |
|
|