FreeOrion

Forums for the FreeOrion project
It is currently Sun May 19, 2013 3:18 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: linking freeorion
PostPosted: Thu Sep 01, 2011 10:22 pm 
Offline
Space Krill

Joined: Thu Sep 01, 2011 10:15 pm
Posts: 4
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


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Fri Sep 02, 2011 12:06 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7887
Location: Vancouver, BC
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...


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Fri Sep 02, 2011 5:37 pm 
Offline
Space Krill

Joined: Thu Sep 01, 2011 10:15 pm
Posts: 4
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?


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Sat Sep 03, 2011 5:56 am 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7887
Location: Vancouver, BC
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?


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Sat Sep 03, 2011 8:31 am 
Offline
Space Krill

Joined: Thu Sep 01, 2011 10:15 pm
Posts: 4
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.


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Sat Sep 03, 2011 1:11 pm 
Offline
Space Krill

Joined: Thu Sep 01, 2011 10:15 pm
Posts: 4
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.


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Thu Dec 08, 2011 12:58 pm 
Offline
Space Krill

Joined: Wed Dec 07, 2011 4:48 pm
Posts: 1
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.


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Tue Dec 13, 2011 5:08 pm 
Offline
Space Krill

Joined: Sat Dec 03, 2011 5:34 pm
Posts: 9
Location: Russia, Moscow
Probably same here:

Code:
[ 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...


How can i link libGLU.so.1?


Top
 Profile  
 
 Post subject: Re: linking freeorion
PostPosted: Tue Dec 13, 2011 9:01 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7887
Location: Vancouver, BC
muuus wrote:
How can i link libGLU.so.1?
Did you try the methods suggested earlier in this thread?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group