3582 Build Errors, OS X 10.6

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#16 Post by neuro »

Been trying to re-sync to the latest revision now (r 3991), using the latest XCode (4.0.2), on Snow Leopard 10.6.7. That's changing the build from 10.4 to 10.6.

All the Build Targets are now set to use LLVM GCC 4.2 (instead of GCC 4.0). But I'm still getting some errors all over the place.

GG - 9 errors
Boost/serialization/access.hpp: No such file or directory
There are no arguments to 'BOOST_SERIALIZATION_NVP' that depend on a template parameter, so a declaration of 'BOOST_SERIALIZATION_NVP' must be available
(if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
(etc.)


ClientCommon - 4 issues
Invalid value '4.0' for GCC_VERSION

FreeALUT - 87 issues
alutInternal.h - OpenAL/alut.h: No such file or directory
(etc.)


Common - 577 issues
Enums.h - GG/Enum.h: No such file or directory
Predicates.h - Boost/mpl/assert.hpp: No such file or directory
(etc.)


Should I be reverting prior to r 3991 for XCode? Last time I posted, was about 300- revisions. I'd hate to try to do work and commit by having to go back that far.

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

Re: 3582 Build Errors, OS X 10.6

#17 Post by Geoff the Medio »

Did the same XCode project files work in 10.4?

Most of those problems could be due to issues with the project files. Include directories being not set properly could explain most of the errors. The GCC_VERSION problem suggests there's a setting for that which needs updating in the project files as well.

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#18 Post by neuro »

In my old version, I have a bunch of "merge conflict" issues (as a result of trying to update, then reverting back).

However, I noticed that the User Header Search Paths preference for the FREEALUT build have a reference to $(SOURCE_ROOT)/OpenAL/alut which a) doesn't exist and b) my current project doesn't seem to point to. I made a reference to $(SOURCE_ROOT)/dep/local/include/OpenAL/alut instead.

Could it be a bunch of reference issues? Anyone using Snow Leopard with a copy of the pbx project file that links properly and all the changes I need to link the files?

In my FreeOrion root target there's a reference to these paths:

HEADER_SEARCH_PATHS =
${SOURCE_ROOT}/dep/local/include/python
$(SOURCE_ROOT)/dep/local/include/bullet
$(SOURCE_ROOT)/dep/Frameworks/Cg.framework/Headers
$(SOURCE_ROOT)/dep/local/include
$(SOURCE_ROOT)/../GG
$(SOURCE_ROOT)/../network
$(SOURCE_ROOT)/dep/Frameworks/Ogre.framework/Headers

Which I believe are all present...it's possible I should add more references?

jsena
Space Floater
Posts: 36
Joined: Tue Feb 16, 2010 4:12 pm

Re: 3582 Build Errors, OS X 10.6

#19 Post by jsena »

I was just coming in here to post that 3991 isn't compiling for me as well on OX 10.6.

I was wondering whether the to-do work suggested in the notes of r3983 was ever completed. Those notes suggest that OS X build might be broken until some things are fixed.

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

Re: 3582 Build Errors, OS X 10.6

#20 Post by Geoff the Medio »

jsena wrote:I was wondering whether the to-do work suggested in the notes of r3983 was ever completed.
I suspect not. There hasn't been much (any?) development activity in the last few months.

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#21 Post by neuro »

