"GL/gl.h" header not found

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
opinion_is_public
Space Krill
Posts: 2
Joined: Thu May 17, 2007 10:30 am
Location: Denmark

"GL/gl.h" header not found

#1 Post by opinion_is_public »

Hi,
I downloaded freeorion, updated my Ubuntu Feisty to Gutsy to make boost library part easy and got GG compiling running, but freeorion itself wont work out because

Code: Select all

Checking for C header file GL/gl.h... no
It's really strange because GG part found with same code it easily, made check compilation of SDL/GL too good.

Any ideas?

Moved to Compile forum by Geoff

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: The Help Thread

#2 Post by loonycyborg »

Post FreeOrion/config.log . It contains information that will make solving this problem too easy.
In Soviet Russia, forum posts YOU!!

opinion_is_public
Space Krill
Posts: 2
Joined: Thu May 17, 2007 10:30 am
Location: Denmark

Re: The Help Thread

#3 Post by opinion_is_public »

Okay, end of console output:

Code: Select all

Checking for boost::signals::connection() in C++ library boost_signals... yes
Looking for boost lib boost_filesystem...
Checking for boost::filesystem::initial_path() in C++ library boost_filesystem... yes
Looking for boost lib boost_thread...
Checking for boost::thread::yield() in C++ library boost_thread... yes
Boost configuration... (cached) ok
Checking for C header file pthread.h... yes
Checking for pthread_create() in C library pthread... yes
Checking for C header file GL/gl.h... no
And end part of config.log (from line 162 on):

Code: Select all

scons: Configure: Boost configuration... 
scons: Configure: (cached) ok

scons: Configure: Checking for C header file pthread.h... 
.sconf_temp/conftest_11.c <-
  |
  |#include "pthread.h"
  |
  |
gcc -o .sconf_temp/conftest_11.o -c -I/usr/include/python2.5 .sconf_temp/conftest_11.c
close failed: [Errno 9] Bad file descriptor
scons: Configure: yes

