error with ubuntu

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
legan
Space Krill
Posts: 2
Joined: Fri Feb 08, 2008 7:09 pm

error with ubuntu

#1 Post by legan »

I have a error compiling

Code: Select all

]scons: Reading SConscript files ...
Using previous successful configuration; if you want to re-run the configuration step, run "scons configure".
scons: done reading SConscript files.
scons: Building targets ...
g++ -o combat/Combat.o -c -pthread -g -O2 -Wall -D_GNU_SOURCE=1 -D_REENTRANT -DFREEORION_LINUX -DENABLE_BINRELOC -I/usr/include/python2.5 -I/usr/local/include/SDL -I/usr/include/freetype2 -I/usr/local/include/graphviz -I/usr/include/graphviz -Inetwork combat/Combat.cpp
In file included from combat/../util/MultiplayerCommon.h:5,
                 from combat/Combat.cpp:3:
combat/../util/XMLDoc.h:34:21: error: GG/Enum.h: No such file or directory
combat/../util/XMLDoc.h:38:26: error: GG/Exception.h: No such file or directory
In file included from combat/Combat.cpp:3:
combat/../util/MultiplayerCommon.h:8:20: error: GG/Clr.h: No such file or directory
combat/../util/XMLDoc.h:210: error: expected class-name before '{' token
combat/../util/XMLDoc.h:210: warning: 'class XMLElement::Exception' has virtual functions but non-virtual destructor
combat/../util/XMLDoc.h:219: warning: 'class XMLElement::NoSuchChild' has virtual functions but non-virtual destructor
combat/../util/XMLDoc.h:229: warning: 'class XMLElement::NoSuchIndex' has virtual functions but non-virtual destructor
combat/../util/XMLDoc.h: In constructor 'XMLElement::Exception::Exception()':
combat/../util/XMLDoc.h:212: error: class 'XMLElement::Exception' does not have any field named 'ExceptionBase'
combat/../util/XMLDoc.h: In constructor 'XMLElement::Exception::Exception(const std::string&)':
combat/../util/XMLDoc.h:213: error: class 'XMLElement::Exception' does not have any field named 'ExceptionBase'
combat/../util/XMLDoc.h: In function 'std::string StringFromFlags(unsigned int)':
combat/../util/XMLDoc.h:325: error: expected initializer before '<' token
combat/../util/XMLDoc.h:327: error: 'EnumMap' in namespace 'GG' does not name a type
combat/../util/XMLDoc.h:327: error: expected unqualified-id before '<' token
combat/../util/XMLDoc.h:327: error: 'it' was not declared in this scope
combat/../util/XMLDoc.h:327: error: 'enum_map' was not declared in this scope
combat/../util/XMLDoc.h:334: error: 'enum_map' was not declared in this scope
combat/../util/XMLDoc.h: In function 'unsigned int FlagsFromString(const std::string&)':
combat/../util/XMLDoc.h:346: error: expected initializer before '<' token
combat/../util/XMLDoc.h:349: error: 'enum_map' was not declared in this scope
combat/../util/../universe/Enums.h: At global scope:
combat/../util/../universe/Enums.h:22: error: expected constructor, destructor, or type conversion before 'GG_ENUM_MAP_INSERT'
combat/../util/../universe/Enums.h:33: error: expected constructor, destructor, or type conversion before 'GG_ENUM_STREAM_OUT'
combat/../util/../universe/Enums.h:49: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:60: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:81: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:96: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:115: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:127: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:143: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:152: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:170: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:181: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:206: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:224: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:241: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:252: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:266: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:273: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:287: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:294: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:311: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:321: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:336: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:344: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:358: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:365: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:378: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:385: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:398: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:405: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:418: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:425: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:440: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:448: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:463: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:472: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:489: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:500: error: expected constructor, destructor, or type conversion before '(' token
combat/../util/../universe/Enums.h:507: error: 'FocusType' does not name a type
combat/../util/../universe/Enums.h:510: error: 'MeterType' does not name a type
combat/../util/MultiplayerCommon.h:18: error: 'Clr' is not a member of 'GG'
combat/../util/MultiplayerCommon.h:18: error: 'Clr' is not a member of 'GG'
combat/../util/MultiplayerCommon.h:18: error: template argument 1 is invalid
combat/../util/MultiplayerCommon.h:18: error: template argument 2 is invalid
combat/../util/MultiplayerCommon.h:18: error: invalid type in declaration before ';' token
combat/../util/MultiplayerCommon.h:21: error: expected unqualified-id before '&' token
combat/../util/MultiplayerCommon.h:21: error: expected ',' or '...' before '&' token
combat/../util/MultiplayerCommon.h:21: error: ISO C++ forbids declaration of 'parameter' with no type
combat/../util/MultiplayerCommon.h:24: error: 'Clr' in namespace 'GG' does not name a type
combat/../util/MultiplayerCommon.h:55: error: 'Shape' does not name a type
combat/../util/MultiplayerCommon.h:56: error: 'Age' does not name a type
combat/../util/MultiplayerCommon.h:57: error: 'StarlaneFrequency' does not name a type
combat/../util/MultiplayerCommon.h:58: error: 'PlanetDensity' does not name a type
combat/../util/MultiplayerCommon.h:59: error: 'SpecialsFrequency' does not name a type
combat/../util/MultiplayerCommon.h:78: error: 'Clr' in namespace 'GG' does not name a type
combat/../util/MultiplayerCommon.h:94: error: 'Pt' in namespace 'GG' does not name a type
combat/../util/MultiplayerCommon.h:102: error: 'Pt' in namespace 'GG' does not name a type
combat/../util/MultiplayerCommon.h:122: error: 'Clr' in namespace 'GG' does not name a type
combat/../util/MultiplayerCommon.h:140: error: 'Clr' in namespace 'GG' does not name a type
combat/../util/MultiplayerCommon.h:167: error: 'Clr' is not a member of 'GG'
combat/../util/MultiplayerCommon.h:167: error: 'Clr' is not a member of 'GG'
combat/../util/MultiplayerCommon.h:167: error: template argument 1 is invalid
combat/../util/MultiplayerCommon.h:167: error: template argument 2 is invalid
combat/../util/MultiplayerCommon.h: In member function 'void GalaxySetupData::serialize(Archive&, unsigned int)':
combat/../util/MultiplayerCommon.h:200: error: 'm_shape' was not declared in this scope
combat/../util/MultiplayerCommon.h:201: error: 'm_age' was not declared in this scope
combat/../util/MultiplayerCommon.h:202: error: 'm_starlane_freq' was not declared in this scope
combat/../util/MultiplayerCommon.h:203: error: 'm_planet_density' was not declared in this scope
combat/../util/MultiplayerCommon.h:204: error: 'm_specials_freq' was not declared in this scope
combat/../util/MultiplayerCommon.h: In member function 'void SinglePlayerSetupData::serialize(Archive&, unsigned int)':
combat/../util/MultiplayerCommon.h:214: error: 'm_empire_color' was not declared in this scope
combat/../util/MultiplayerCommon.h: In member function 'void SaveGameUIData::NebulaData::serialize(Archive&, unsigned int)':
combat/../util/MultiplayerCommon.h:223: error: 'center' was not declared in this scope
combat/../util/MultiplayerCommon.h: In member function 'void SaveGameUIData::serialize(Archive&, unsigned int)':
combat/../util/MultiplayerCommon.h:229: error: 'map_upper_left' was not declared in this scope
combat/../util/MultiplayerCommon.h: In member function 'void SaveGameEmpireData::serialize(Archive&, unsigned int)':
combat/../util/MultiplayerCommon.h:240: error: 'm_color' was not declared in this scope
combat/../util/MultiplayerCommon.h: In member function 'void PlayerSetupData::serialize(Archive&, unsigned int)':
combat/../util/MultiplayerCommon.h:249: error: 'm_empire_color' was not declared in this scope
scons: *** [combat/Combat.o] Error 1
scons: building terminated because of errors.
some help?

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

