Compile Errors (3339)

Questions, problems and discussion about compiling FreeOrion.

Moderators: Oberlus, Oberlus

Message
Author
User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Compile Errors (3339)

#1 Post by Bigjoe5 » Fri Jan 29, 2010 1:39 am

Code: Select all

Command /Developer/usr/bin/gcc-4.0 failed with exit code 1

  "Universe::Destroy(int)", referenced from:
      FleetColonizeOrder::ExecuteImpl() const  in libCommon.a(Order.o)
      FleetColonizeOrder::ServerExecute() const  in libCommon.a(Order.o)
      Planet::Conquer(int)  in libCommon.a(Planet.o)

  "EmpireManager::Clear()", referenced from:
      HumanClientApp::EndGame(bool)  in HumanClientApp.o

  "CreateCombatSitRep(int)", referenced from:
      (anonymous namespace)::CreateCombatSitReps(std::map<int, CombatInfo, std::less<int>, std::allocator<std::pair<int const, CombatInfo> > > const&)                                                 in ServerApp.o


  "Universe::Destroy(int)", referenced from:
      Planet::Conquer(int)  in libCommon.a(Planet.o)
      FleetColonizeOrder::ExecuteImpl() const  in libCommon.a(Order.o)
      FleetColonizeOrder::ServerExecute() const  in libCommon.a(Order.o)

  "ResolveCombat(CombatInfo&)", referenced from:
      ServerApp::AutoResolveCombat(CombatInfo&)       in ServerApp.o

  "CombatInfo::CombatInfo(int)", referenced from:
      (anonymous namespace)::AssembleSystemCombatInfo(std::map<int, CombatInfo, std::less<int>, std::allocator<std::pair<int const, CombatInfo> > >&)                                                      in ServerApp.o

  "CombatInfo::Clear()", referenced from:
      (anonymous namespace)::CleanupSystemCombatInfo(std::map<int, CombatInfo, std::less<int>, std::allocator<std::pair<int const, CombatInfo> > >&)                                                      in ServerApp.o

  "EmpireManager::Clear()", referenced from:
      WaitingForTurnEnd::react(HostSPGame const&)  in ServerFSM.o

  "CreatePlanetColonizedSitRep(int)", referenced from:
      ServerApp::PreCombatProcessTurns()      in ServerApp.o
      ServerApp::PreCombatProcessTurns()      in ServerApp.o

  "EmpireManager::Eliminated(int) const", referenced from:
      ServerApp::CheckForEmpireEliminationOrVictory()      in ServerApp.o
      ServerApp::LoadGameInit(std::vector<PlayerSaveGameData, std::allocator<PlayerSaveGameData> > const&, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > const&, std::set<int, std::less<int>, std::allocator<int> >&, boost::shared_ptr<ServerSaveGameData>)in ServerApp.o
      ServerApp::PostCombatProcessTurns()      in ServerApp.o
      ServerApp::PostCombatProcessTurns()      in ServerApp.o
      ServerApp::NewGameInit(int, Shape, Age, StarlaneFrequency, PlanetDensity, SpecialsFrequency, std::map<int, PlayerSetupData, std::less<int>, std::allocator<std::pair<int const, PlayerSetupData> > > const&)in ServerApp.o

  "Universe::Destroy(int)", referenced from:
      FleetColonizeOrder::ExecuteImpl() const  in libCommon.a(Order.o)
      FleetColonizeOrder::ServerExecute() const  in libCommon.a(Order.o)
      Planet::Conquer(int)  in libCommon.a(Planet.o)

pbxcp: FreeOrion: No such file or directory

pbxcp: freeoriond: No such file or directory

pbxcp: freeorionca: No such file or directory
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Compile Errors (3339)

#2 Post by Geoff the Medio » Fri Jan 29, 2010 2:01 am

I'm not sure what those error messages are supposed to mean. They're just listing various functions and places where they're referenced. It doesn't say what's wrong with them or why it's referencing them, so I'm not sure what the problem is.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Compile Errors (3339)

#3 Post by Bigjoe5 » Fri Jan 29, 2010 2:58 am

Is there any information which I can provide which would help identify the problem? Does the phrase "Undefined symbols:" have any significance?