scons: Configure: Checking for pthread_create() in C library pthread... 
.sconf_temp/conftest_12.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char pthread_create();
  |
  |int
  |main() {
  |  pthread_create();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_12.o -c -I/usr/include/python2.5 .sconf_temp/conftest_12.c
close failed: [Errno 9] Bad file descriptor
gcc -o .sconf_temp/conftest_12 .sconf_temp/conftest_12.o -L/usr/lib -lpython2.5 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals -lboost_filesystem -lboost_thread -lpthread
close failed: [Errno 9] Bad file descriptor
scons: Configure: yes

scons: Configure: Checking for C header file GL/gl.h... 
.sconf_temp/conftest_13.c <-
  |
  |#include "GL/gl.h"
  |
  |
gcc -o .sconf_temp/conftest_13.o -c " -pthread" -I/usr/include/python2.5 .sconf_temp/conftest_13.c
gcc:  -pthread: No such file or directory
close failed: [Errno 9] Bad file descriptor
scons: Configure: no
Is there some issues I'm using FAT32 partition on USB external drive for holding FreeOrion?

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: The Help Thread

#4 Post by loonycyborg »

This error is caused by a bug in SConstruct around line 257:

Code: Select all

env.AppendUnique(CCFLAGS = ' -pthread')
env.AppendUnique(LINKFLAGS = ' -pthread')
should be

Code: Select all

env.AppendUnique(CCFLAGS = '-pthread')
env.AppendUnique(LINKFLAGS = '-pthread')
Most likely it wasn't fixed because this code is run only if it has failed to find GG with pkg-config. Why didn't pkg-config work?
In Soviet Russia, forum posts YOU!!

wirser
Space Krill
Posts: 8
Joined: Thu Sep 20, 2007 8:20 pm

FC6 86_64 svn "GL/gl.h" header not found error

#5 Post by wirser »

hi, I just attempted to compile freeorion(svn}and am stuck getting
Checking for C header file GL/gl.h... no
error

my hardware is:
asus a8-vm amd athlon x2 3800 motherboard w/nvidia Geforce 6150
mem 2 gb

I compiled and installed gigi with no problem (except missing depens of cegui and ogre).I also had to use "scons configure" for both gg and freeorion if it matters
note GL/gl.h was found by gigi

I looked at the "GL/gl.h sections of both freeorion and gigi and found no significant differencs, however I am not familuar enough with scons to be sure
I am attaching the config.log for freeorion and GG

FO config.log

Code: Select all

file /home/none/build/freeorion/FreeOrion/SConstruct,line 170:
	Configure(confdir = .sconf_temp)
scons: Configure: Checking for Py_Initialize() in C library python2.4... 
.sconf_temp/conftest_0.c <-
  |
  |
  |#include "Python.h"
  |
  |int
  |main() {
  |  Py_Initialize();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_0.o -c -I/usr/include/python2.4 .sconf_temp/conftest_0.c
gcc -o .sconf_temp/conftest_0 .sconf_temp/conftest_0.o -L/usr/lib64 -lpython2.4
scons: Configure: yes

scons: Configure: Checking for pkg-config... 
pkg-config --atleast-pkgconfig-version 0.15.0
scons: Configure: yes

scons: Configure: Checking for GiGiSDL >= 0.6.0... 
pkg-config GiGiSDL --atleast-version 0.6.0
scons: Configure: no

scons: Configure: Checking for C++ header file boost/shared_ptr.hpp... 
.sconf_temp/conftest_3.cpp <-
  |
  |#include "boost/shared_ptr.hpp"
  |
  |
g++ -o .sconf_temp/conftest_3.o -c -I/usr/include/python2.4 .sconf_temp/conftest_3.cpp
scons: Configure: yes

scons: Configure: Checking Boost version >= 1.34... 
scons: Configure: (cached) yes

scons: Configure: Checking for C++ header file boost/graph/dijkstra_shortest_paths.hpp... 
.sconf_temp/conftest_4.cpp <-
  |
  |#include <boost/graph/dijkstra_shortest_paths.hpp>
  |
  |
g++ -o .sconf_temp/conftest_4.o -c -I/usr/include/python2.4 .sconf_temp/conftest_4.cpp
scons: Configure: yes

scons: Configure: Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization... 
.sconf_temp/conftest_5.cpp <-
  |
  |
  |#include "boost/archive/binary_iarchive.hpp"
  |
  |int
  |main() {
  |  boost::archive::binary_iarchive::is_saving();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_5.o -c -I/usr/include/python2.4 .sconf_temp/conftest_5.cpp
g++ -o .sconf_temp/conftest_5 .sconf_temp/conftest_5.o -L/usr/lib64 -lpython2.4 -lboost_serialization
scons: Configure: yes

scons: Configure: Checking for C++ library boost_iostreams... 
.sconf_temp/conftest_6.cpp <-
  |
  |
  |#include "boost/iostreams/filtering_stream.hpp"
  |
  |int
  |main() {
  |  
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_6.o -c -I/usr/include/python2.4 .sconf_temp/conftest_6.cpp
g++ -o .sconf_temp/conftest_6 .sconf_temp/conftest_6.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams
scons: Configure: yes

scons: Configure: Checking for boost::python::throw_error_already_set() in C++ library boost_python... 
.sconf_temp/conftest_7.cpp <-
  |
  |
  |#include "boost/python.hpp"
  |
  |int
  |main() {
  |  boost::python::throw_error_already_set();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_7.o -c -I/usr/include/python2.4 .sconf_temp/conftest_7.cpp
g++ -o .sconf_temp/conftest_7 .sconf_temp/conftest_7.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams -lboost_python
scons: Configure: yes

scons: Configure: Checking for boost::signals::connection() in C++ library boost_signals... 
.sconf_temp/conftest_8.cpp <-
  |
  |
  |#include "boost/signals.hpp"
  |
  |int
  |main() {
  |  boost::signals::connection();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_8.o -c -I/usr/include/python2.4 .sconf_temp/conftest_8.cpp
g++ -o .sconf_temp/conftest_8 .sconf_temp/conftest_8.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals
scons: Configure: yes

scons: Configure: Checking for boost::filesystem::initial_path() in C++ library boost_filesystem... 
.sconf_temp/conftest_9.cpp <-
  |
  |
  |#include "boost/filesystem/operations.hpp"
  |
  |int
  |main() {
  |  boost::filesystem::initial_path();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_9.o -c -I/usr/include/python2.4 .sconf_temp/conftest_9.cpp
g++ -o .sconf_temp/conftest_9 .sconf_temp/conftest_9.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals -lboost_filesystem
scons: Configure: yes

scons: Configure: Checking for boost::thread::yield() in C++ library boost_thread... 
.sconf_temp/conftest_10.cpp <-
  |
  |
  |#include "boost/thread/thread.hpp"
  |
  |int
  |main() {
  |  boost::thread::yield();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_10.o -c -I/usr/include/python2.4 .sconf_temp/conftest_10.cpp
g++ -o .sconf_temp/conftest_10 .sconf_temp/conftest_10.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals -lboost_filesystem -lboost_thread
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
scons: Configure: no

scons: Configure: Checking for boost::thread::yield() in C++ library boost_thread-mt... 
.sconf_temp/conftest_11.cpp <-
  |
  |
  |#include "boost/thread/thread.hpp"
  |
  |int
  |main() {
  |  boost::thread::yield();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_11.o -c -I/usr/include/python2.4 .sconf_temp/conftest_11.cpp
g++ -o .sconf_temp/conftest_11 .sconf_temp/conftest_11.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals -lboost_filesystem -lboost_thread-mt
scons: Configure: yes

scons: Configure: Boost configuration... 
scons: Configure: (cached) ok

scons: Configure: Checking for C header file pthread.h... 
.sconf_temp/conftest_12.c <-
  |
  |#include "pthread.h"
  |
  |
gcc -o .sconf_temp/conftest_12.o -c -I/usr/include/python2.4 .sconf_temp/conftest_12.c
scons: Configure: yes

scons: Configure: Checking for pthread_create() in C library pthread... 
.sconf_temp/conftest_13.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char pthread_create();
  |
  |int
  |main() {
  |  pthread_create();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_13.o -c -I/usr/include/python2.4 .sconf_temp/conftest_13.c
gcc -o .sconf_temp/conftest_13 .sconf_temp/conftest_13.o -L/usr/lib64 -lpython2.4 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals -lboost_filesystem -lboost_thread-mt -lpthread
scons: Configure: yes

scons: Configure: Checking for C header file GL/gl.h... 
.sconf_temp/conftest_14.c <-
  |
  |#include "GL/gl.h"
  |
  |
gcc -o .sconf_temp/conftest_14.o -c " -pthread" -I/usr/include/python2.4 .sconf_temp/conftest_14.c
gcc:  -pthread: No such file or directory
scons: Configure: no

gg config.log

Code: Select all

file /home/none/build/freeorion/FreeOrion/GG/SConstruct,line 266:
	Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config... 
pkg-config --atleast-pkgconfig-version 0.15.0
scons: Configure: yes

scons: Configure: Checking for C++ header file boost/shared_ptr.hpp... 
.sconf_temp/conftest_1.cpp <-
  |
  |#include "boost/shared_ptr.hpp"
  |
  |
g++ -o .sconf_temp/conftest_1.o -c .sconf_temp/conftest_1.cpp
scons: Configure: yes

scons: Configure: Checking Boost version >= 1.34... 
scons: Configure: (cached) yes

scons: Configure: Checking for boost::signals::connection() in C++ library boost_signals... 
.sconf_temp/conftest_2.cpp <-
  |
  |
  |#include "boost/signals.hpp"
  |
  |int
  |main() {
  |  boost::signals::connection();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_2.o -c .sconf_temp/conftest_2.cpp
g++ -o .sconf_temp/conftest_2 .sconf_temp/conftest_2.o -lboost_signals
scons: Configure: yes

scons: Configure: Checking for boost::filesystem::initial_path() in C++ library boost_filesystem... 
.sconf_temp/conftest_3.cpp <-
  |
  |
  |#include "boost/filesystem/operations.hpp"
  |
  |int
  |main() {
  |  boost::filesystem::initial_path();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_3.o -c .sconf_temp/conftest_3.cpp
g++ -o .sconf_temp/conftest_3 .sconf_temp/conftest_3.o -lboost_signals -lboost_filesystem
scons: Configure: yes

scons: Configure: Checking for boost::thread::yield() in C++ library boost_thread... 
.sconf_temp/conftest_4.cpp <-
  |
  |
  |#include "boost/thread/thread.hpp"
  |
  |int
  |main() {
  |  boost::thread::yield();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_4.o -c .sconf_temp/conftest_4.cpp
g++ -o .sconf_temp/conftest_4 .sconf_temp/conftest_4.o -lboost_signals -lboost_filesystem -lboost_thread
/usr/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
scons: Configure: no

scons: Configure: Checking for boost::thread::yield() in C++ library boost_thread-mt... 
.sconf_temp/conftest_5.cpp <-
  |
  |
  |#include "boost/thread/thread.hpp"
  |
  |int
  |main() {
  |  boost::thread::yield();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_5.o -c .sconf_temp/conftest_5.cpp
g++ -o .sconf_temp/conftest_5 .sconf_temp/conftest_5.o -lboost_signals -lboost_filesystem -lboost_thread-mt
scons: Configure: yes

scons: Configure: Boost configuration... 
scons: Configure: (cached) ok

scons: Configure: Checking for C header file pthread.h... 
.sconf_temp/conftest_6.c <-
  |
  |#include "pthread.h"
  |
  |
gcc -o .sconf_temp/conftest_6.o -c .sconf_temp/conftest_6.c
scons: Configure: yes

scons: Configure: Checking for pthread_create() in C library pthread... 
.sconf_temp/conftest_7.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char pthread_create();
  |
  |int
  |main() {
  |  pthread_create();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_7.o -c .sconf_temp/conftest_7.c
gcc -o .sconf_temp/conftest_7 .sconf_temp/conftest_7.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lpthread
scons: Configure: yes

scons: Configure: Checking for C header file GL/gl.h... 
.sconf_temp/conftest_8.c <-
  |
  |#include "GL/gl.h"
  |
  |
gcc -o .sconf_temp/conftest_8.o -c -pthread .sconf_temp/conftest_8.c
scons: Configure: yes

scons: Configure: Checking for C header file GL/glu.h... 
.sconf_temp/conftest_9.c <-
  |
  |#include "GL/glu.h"
  |
  |
gcc -o .sconf_temp/conftest_9.o -c -pthread .sconf_temp/conftest_9.c
scons: Configure: yes

scons: Configure: Checking for glBegin() in C library GL... 
.sconf_temp/conftest_10.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char glBegin();
  |
  |int
  |main() {
  |  glBegin();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_10.o -c -pthread .sconf_temp/conftest_10.c
gcc -o .sconf_temp/conftest_10 -pthread .sconf_temp/conftest_10.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL
scons: Configure: yes

scons: Configure: Checking for gluLookAt() in C library GLU... 
.sconf_temp/conftest_11.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char gluLookAt();
  |
  |int
  |main() {
  |  gluLookAt();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_11.o -c -pthread .sconf_temp/conftest_11.c
gcc -o .sconf_temp/conftest_11 -pthread .sconf_temp/conftest_11.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL -lGLU
scons: Configure: yes

scons: Configure: Checking for freetype2 >= 9.0.0... 
pkg-config freetype2 --atleast-version 9.0.0
scons: Configure: yes

scons: Configure: Checking for C header file ft2build.h... 
.sconf_temp/conftest_13.c <-
  |
  |#include "ft2build.h"
  |
  |
gcc -o .sconf_temp/conftest_13.o -c -pthread -I/usr/include/freetype2 .sconf_temp/conftest_13.c
scons: Configure: yes

scons: Configure: Checking for FT_Init_FreeType() in C library freetype... 
.sconf_temp/conftest_14.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char FT_Init_FreeType();
  |
  |int
  |main() {
  |  FT_Init_FreeType();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_14.o -c -pthread -I/usr/include/freetype2 .sconf_temp/conftest_14.c
gcc -o .sconf_temp/conftest_14 -pthread .sconf_temp/conftest_14.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL -lGLU -lfreetype -lfreetype
scons: Configure: yes

scons: Configure: Checking DevIL version >= 1.6.1... 
scons: Configure: (cached) yes

scons: Configure: Checking for C header file IL/il.h... 
.sconf_temp/conftest_15.c <-
  |
  |#include "IL/il.h"
  |
  |
gcc -o .sconf_temp/conftest_15.o -c -pthread -I/usr/include/freetype2 .sconf_temp/conftest_15.c
scons: Configure: yes

scons: Configure: Checking for C header file IL/ilu.h... 
.sconf_temp/conftest_16.c <-
  |
  |#include "IL/ilu.h"
  |
  |
gcc -o .sconf_temp/conftest_16.o -c -pthread -I/usr/include/freetype2 .sconf_temp/conftest_16.c
scons: Configure: yes

scons: Configure: Checking for ilInit() in C library IL... 
.sconf_temp/conftest_17.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char ilInit();
  |
  |int
  |main() {
  |  ilInit();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_17.o -c -pthread -I/usr/include/freetype2 .sconf_temp/conftest_17.c
gcc -o .sconf_temp/conftest_17 -pthread .sconf_temp/conftest_17.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL -lGLU -lfreetype -lfreetype -lIL
scons: Configure: yes

scons: Configure: Checking for iluInit() in C library ILU... 
.sconf_temp/conftest_18.c <-
  |
  |
  |
  |#ifdef __cplusplus
  |extern "C"
  |#endif
  |char iluInit();
  |
  |int
  |main() {
  |  iluInit();
  |return 0;
  |}
  |
gcc -o .sconf_temp/conftest_18.o -c -pthread -I/usr/include/freetype2 .sconf_temp/conftest_18.c
gcc -o .sconf_temp/conftest_18 -pthread .sconf_temp/conftest_18.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL -lGLU -lfreetype -lfreetype -lIL -lILU
scons: Configure: yes

scons: Configure: Generating libltdl/config.h using libltdl/configure... 
scons: Configure: (cached) ok

scons: Configure: Configuration successful... 
scons: Configure: (cached) yes


file /home/none/build/freeorion/FreeOrion/GG/SConstruct,line 470:
	Configure(confdir = .sconf_temp)
scons: Configure: Checking for sdl-config... 
scons: Configure: (cached) yes

scons: Configure: Checking SDL version >= 1.2.7... 
scons: Configure: (cached) yes

scons: Configure: Linking SDL/OpenGL test app... 
.sconf_temp/conftest_19.c <-
  |
  |#include <SDL/SDL.h>
  |#include <SDL/SDL_opengl.h>
  |int main(int argc, char **argv)
  |{
  |    SDL_Init(SDL_INIT_VIDEO);
  |    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
  |    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
  |    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
  |    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
  |    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
  |    SDL_SetVideoMode(640, 480, SDL_GetVideoInfo()->vfmt->BitsPerPixel, SDL_OPENGL);
  |    glBegin(GL_TRIANGLES);
  |    glEnd();
  |    return 0;
  |}
  |
gcc -o .sconf_temp/conftest_19.o -c -pthread -Wall -O2 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/freetype2 -I. -Ilibltdl -I/usr/include/SDL .sconf_temp/conftest_19.c
gcc -o .sconf_temp/conftest_19 -pthread .sconf_temp/conftest_19.o -L/usr/lib64 -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL -lGLU -lfreetype -lIL -lILU -lSDL -lpthread
scons: Configure: yes

scons: Configure: SDL configuration... 
scons: Configure: (cached) yes

scons: Configure: Configuration successful... 
scons: Configure: (cached) yes


file /home/none/build/freeorion/FreeOrion/GG/SConstruct,line 489:
	Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config... 
pkg-config --atleast-pkgconfig-version 0.15.0
scons: Configure: yes

scons: Configure: Checking for OGRE >= 1.4.3... 
pkg-config OGRE --atleast-version 1.4.3
scons: Configure: yes

scons: Configure: Checking for C++ header file Ogre.h... 
.sconf_temp/conftest_22.cpp <-
  |
  |#include "Ogre.h"
  |
  |
g++ -o .sconf_temp/conftest_22.o -c -pthread -Wall -O2 -DOGRE_GUI_gtk -DOGRE_NO_FREEIMAGE -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/include/freetype2 -I. -Ilibltdl -I/usr/include/OGRE .sconf_temp/conftest_22.cpp
scons: Configure: yes

scons: Configure: Checking for Ogre::Root() in C++ library OgreMain... 
.sconf_temp/conftest_23.cpp <-
  |
  |
  |#include <Ogre.h>
  |int
  |main() {
  |  Ogre::Root();
  |return 0;
  |}
  |
g++ -o .sconf_temp/conftest_23.o -c -pthread -Wall -O2 -DOGRE_GUI_gtk -DOGRE_NO_FREEIMAGE -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/include/freetype2 -I. -Ilibltdl -I/usr/include/OGRE .sconf_temp/conftest_23.cpp
g++ -o .sconf_temp/conftest_23 -pthread .sconf_temp/conftest_23.o -lboost_signals -lboost_filesystem -lboost_thread-mt -lGL -lGLU -lfreetype -lIL -lILU -lOgreMain -lOgreMain
scons: Configure: yes

scons: Configure: Configuration successful... 
scons: Configure: (cached) yes


file /home/none/build/freeorion/FreeOrion/GG/SConstruct,line 528:
	Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config... 
pkg-config --atleast-pkgconfig-version 0.15.0
scons: Configure: yes

scons: Configure: Checking for OIS >= 1.0.0... 
pkg-config OIS --atleast-version 1.0.0
scons: Configure: yes

scons: Configure: Checking for C++ header file OIS.h... 
.sconf_temp/conftest_26.cpp <-
  |
  |#include "OIS.h"
  |
  |
g++ -o .sconf_temp/conftest_26.o -c -pthread -Wall -O2 -DOGRE_GUI_gtk -DOGRE_NO_FREEIMAGE -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/include/freetype2 -I. -Ilibltdl -I/usr/include/OGRE -I/usr/include/OIS .sconf_temp/conftest_26.cpp
scons: Configure: yes

scons: Configure: Configuration successful... 
scons: Configure: (cached) yes


I tried to put these as attached files but after trying to rename 4 times to satisfy the forum board I figured it's just being anal :roll:
I suspect I'll have more missing dependancies

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12725
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: The Help Thread

#6 Post by Geoff the Medio »

This was previously answered in the Programming forum. I've moved those posts here (where they should be), and they've appeared above the original first post in this thread.

wirser
Space Krill
Posts: 8
Joined: Thu Sep 20, 2007 8:20 pm

Re: "GL/gl.h" header not found

#7 Post by wirser »

ERR thanks for this tip I'm now having trouble with
Empire.cpp:(.text+0x946e): undefined reference to `GG::Clr::Clr()'
MultiplayerCommon.cpp:(.text+0xf9d): undefined reference to `GG::CLR_GRAY'
'Universe.cpp:(.text+0x1560f): undefined reference to `GG::FloatClr(float, float, float, float)'
more undefined references to `GG::operator==(GG::Clr const&, GG::Clr const&)' follow
I am only posting one of each undefined references error for now
I had many problem even getting this far but now I'm too tired to post it all
maybe tomorrow ...

jove
Space Krill
Posts: 3
Joined: Sun Feb 03, 2008 1:56 pm

Re: "GL/gl.h" header not found

#8 Post by jove »

hi, I just ran into this bug. Can this not be checked in?

Code: Select all

Index: SConstruct
===================================================================
--- SConstruct  (revision 2301)
+++ SConstruct  (working copy)
@@ -254,8 +254,8 @@
             if str(Platform()) == 'posix':
                 if env['multithreaded']:
                     if conf.CheckCHeader('pthread.h') and conf.CheckLib('pthread', 'pthread_create', autoadd = 0):
-                        env.AppendUnique(CCFLAGS = ' -pthread')
-                        env.AppendUnique(LINKFLAGS = ' -pthread')
+                        env.AppendUnique(CCFLAGS = '-pthread')
+                        env.AppendUnique(LINKFLAGS = '-pthread')
                     else:
                         Exit(1)
 

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12725
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: "GL/gl.h" header not found

#9 Post by Geoff the Medio »

jove wrote:Can this not be checked in?
Done.

freereign
Space Squid
Posts: 53
Joined: Wed Mar 19, 2008 4:40 pm

Re: "GL/gl.h" header not found

#10 Post by freereign »

wirser wrote:ERR thanks for this tip I'm now having trouble with
Empire.cpp:(.text+0x946e): undefined reference to `GG::Clr::Clr()'
MultiplayerCommon.cpp:(.text+0xf9d): undefined reference to `GG::CLR_GRAY'
'Universe.cpp:(.text+0x1560f): undefined reference to `GG::FloatClr(float, float, float, float)'
more undefined references to `GG::operator==(GG::Clr const&, GG::Clr const&)' follow
I am only posting one of each undefined references error for now
I had many problem even getting this far but now I'm too tired to post it all
maybe tomorrow ...
I have the same errors. Do we have a solution?

I am attempting to build freeorion on Ubuntu Hardy i386. Here is my complete error list:

Code: Select all

Empire/Empire.o: In function `Empire':
/home/fixer/Projects/freeorion/FreeOrion/Empire/Empire.cpp:620: undefined reference to `GG::Clr::Clr()'
/home/fixer/Projects/freeorion/FreeOrion/Empire/Empire.cpp:620: undefined reference to `GG::Clr::Clr()'
network/Message.o: In function `construct<boost::archive::xml_iarchive, GG::Clr>':
/usr/include/boost/serialization/access.hpp:123: undefined reference to `GG::Clr::Clr()'
network/Message.o: In function `NebulaData':
/home/fixer/Projects/freeorion/FreeOrion/network/../util/MultiplayerCommon.h:92: undefined reference to `GG::Pt::Pt()'
universe/ParserUtil.o: In function `operator()<unsigned int, unsigned int, unsigned int, unsigned int>':
/usr/include/boost/spirit/phoenix/casts.hpp:498: undefined reference to `GG::Clr::Clr(unsigned char, unsigned char, unsigned char, unsigned char)'
universe/Tech.o: In function `TechCategory':
/home/fixer/Projects/freeorion/FreeOrion/universe/Tech.cpp:300: undefined reference to `GG::CLR_WHITE'
/home/fixer/Projects/freeorion/FreeOrion/universe/Tech.cpp:300: undefined reference to `GG::CLR_WHITE'
universe/Tech.o: In function `tuple':
/usr/include/boost/spirit/phoenix/tuples.hpp:703: undefined reference to `GG::Clr::Clr()'
universe/TopLevelParsers.o: In function `tuple':
/usr/include/boost/spirit/phoenix/tuples.hpp:746: undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `PlayerSetupData':
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:215: undefined reference to `GG::CLR_GRAY'
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:215: undefined reference to `GG::CLR_GRAY'
util/MultiplayerCommon.o: In function `SaveGameEmpireData':
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:204: undefined reference to `GG::Clr::Clr()'
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:204: undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `SinglePlayerSetupData':
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:196: undefined reference to `GG::Clr::Clr()'
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:196: undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `XMLToClr(XMLElement const&)':
/home/fixer/Projects/freeorion/FreeOrion/util/MultiplayerCommon.cpp:90: undefined reference to `GG::Clr::Clr()'
server/SaveLoad-server.o: In function `SaveGameUIData':
/home/fixer/Projects/freeorion/FreeOrion/server/../universe/../util/MultiplayerCommon.h:90: undefined reference to `GG::Pt::Pt()'
server/ServerFSM-server.o: In function `SaveGameUIData':
/home/fixer/Projects/freeorion/FreeOrion/server/../universe/../util/MultiplayerCommon.h:90: undefined reference to `GG::Pt::Pt()'
universe/Universe-server.o: In function `Universe::GenerateEmpires(int, std::vector<int, std::allocator<int> >&, std::map<int, PlayerSetupData, std::less<int>, std::allocator<std::pair<int const, PlayerSetupData> > > const&)':
/home/fixer/Projects/freeorion/FreeOrion/universe/Universe.cpp:2775: undefined reference to `GG::Clr::Clr()'
/home/fixer/Projects/freeorion/FreeOrion/universe/Universe.cpp:2788: undefined reference to `GG::FloatClr(float, float, float, float)'
universe/Universe-server.o: In function `__gnu_cxx::__normal_iterator<GG::Clr*, std::vector<GG::Clr, std::allocator<GG::Clr> > > std::__find<__gnu_cxx::__normal_iterator<GG::Clr*, std::vector<GG::Clr, std::allocator<GG::Clr> > >, GG::Clr>(__gnu_cxx::__normal_iterator<GG::Clr*, std::vector<GG::Clr, std::allocator<GG::Clr> > >, __gnu_cxx::__normal_iterator<GG::Clr*, std::vector<GG::Clr, std::allocator<GG::Clr> > >, GG::Clr const&, std::random_access_iterator_tag)':
/usr/include/c++/4.2/bits/stl_algo.h:212: undefined reference to `GG::operator==(GG::Clr const&, GG::Clr const&)'
/usr/include/c++/4.2/bits/stl_algo.h:216: undefined reference to `GG::operator==(GG::Clr const&, GG::Clr const&)'
/usr/include/c++/4.2/bits/stl_algo.h:220: undefined reference to `GG::operator==(GG::Clr const&, GG::Clr const&)'
/usr/include/c++/4.2/bits/stl_algo.h:208: undefined reference to `GG::operator==(GG::Clr const&, GG::Clr const&)'
/usr/include/c++/4.2/bits/stl_algo.h:228: undefined reference to `GG::operator==(GG::Clr const&, GG::Clr const&)'
universe/Universe-server.o:/usr/include/c++/4.2/bits/stl_algo.h:232: more undefined references to `GG::operator==(GG::Clr const&, GG::Clr const&)' follow
collect2: ld returned 1 exit status
scons: *** [freeoriond] Error 1
scons: building terminated because of errors.
I attempted to manually set with_gg_include to /usr/local/include and with_gg_libdir to /usr/local/lib (both of these are where the GG folder is) any clues? I can tell it isn't finding GG. I will try some different things and see if I can fix it.
MoO: Darloks Rule!
MoO2: Custom Darloks Rule!
MoO3: Dunno cuz I'm a cheapskate

EyesKiller
Space Krill
Posts: 5
Joined: Thu Mar 20, 2008 3:59 pm

Re: "GL/gl.h" header not found

#11 Post by EyesKiller »

Hi, I've got the same problem. It seems to be a linker-problem, am I right?

Code: Select all

[snip] undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `PlayerSetupData::PlayerSetupData()':
MultiplayerCommon.cpp:(.text+0xfcd): undefined reference to `GG::CLR_GRAY'
util/MultiplayerCommon.o: In function `PlayerSetupData::PlayerSetupData()':
MultiplayerCommon.cpp:(.text+0x107d): undefined reference to `GG::CLR_GRAY'
util/MultiplayerCommon.o: In function `SaveGameEmpireData::SaveGameEmpireData()':
MultiplayerCommon.cpp:(.text+0x1131): undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `SaveGameEmpireData::SaveGameEmpireData()':
MultiplayerCommon.cpp:(.text+0x1211): undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `SinglePlayerSetupData::SinglePlayerSetupData()':
MultiplayerCommon.cpp:(.text+0x12fc): undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `SinglePlayerSetupData::SinglePlayerSetupData()':
MultiplayerCommon.cpp:(.text+0x13fc): undefined reference to `GG::Clr::Clr()'
util/MultiplayerCommon.o: In function `XMLToClr(XMLElement const&)':
MultiplayerCommon.cpp:(.text+0x17a1): undefined reference to `GG::Clr::Clr()'
[snip]
How can I resolve this?
I'm using Fedora 8 x86_64 and freeorion svn-version (rev. 2410).

cu Floh

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: "GL/gl.h" header not found

#12 Post by loonycyborg »

EyesKiller wrote:undefined reference to `GG::Clr::Clr()'
Make sure that there's no old GiGi library somewhere in link path.
In Soviet Russia, forum posts YOU!!

EyesKiller
Space Krill
Posts: 5
Joined: Thu Mar 20, 2008 3:59 pm

Re: "GL/gl.h" header not found

#13 Post by EyesKiller »

I'm using GiGi from same svn as FreeOrion. :?

cu Floh

User avatar
loonycyborg
Compilation Expert
Posts: 219
Joined: Thu Jul 06, 2006 10:30 pm
Location: Russia/Moscow

Re: "GL/gl.h" header not found

#14 Post by loonycyborg »

Did you do "scons install" after compiling GG last time? Also, there could be old version with different suffix or in different directory that is used instead of the latest svn version...
In Soviet Russia, forum posts YOU!!

EyesKiller
Space Krill
Posts: 5
Joined: Thu Mar 20, 2008 3:59 pm

Re: "GL/gl.h" header not found

#15 Post by EyesKiller »

I checked out first time today. And yes, I already did 'scons install' as root.

But... I forgot about the error message, maybe this is the cause, hm?

Code: Select all

[[email protected] GG]$ scons libdir=/usr/lib64 pkgconfigdir=/usr/lib64/pkgconfig
[snip]
Checking OIS version >= 1.0.0... (cached) no
Warning: OIS not configured.  The GiGiOgre library's OIS plugin will not be built!
Configuration successful... (cached) no
KeyError: 'LIBPATH':
  File "/home/floh/daten/development/svn/freeorion/FreeOrion/GG/SConstruct", line 636:
    CreateGiGiPCFile(['GiGi.pc'], ['GiGi.pc.in'], env)
  File "/home/floh/daten/development/svn/freeorion/FreeOrion/GG/build_support.py", line 91:
    for path in env['LIBPATH']:
  File "/usr/lib/scons/SCons/Environment.py", line 309:
    return self._dict[key]
cu Floh

Post Reply