Re: error with ubuntu

#2 Post by loonycyborg »

It can't find GG because there's no -I compiler flag that points to it.
Run "scons configure" and post config.log if there are errors during configuration.
In Soviet Russia, forum posts YOU!!

legan
Space Krill
Posts: 2
Joined: Fri Feb 08, 2008 7:09 pm

Re: error with ubuntu

#3 Post by legan »

loonycyborg wrote:It can't find GG because there's no -I compiler flag that points to it.
Run "scons configure" and post config.log if there are errors during configuration.

Code: Select all

scons: Reading SConscript files ...
Configuring for POSIX system...
Checking for Py_Initialize() in C library python2.5... yes
Checking for pkg-config... yes
Checking for GiGiSDL >= 0.6.0... no
Checking for C++ header file boost/shared_ptr.hpp... yes
Checking Boost version >= 1.34... (cached) yes
Checking for C++ header file boost/graph/dijkstra_shortest_paths.hpp... yes
Looking for boost lib boost_serialization...
Checking for boost::archive::binary_iarchive::is_saving() in C++ library boost_serialization... yes
Looking for boost lib boost_iostreams...
Checking for C++ library boost_iostreams... yes
Looking for boost lib boost_python...
Checking for boost::python::throw_error_already_set() in C++ library boost_python... yes
Looking for boost lib boost_signals...
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... yes
Checking for C header file GL/glu.h... yes
Checking for glBegin() in C library GL... yes
Checking for gluLookAt() in C library GLU... yes
Checking for sdl-config... (cached) yes
Checking SDL version >= 1.2.7... (cached) yes
Linking SDL/OpenGL test app... yes
SDL configuration... (cached) yes
Checking for freetype2 >= 9.0.0... yes
Checking for C header file ft2build.h... yes
Checking for FT_Init_FreeType() in C library freetype... yes
Checking DevIL version >= 1.6.1... (cached) yes
Checking for C header file IL/il.h... yes
Checking for C header file IL/ilu.h... yes
Checking for C header file IL/ilut.h... yes
Checking for ilInit() in C library IL... yes
Checking for iluInit() in C library ILU... yes
Checking for ilutInit() in C library ILUT... yes
Checking for DevIL OpenGL support... yes
Generating GG/libltdl/config.h using GG/libltdl/configure... (cached) ok
Checking for openal >= 0.0.8... yes
Checking for freealut >= 1.1.0... yes
Checking for vorbisfile >= 1.1.2... yes
Checking for libgraph >= 2.8... yes
Checking for libgvc >= 2.8... yes
Checking for log4cpp >= 0.3.4b... yes
Checking for C++ header file log4cpp/Category.hh... yes
Checking for log4cpp::Category::getRoot() in C++ library log4cpp... yes
Configuration successful... (cached) yes
it can be for the gigiSDL?

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: error with ubuntu