The odd thing is, that if I grab the Mac OSX from here (http://sourceforge.net/projects/freeori ... ion%20SDK/) and DON'T update via SVN, then the only issues are with GG.

I tried to re-do my steps: download from the link above in sourceforge, update all C/C++ compiler from 4.0 to LVM GCC 4.2, then try to build, only GG is the prob.

OgreGUI.cpp - 'NSIsSymbolNameDefined' is deprecated (declared at /Developer/SDKs/MacOSX10.6.sdk/usr/include/mach-o/dyld.h:175)
il.h - .../freeorion-sdk/FreeOrion/Xcode/dep/local/include/IL/il.h:491: error: '<anonymous>' has incomplete type
ilu.h - .../freeorion-sdk/FreeOrion/Xcode/dep/local/include/IL/ilu.h:125: error: '<anonymous>' has incomplete type
Texture.cpp - .../freeorion-sdk/FreeOrion/Xcode/../GG/src/Texture.cpp:71: error: at this point in file


Maybe something's up with my GG?

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

Re: 3582 Build Errors, OS X 10.6

#22 Post by Geoff the Medio »

Did you update after redownloading the SDK?

There appear to be references to "IL" which appears to be DevIL, an image library that was used some time ago, but not recently. Probably those headers - il.h and ilu.h - could be removed from the build.

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#23 Post by neuro »

Complete update of svn, everything is "Updated to revision 3991."

Cleaned the project (removed all build files).
Set the C/C++ Compiler to point to LVM GCC 4.2 for every Target.

Tried to build FreeOrion (not FreeOrionClient or any other target).

Same issues with those four files.

Went in and deleted il.h and ilu.h from dep/local/include/IL

Texture.cpp still uses references to il.h / ilu.h for DevIL image usage (in lines 32 / 33, and around 176). Had to remove those references otherwise it wouldn't compile.

Still compiling now... it's been on "Common" for a while, but I got through "GG" with only 13 warning for deprecated method usages. If it works, that's a boon!

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

Re: 3582 Build Errors, OS X 10.6

#24 Post by Geoff the Medio »

neuro wrote:Texture.cpp still uses references to il.h / ilu.h for DevIL image usage (in lines 32 / 33, and around 176). Had to remove those references otherwise it wouldn't compile.
Those includes are wrapped in an #if preprocessor condition that checks GG_USE_DEVIL_IMAGE_LOAD_LIBRARY. That shouldn't be defined. The proper solution would be to edit the XCode project so that it isn't.

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#25 Post by neuro »

In XCode, the GG_USE_DEVIL_IMAGE_LOAD_LIBRARY value defined in Config.h in line 33. I changed it from 1 to 0.

When I move on, I get 28 errors from FreeOrionServer.

graph_concepts.hpp
concept_check.hpp

All the errors are basically :


.../freeorion-sdk/FreeOrion/Xcode/dep/local/include/boost/graph/graph_concepts.hpp:63: error: 'boost::concept::requirement<Model>::failed [with Model = boost::concept::usage_requirements<boost::concepts::Graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::property<<unnamed>::vertex_system_id_t, int, boost::property<boost::vertex_index_t, int, boost::no_property> >, boost::property<boost::edge_weight_t, double, boost::no_property>, boost::no_property, boost::listS> > >]' is not a valid template argument for type 'void (*)()' because function 'static void boost::concept::requirement<Model>::failed() [with Model = boost::concept::usage_requirements<boost::concepts::Graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::property<<unnamed>::vertex_system_id_t, int, boost::property<boost::vertex_index_t, int, boost::no_property> >, boost::property<boost::edge_weight_t, double, boost::no_property>, boost::no_property, boost::listS> > >]' has not external linkage

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

Re: 3582 Build Errors, OS X 10.6

#26 Post by Geoff the Medio »

hpp files are includes, not compiled on their own. What source file is including them at that point in the build?

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#27 Post by neuro »

It's in Universe.cpp. Here's a portion of the log :

/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/../universe/Universe.cpp:229: instantiated from 'std::pair<std::list<int, std::allocator<int> >, int><unnamed>::LeastJumpsPathImpl(const Graph&, int, int) [with Graph = boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::property<<unnamed>::vertex_system_id_t, int, boost::property<boost::vertex_index_t, int, boost::no_property> >, boost::property<boost::edge_weight_t, double, boost::no_property>, boost::no_property, boost::listS>]'
/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/../universe/Universe.cpp:870: instantiated from here
/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/local/include/boost/graph/graph_concepts.hpp:63: error: 'boost::concept::requirement<Model>::failed [with Model = boost::concept::usage_requirements<boost::concepts::Graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::property<<unnamed>::vertex_system_id_t, int, boost::property<boost::vertex_index_t, int, boost::no_property> >, boost::property<boost::edge_weight_t, double, boost::no_property>, boost::no_property, boost::listS> > >]' is not a valid template argument for type 'void (*)()' because function 'static void boost::concept::requirement<Model>::failed() [with Model = boost::concept::usage_requirements<boost::concepts::Graph<boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::property<<unnamed>::vertex_system_id_t, int, boost::property<boost::vertex_index_t, int, boost::no_property> >, boost::property<boost::edge_weight_t, double, boost::no_property>, boost::no_property, boost::listS> > >]' has not external linkage


Here were the initial compile settings from that log :

CompileC /Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/Objects-normal/i386/Universe.o ../universe/Universe.cpp normal i386 c++ com.apple.compilers.llvmgcc42
cd /Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode
setenv LANG en_US.US-ASCII
/Developer/usr/bin/llvm-gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -DOGRE_GUI_GLX -DFREEORION_MACOSX -D__MACOSX__ -DFREEORION_BUILD_SERVER -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/freeoriond-generated-files.hmap -I/Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/freeoriond-own-target-headers.hmap -I/Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/freeoriond-all-target-headers.hmap -iquote /Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/freeoriond-project-headers.hmap -I/Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Products/Debug/include -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/local/include/python -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/local/include/bullet -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/Frameworks/Cg.framework/Headers -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/local/include -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/../GG -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/../network -I/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/Frameworks/Ogre.framework/Headers -I/Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/DerivedSources/i386 -I/Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/DerivedSources -F/Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Products/Debug -F/Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/dep/Frameworks -fvisibility=default -c /Users/dominictancredi/Downloads/freeorion-sdk/FreeOrion/Xcode/../universe/Universe.cpp -o /Users/dominictancredi/Library/Developer/Xcode/DerivedData/FreeOrion-eychypdfwmjzqdfxlxznitokdohx/Build/Intermediates/FreeOrion.build/Debug/FreeOrionServer.build/Objects-normal/i386/Universe.o

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

Re: 3582 Build Errors, OS X 10.6

#28 Post by Geoff the Medio »

I don't know how to fix this problem.

What version of Boost are you building with? Googling the "boost::concept::requirement<Model>::failed" and "has not external linkage" gives a few hits for older versions. I'm building with 1.44 on windows.

There's also this which seems to be a similar problem specific to GCC 4.2, which you're using. You may need to update.

You could probably comment out everything in LeastJumpsPathImpl in Universe.cpp from lines 205 to 244. This will break some pathfinding, but might get things to compile...

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: 3582 Build Errors, OS X 10.6

#29 Post by neuro »

I'm not sure what version of boost I'm using, or how to tell.

But it looks like the files in the folder "dep/local/lib/" have files called:

libboost_filesystem-xgcc40-mt.a
libboost_python-xgcc40-mt.a
libboost_regex-xgcc40-mt.a
libboost_serialization-xgcc40-mt.a
libboost_signals-xgcc40-mt.a
libboost_system-xgcc40-mt.a
libboost_thread-xgcc40-mt.a

I tried downloading boost from boost.org, the 1.46 version, and putting it into dep/local/include/boost/ which replaced those files. But same errors. I have a feeling I need to re-compile Boost for 4.2 (which I see it does support here : http://www.boost.org/users/history/version_1_46_1.html - or at least the 1.46 version should.

Any idea in if I should re-create these libraries or... re-compile the boost libraries in the include?

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

Re: 3582 Build Errors, OS X 10.6

#30 Post by Geoff the Medio »

I wasn't aware, and would be surprised if, Boost provided precompiled libraries... I suspect you do need to recompile to change boost versions, although whether the different versions of GCC can work with libraries compiled with older GCC versions, I don't know. Safest thing to do is recompile everything with the same version of GCC.

You might also want to build against 1.44 or 1.45 instead of 1.46, as I think there were some changes to the filesystem library that caused some problems as discussed here.

Post Reply