Error compiling from source: cannot find libraries

Error compiling from source: cannot find libraries

Postby You_Know_Who » 20 Oct 2014, 03:10

Hello:

I was trying to compile Terminal Overload from the source code, but without success. I was hoping that somebody might be able to tell me what I did wrong, or if there is perhaps a workaround. When compiling from source, the compile fails and there is mention that -llibvorbis, -llibogg, and -llibtheora cannot be found. But I have all of these libraries installed.

This is on a Gentoo GNU/Linux x86_64 system:

{l Code}: {l Select All Code}
/tmp/tov/terminal-overload-0.3.1-source/Engine/source/core/util/tUnmanagedVector.h:18:11: warning:   'U32 UnmanagedVector<PolyhedronData::Edge>::mCount' [-Wreorder]
/tmp/tov/terminal-overload-0.3.1-source/Engine/source/core/util/tUnmanagedVector.h:28:7: warning:   when initialized here [-Wreorder]
In file included from /tmp/tov/terminal-overload-0.3.1-source/Engine/source/materials/materialDefinition.h:10:0,
                 from /tmp/tov/terminal-overload-0.3.1-source/Engine/source/shaderGen/shaderFeature.h:7,
                 from /tmp/tov/terminal-overload-0.3.1-source/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.h:7,
                 from /tmp/tov/terminal-overload-0.3.1-source/Engine/source/forest/glsl/windDeformationGLSL.h:8,
                 from /tmp/tov/terminal-overload-0.3.1-source/Engine/source/forest/glsl/windDeformationGLSL.cpp:5:
/tmp/tov/terminal-overload-0.3.1-source/Engine/source/core/util/tDictionary.h: In instantiation of 'HashTable<Key, Value>::Node* HashTable<Key, Value>::_next(U32) const [with Key = const FeatureType*; Value = GFXTexHandle; U32 = unsigned int]':
/tmp/tov/terminal-overload-0.3.1-source/Engine/source/core/util/tDictionary.h:617:38:   required from 'HashTable<Key, Value>::ConstIterator HashTable<Key, Value>::begin() const [with Key = const FeatureType*; Value = GFXTexHandle; HashTable<Key, Value>::ConstIterator = HashTable<const FeatureType*, GFXTexHandle>::_Iterator<const HashTable<const FeatureType*, GFXTexHandle>::Pair, const HashTable<const FeatureType*, GFXTexHandle>::Node, const HashTable<const FeatureType*, GFXTexHandle> >]'
/tmp/tov/terminal-overload-0.3.1-source/Engine/source/materials/materialDefinition.h:155:61:   required from here
/tmp/tov/terminal-overload-0.3.1-source/Engine/source/core/util/tDictionary.h:318:4: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Linking CXX executable "../../../My Projects/main/game/main"
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -llibvorbis
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -llibogg
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -llibtheora
collect2: error: ld returned 1 exit status
Tools/CMake/CMakeFiles/main.dir/build.make:20893: recipe for target '../My Projects/main/game/main' failed
gmake[2]: *** [../My Projects/main/game/main] Error 1
CMakeFiles/Makefile2:323: recipe for target 'Tools/CMake/CMakeFiles/main.dir/all' failed
gmake[1]: *** [Tools/CMake/CMakeFiles/main.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
gmake: *** [all] Error 2


But this system has all of the libraries:

{l Code}: {l Select All Code}
# ls  /usr/lib64/ | grep libogg.so
libogg.so
libogg.so.0
libogg.so.0.8.1


{l Code}: {l Select All Code}
# ls  /usr/lib64/ | grep libvorbis.so
libvorbis.so
libvorbis.so.0
libvorbis.so.0.4.7


{l Code}: {l Select All Code}
# ls  /usr/lib64/ | grep libtheora.so
libtheora.so
libtheora.so.0
libtheora.so.0.3.10


Even when trying to manually include them in LDFLAGS environment variable, (for example, using LDFLAGS="$LDFLAGS -L/usr/lib64 -lvorbis -logg -ltheora" gmake) I still see the same error message.

Any help or insight would be much appreciated. Thank you for your support.
You_Know_Who
 
Posts: 1
Joined: 20 Oct 2014, 03:01

Re: Error compiling from source: cannot find libraries

Postby fr1tz » 21 Oct 2014, 06:56

The game is still 32-bit only (although that will change soon) and compiling it on a 64-bit system is possible but a bit of a pain in the ass to get working. In addition to 32-bit versions of the required libraries I remember also having had to install some gcc/g++ packages related to compiling 32-bit binaries on a 64-bit system.

In the end it was all for nothing because my 64-bit linux system can't run TOL anyway because it doesn't support OpenGL 3.2+. I was planning on writing down my steps next time I'm compiling the engine on a 64-bit linux system. If you continue trying to compile the engine it would be great if you did the same and added it to the wiki.
User avatar
fr1tz
RotC Moderator
 
Posts: 271
Joined: 01 Jun 2013, 18:22

Who is online

Users browsing this forum: No registered users and 1 guest