Every few errors it reads:

Code: Select all

ld: symbol(s) not found
collect2: ld returned 1 exit status
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Compile Errors (3339)

#4 Post by Geoff the Medio » Fri Jan 29, 2010 3:11 am

I'm not familiar with GCC's error output, but it looks like you're getting errors at the linking stage rather than the compiling stage. Occasionally stuff like this has happened when people didn't update properly and had different versions of various source files. Most of the functions mentioned in your post were modified recently, though I don't think all of them were...

Is this your first attempt to build with GCC? If not, were you able to build previous revisions? Also if not your first attempt, it might help to clean up your build and restart from scratch.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Compile Errors (3339)

#5 Post by Bigjoe5 » Fri Jan 29, 2010 4:55 am

I used the same process for building the code as I always have, updating the sdk with svn and then building.

I tried downloading the sdk again, updating it with svn, and then building. This time, I only get 7 error messages. 4 of them are:

Code: Select all

Command /Developer/usr/bin/g++-4.0 failed with exit code 1
the details of which read:

Code: Select all

ld: library not found for -lCommon
collect2: ld returned 1 exit status
Command /Developer/usr/bin/g++-4.0 failed with exit code 1
The other three are the same as the last three from before - "... No such file or directory".

I don't believe that this is a problem with my attempt to redownload the sdk and start from scratch, since that same error message appeared in my first attempt to compile 3339. Are there any recent changes which could have caused an issue with GCC but not MSVC? Is there a particular revision which I should try to compile to see if it works?
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Compile Errors (3339)

#6 Post by Geoff the Medio » Fri Jan 29, 2010 6:03 am

Are you using CMake to set up the makefile to build with? tzlaine recent modified the CMake setup files, so you might need to re-run cmake before building. If you've done that and still get errors, it might be a problem with his changes. From the commit logs, it looks like SVN revision 3329 might be from before those changes.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Compile Errors (3339)

#7 Post by OndrejR » Fri Jan 29, 2010 11:10 am

Problem is not in FreeOrion, but in gcc. I have gcc 4.3.4 and have no problem to compile 3339(with cmake). Try to upgrade from 4.0, but I don't know how in Mac OS X.

User avatar
planetbaker
Space Floater
Posts: 29
Joined: Sun Jan 24, 2010 11:42 am
Location: Sol d

Re: Compile Errors (3339)

#8 Post by planetbaker » Fri Jan 29, 2010 11:49 am

How would a linker error - without preceeding compile errors - be solved by a compiler upgrade?
Unless stated explicitly and differently, any patches or artwork I should post in this forum are licensed under GPL v2 or - at your discretion - any later version of the GPL.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Compile Errors (3339)

#9 Post by OndrejR » Fri Jan 29, 2010 12:38 pm

Linker ld(on Linux, on Mac OS X probably something similar) is in package binutils, which requires libc6, which is essential for gcc and for whole system. If you upgrade binutils, you should probably also upgrade all packages which depends on binutils which is also libc6 and gcc. And FreeOrion has known problems with some versions of gcc(currently tested version on Linux is only gcc 4.3 - version 4.2 has problems).

User avatar
planetbaker
Space Floater
Posts: 29
Joined: Sun Jan 24, 2010 11:42 am
Location: Sol d

Re: Compile Errors (3339)

#10 Post by planetbaker » Fri Jan 29, 2010 2:21 pm

