![]() |
Compiling, Linking and Running issues on Linux x64 - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html) +--- Forum: HPL1 Engine (https://www.frictionalgames.com/forum/forum-28.html) +--- Thread: Compiling, Linking and Running issues on Linux x64 (/thread-18918.html) |
Compiling, Linking and Running issues on Linux x64 - brita - 10-25-2012 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: Code: Cannot generate a safe linker search path for target Overture because files in some directories may conflict with libraries in implicit directories: I checked the cache variables, and it was using my system libs and not the local dependencies libs Code: 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: Code: 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 Code: in file LowLevelSystemSDL.cpp, line 636 was it supposed to work without this? 2 I also got this kind of errors: Code: /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] 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). Code: 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: Code: 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? RE: Compiling, Linking and Running issues on Linux x64 - Urkle - 10-25-2012 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) RE: Compiling, Linking and Running issues on Linux x64 - brita - 10-25-2012 And, voilĂ : Segmentation fault. But no longer problems with GLIBCXX Could this possibly be from commenting the lines: Code: r = engine->RegisterGlobalBehaviour(asBEHAVE_EQUAL, "bool f(string &in, string &in)", asFUNCTIONPR(operator==, (const string &, const string &), bool), asCALL_CDECL); assert( r >= 0 ); and Code: 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 ); |