Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Compiling, Linking and Running issues on Linux x64
brita Offline
Junior Member

Posts: 2
Threads: 1
Joined: Oct 2012
Reputation: 0
#1
Compiling, Linking and Running issues on Linux x64

I've had several troubles in my attempts to get Overture to work. Some of my problems are solved and some don't:

First of all,
building and linking as 32bits
I used the suggested cmake command:
$ cmake -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_C_FLAGS=-m32 -DCMAKE_LD_FLAGS=-m32 .
and it states -DCMAKE_LD_FLAGS is not used

Then it gives some warnings like such:
Cannot generate a safe linker search path for target Overture because files in some directories may conflict with libraries in implicit directories:
link library [libogg.so] in /usr/lib64 may be hidden by files in
/path/frictionalGames/PenumbraOverture/../dependencies/lib/linux
for ogg, vorbis and vorbisfile.

I checked the cache variables, and it was using my system libs and not the local dependencies libs
OGG_LIBRARY:FILEPATH=/usr/lib64/libogg.so

After compiling, linking fails because this libraries are incompatible (it's trying to use the 64bit libs after all).

I solved this by adding to PenumbraOverture CMakeLists.txt:
set(PRIVATE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/lib/linux)

All variables are now fine, no warnings, and everything links properly too.

compiling errors
1
in file LowLevelSystemSDL.cpp, line 636
error: 'symlink' was not declared in this scope
I solved this by adding "#include " on a #ifndef WIN32
was it supposed to work without this?

2
I also got this kind of errors:
/path/frictionalGames/HPL1Engine/sources/graphics/Renderer2D.cpp: In member function 'int hpl::cRenderer2D::CreateVertexes(hpl::cVector2f, hpl::cRect2f, float, bool, hpl::cVector2f, hpl::tVertexVec*, hpl::cColor, int, float)':/path/frictionalGames/HPL1Engine/sources/graphics/Renderer2D.cpp:923:72: error: taking address of temporary [-fpermissive]
for lines 898, 899, 903, 904 and 923.

I assume this is due to me using a more recent version of gcc, so I just passed the -fpermissive flag. I also used the flag -Wno-conversion-null as it complains a lot from some casts (just warnings, though).
cmake -DCMAKE_CXX_FLAGS="-m32 -fpermissive -Wno-conversion-null" -DCMAKE_C_FLAGS="-m32" .

3
Finally overloading errors on stdstring.cpp and scriptstring.cpp. It looks similar to http://www.frictionalgames.com/forum/thread-18662.html
I fought this for hours, but just ended up commenting the offending lines (all regard the operator==). I encountered no solution for this.

Running
So now it compiles and links, but when I try to run it, I just get:
overture.bin: /path/frictionalGames/PenumbraOverture/../dependencies/lib/linux/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by overture.bin)

From all the other posts I read, I assumed it was possible to compile this with up to date glibc. Am I wrong?
10-25-2012, 12:40 PM
Find Reply
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#2
RE: Compiling, Linking and Running issues on Linux x64

Remove the libstdc++.so.6 to fix your GLIBCXX_3.4.15 not found error. That issue there is caused by other system libraries that use the stdc++ expecting the system libstdc++. As for the missing header, this was built against a much older system originally which probably included symlink in a different header indirectly.

And the compiler warnings are likewise similarly caused by a newer more picky GCC as compared to OLD GCC I originally used (from a Fedora 4 based system)

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
10-25-2012, 02:51 PM
Website Find Reply
brita Offline
Junior Member

Posts: 2
Threads: 1
Joined: Oct 2012
Reputation: 0
#3
RE: Compiling, Linking and Running issues on Linux x64

And, voilà : Segmentation fault.
But no longer problems with GLIBCXX

Could this possibly be from commenting the lines:
r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL,       "bool f(string &in, string &in)", asFUNCTIONPR(operator==, (const string &, const string &), bool), asCALL_CDECL); assert( r >= 0 );
stdstring.cpp (162)

and
r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL,       "bool f(const string &in, const string &in)",    asFUNCTIONPR(operator==, (const string &, const string &), bool), asCALL_CDECL); assert( r >= 0 );
scriptstring.cpp (611)
10-25-2012, 03:24 PM
Find Reply




Users browsing this thread: 1 Guest(s)