The wiki proposes to use gcc 4.0 on Mac (as 4.2 doesn't work, as also you state). Which is on a Mac - next to gcc 4.2 - the only choice, unless you compile gcc yourself or obtain a 3rd-party build from *somewhere*; but then that would also need integration *somehow* into XCode... or - alternatively - one could try an install of all those linux tools via macports. But that doesn't sound tempting either as it means hundrets of MB source download and hours of compiling with a decent chance that it will fail at some point.

Alas... in a free minute I might also continue to try my luck with it. But maybe the osx maintainer might shed some light on it.
Unless stated explicitly and differently, any patches or artwork I should post in this forum are licensed under GPL v2 or - at your discretion - any later version of the GPL.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Compile Errors (3339)

#11 Post by Bigjoe5 » Fri Jan 29, 2010 2:44 pm

I've been using GCC 4.0 ever since I was first able to build successfully. If there is a reason to upgrade to 4.3, it would have to be as a result of a recent revision.
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Compile Errors (3339)

#12 Post by Geoff the Medio » Fri Jan 29, 2010 5:53 pm

If you're using XCode, can you find a way to remove the Combat.cpp and Combat.h files from the build? I don't know how their inclusion would be relevant to those errors, but the file was deleted recently but not removed from the XCode build since I don't know how to do so without XCode to load it with.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Compile Errors (3339)

#13 Post by Bigjoe5 » Sat Jan 30, 2010 7:15 pm

After removing Combat.cpp and Combat.h, it builds without errors, but when I try to run it, I get a message that says

Code: Select all

GDB: Program received signal: "SIGABRT"
So basically, it won't run, and nothing appears in the log files.
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Compile Errors (3339)

#14 Post by Geoff the Medio » Sat Jan 30, 2010 8:26 pm

Nothing significant has changed in the code recently that would cause weird segfaults where you didn't have them before... Maybe make sure the combat object files were deleted and not compiled into the binary? I dont know how XCode handles things if you remove a source file that's previously been compiled from a project. A full clean and rebuild might help.

User avatar
planetbaker
Space Floater
Posts: 29
Joined: Sun Jan 24, 2010 11:42 am
Location: Sol d

Re: Compile Errors (3339)

#15 Post by planetbaker » Sat Jan 30, 2010 10:12 pm

An interesting fact I found out today, trying to compile the FO SDK as obtained from sourceforge without any changes: The paths to the includes of ogg and vorbis use the wrong capitalization. Correct it must read in the respective places:

#include <Ogg/ogg.h>
#include <Vorbis/vorbisfile.h>

This lapse is not visible, if the file system is configured to ignore capitalization, but fatal otherwise.

EDIT: concerning the SIGABRT: The same problem here (but not when compilint r3094). The interesting part of the error message probably is

Code: Select all

run
[Switching to process 58109]
Running…
terminate called after throwing an instance of 'GG::Flags<GG::GraphicStyle>::UnknownFlag'
  what():  Invalid flag with value 0
Program received signal:  “SIGABRT”.
sharedlibrary apply-load-rules all
(gdb) bt
#0  0x97b4f732 in __kill ()
#1  0x97b4f724 in kill$UNIX2003 ()
#2  0x97be298d in raise ()
#3  0x97bf8a44 in abort ()
#4  0x94517fda in __gnu_cxx::__verbose_terminate_handler ()
#5  0x9451617a in __cxxabiv1::__terminate ()
#6  0x945161ba in std::terminate ()
#7  0x945162b8 in __cxa_throw ()
#8  0x0001b685 in GG::Flags<GG::GraphicStyle>::Flags (this=0xbfffd258, flag={m_value = 0}) at Flags.h:306
#9  0x0001b6c6 in GG::operator|<GG::GraphicStyle> (lhs={m_value = 0}, rhs={m_value = 0}) at Flags.h:411
#10 0x000150f1 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /Users/ingo/Downloads/sdk-freeorion-052409/FreeOrion/Xcode/../UI/FleetWnd.cpp:34
#11 0x000156af in global constructors keyed to _ZN106_GLOBAL__N__Users_ingo_Downloads_sdk_freeorion_052409_FreeOrion_Xcode_.._UI_FleetWnd.cpp_00000000_BE942BD715MeterStatStringE9MeterType () at /Users/ingo/Downloads/sdk-freeorion-052409/FreeOrion/Xcode/../UI/FleetWnd.cpp:2615
#12 0x8fe0ed6d in __dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE ()
#13 0x8fe0d31e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#14 0x8fe0d3d1 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE ()
#15 0x8fe024a9 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#16 0x8fe07950 in __dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_ ()
#17 0x8fe018b1 in __dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKcl ()
#18 0x8fe01057 in __dyld__dyld_start ()
Unless stated explicitly and differently, any patches or artwork I should post in this forum are licensed under GPL v2 or - at your discretion - any later version of the GPL.

Post Reply