#4 Post by kroddn »

Did you compile and install GG in the subdirectory of Freeorion?

juniejune
Space Krill
Posts: 1
Joined: Tue Apr 15, 2008 5:51 am

Re: error with ubuntu

#5 Post by juniejune »

I had the same exact problem. I didn't notice it was the GiGISDL thing, so I went back to rebuild that, and realized that it said that I didn't have OGRE. So I installed any of the Ogre-related packages I could find through the Synaptic Package Manager.

And uh, nothing changed. Because the version thru the package manager is 1.4.3, and the GiGISDL wants 1.4.5.

And now it's a little late for me, so I'm going to have to continue this later. I hope the OP has had more luck than I have!

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: error with ubuntu

#6 Post by kroddn »

I don't think you need ogre on linux-systems.

You MUST install GG before you can compile FreeOrion!

So do this:

Code: Select all

cd GG
scons configure
Be sure that it found libSDL (it sais "Checking SDL version >= 1.2.7..." on my system) and than go on:

Code: Select all

scons
sudo scons install
cd ..
Then try (back in your FreeOrion-root directory):

Code: Select all

scons configure
scons
Or try to use the Linux-Version I built:
viewtopic.php?f=9&t=1792

galeru
Space Krill
Posts: 3
Joined: Fri Apr 18, 2008 11:50 pm

