Hi,
compiling the freeorion rv4217 i get the next error :
/usr/bin/ld: CMakeFiles/freeorion.dir/__/__/UI/CUIControls.cpp.o: undefined reference to symbol 'glTranslated'
/usr/bin/ld: note: 'glTranslated' is defined in DSO /usr/lib/libGL.so.1 so try adding it to the linker command line
/usr/lib/libGL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [freeorion] Error 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
make: *** [all] Error 2
linking freeorion
Moderator: Oberlus
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: linking freeorion
Looks like you need to add -lGL to the linker command. Presumably there's a way to do that through CMake or editing the make file...
Re: linking freeorion
I added in various make files the -lGL command and doesn't work.
when i do a cmake . this is the result :
The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build platform: linux
-- Boost version: 1.46.1
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- serialization
-- signals
-- system
-- thread
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.3.4")
-- checking for module 'GiGi'
-- found GiGi, version 0.8.0
-- Found Subversion: /usr/bin/svn (found version "1.6.17")
-- Configuring freeoriond
-- Configuring freeorionca
-- Boost version: 1.46.1
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- serialization
-- signals
-- system
-- thread
-- iostreams
-- python
-- Found PythonLibs: /usr/lib/libpython2.6.so
-- Configuring freeorion
-- Found OpenAL: /usr/lib/libopenal.so
-- Found ALUT: /usr/lib/libalut.so
-- checking for one of the modules 'OGRE'
-- libraries : OgreMain;pthread from /usr/lib
-- includes : /usr/include/OGRE
-- Found Ogg: /usr/lib/libogg.so
-- Found Vorbis: /usr/lib/libvorbis.so
-- libraries : /usr/local/lib/libBulletDynamics.so;/usr/local/lib/libBulletCollision.so;/usr/local/lib/libLinearMath.so from
-- includes : /usr/local/include/bullet
-- Configuring done
-- Generating done
Its OK?
when i do a cmake . this is the result :
The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build platform: linux
-- Boost version: 1.46.1
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- serialization
-- signals
-- system
-- thread
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.3.4")
-- checking for module 'GiGi'
-- found GiGi, version 0.8.0
-- Found Subversion: /usr/bin/svn (found version "1.6.17")
-- Configuring freeoriond
-- Configuring freeorionca
-- Boost version: 1.46.1
-- Found the following Boost libraries:
-- date_time
-- filesystem
-- serialization
-- signals
-- system
-- thread
-- iostreams
-- python
-- Found PythonLibs: /usr/lib/libpython2.6.so
-- Configuring freeorion
-- Found OpenAL: /usr/lib/libopenal.so
-- Found ALUT: /usr/lib/libalut.so
-- checking for one of the modules 'OGRE'
-- libraries : OgreMain;pthread from /usr/lib
-- includes : /usr/include/OGRE
-- Found Ogg: /usr/lib/libogg.so
-- Found Vorbis: /usr/lib/libvorbis.so
-- libraries : /usr/local/lib/libBulletDynamics.so;/usr/local/lib/libBulletCollision.so;/usr/local/lib/libLinearMath.so from
-- includes : /usr/local/include/bullet
-- Configuring done
-- Generating done
Its OK?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: linking freeorion
If you rerun cmake after editing make files, it may have overwritten them...
Did adding the -lGL change the resulting calls to the linker? How did it not work?
Did adding the -lGL change the resulting calls to the linker? How did it not work?
Re: linking freeorion
I know if you run cmake the make files are overwritten , i don't know what make files i have to add the -lGL. I added to one that doesn't work but there are many make files.
Sorry if I my explanation is so bad but my english is very bad, he he he.
Thank very much for your responses.
Sorry if I my explanation is so bad but my english is very bad, he he he.
Thank very much for your responses.
Re: linking freeorion
The solution is in the CMakeCache.txt :
CMAKE_CXX_FLAGS:STRING=-lGL <-- added
I don't know why the cmake dont add this field automatically.
Thank you very much for the response.
CMAKE_CXX_FLAGS:STRING=-lGL <-- added
I don't know why the cmake dont add this field automatically.
Thank you very much for the response.
Re: linking freeorion
Hello!
I get a similar error during compile:
Linking CXX executable ../../freeorion
/usr/bin/ld: CMakeFiles/freeorion.dir/__/__/UI/SidePanel.cpp.o: undefined reference to symbol 'gluQuadricTexture'
/usr/bin/ld: note: 'gluQuadricTexture' is defined in DSO /usr/lib64/libGLU.so.1 so try adding it to the linker command line
/usr/lib64/libGLU.so.1: could not read symbols: Invalid operation
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [freeorion] Fehler 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Fehler 2
make: *** [all] Fehler 2
I ran cmake with the options -DCMAKE_CXX_FLAGS:STRING=-IGL, but the same error appeared. I also tried the option -IGLU, and both together -IGL -IGLU. Neither of this options changed anything, any idea what to do about it?
Thanks in advance.
I get a similar error during compile:
Linking CXX executable ../../freeorion
/usr/bin/ld: CMakeFiles/freeorion.dir/__/__/UI/SidePanel.cpp.o: undefined reference to symbol 'gluQuadricTexture'
/usr/bin/ld: note: 'gluQuadricTexture' is defined in DSO /usr/lib64/libGLU.so.1 so try adding it to the linker command line
/usr/lib64/libGLU.so.1: could not read symbols: Invalid operation
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [freeorion] Fehler 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Fehler 2
make: *** [all] Fehler 2
I ran cmake with the options -DCMAKE_CXX_FLAGS:STRING=-IGL, but the same error appeared. I also tried the option -IGLU, and both together -IGL -IGLU. Neither of this options changed anything, any idea what to do about it?
Thanks in advance.
Re: linking freeorion
Probably same here:
How can i link libGLU.so.1?
Code: Select all
[ 99%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/util/AppInterface.cpp.o
[100%] Building CXX object client/human/CMakeFiles/freeorion.dir/__/__/util/VarText.cpp.o
Linking CXX executable ../../freeorion
/usr/bin/ld: CMakeFiles/freeorion.dir/__/__/UI/SidePanel.cpp.o: undefined reference to symbol 'gluQuadricOrientation'
/usr/bin/ld: note: 'gluQuadricOrientation' is defined in DSO /usr/lib/libGLU.so.1 so try adding it to the linker command line
/usr/lib/libGLU.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [freeorion] Error 1
make[1]: *** [client/human/CMakeFiles/freeorion.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: linking freeorion
Did you try the methods suggested earlier in this thread?muuus wrote:How can i link libGLU.so.1?