Re: error with ubuntu

#7 Post by galeru »

The same thing happens with me. I've done full scons configure/scons/scons install, and it still can't find GiGiSDL. I'm unfamiliar with scons as to how it figures out that GiGi isn't installed.

pkg-config finds GiGiSDL and outputs the following:

Code: Select all

pkg-config --libs --cflags GiGiSDL
-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include -I/usr/include/SDL  -pthread -L/usr/local/lib -lGiGiSDL -lIL -lILU -lGiGi -lboost_signals -lboost_filesystem -lboost_thread -lGL -lGLU -lfreetype -lz -lSDL  
Incidentally, my code compiles just fine, but I get a horrendous linker error instead of any compile time errors.

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: error with ubuntu

#8 Post by kroddn »

Can you post the line which is called for linking (before the errors start output)?

galeru
Space Krill
Posts: 3
Joined: Fri Apr 18, 2008 11:50 pm

Re: error with ubuntu

#9 Post by galeru »

Sure thing:

Code: Select all

g++ -o freeoriond -pthread combat/Combat.o Empire/Empire.o Empire/EmpireManager.o Empire/ResourcePool.o network/Message.o network/MessageQueue.o network/Networking.o network/boost/error_code.o UI/StringTable.o universe/Building.o universe/Condition.o universe/ConditionParser1.o universe/ConditionParser2.o universe/ConditionParser.o universe/Effect.o universe/EffectParser.o universe/Enums.o universe/Fleet.o universe/Meter.o universe/ParserUtil.o universe/Planet.o universe/PopCenter.o universe/Predicates.o universe/ResourceCenter.o universe/Ship.o universe/ShipDesign.o universe/Special.o universe/System.o universe/Tech.o universe/TopLevelParsers.o universe/UniverseObject.o universe/ValueRef.o universe/ValueRefParser.o util/DataTable.o util/GZStream.o util/MultiplayerCommon.o util/OptionsDB.o util/Order.o util/OrderSet.o util/Process.o util/Random.o util/Serialize.o util/SitRepEntry.o util/VarText.o util/Version.o util/binreloc.o util/Directories.o util/XMLDoc.o combat/CombatSystem-server.o network/ServerNetworking-server.o server/SaveLoad-server.o server/ServerApp-server.o server/ServerFSM-server.o server/dmain-server.o universe/Universe-server.o util/AppInterface-server.o -L/usr/lib -lpython2.5 -lboost_serialization -lboost_iostreams -lboost_python -lboost_signals -lboost_filesystem -lboost_thread -lGL -lGLU -lSDL -lpthread -lz -lfreetype -lIL -lILU -lILUT -lalut -lopenal -lvorbisfile -lvorbis -lm -logg -lgvc -lgraph -lcdt -llog4cpp -lnsl -llog4cpp

User avatar
kroddn
Static Linker
Posts: 347
Joined: Thu Jun 28, 2007 10:28 am

Re: error with ubuntu

#10 Post by kroddn »

The linker-options for GG are missing.

I do not know if somebody changed some options in scons buildfiles which caused this problem. But you could try to run scons configure with parameters for GG:

Code: Select all

scons configure with_gg_include=/usr/local/include with_gg_libdir=/usr/local/lib
I am too not very used with scons, and therefore dont know where the error comes fron.

galeru
Space Krill
Posts: 3
Joined: Fri Apr 18, 2008 11:50 pm

Re: error with ubuntu

#11 Post by galeru »

I blew away the svn and re-downloaded it, and now it finds GiGiSDL. So, I don't really know what happened. At least it works now.

Post Reply