3582 Build Errors, OS X 10.6

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#76 Post by night »

I am using boost from svn (3 days old).
Gonna try to build it with bjam when I'm back home.

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#77 Post by night »

WOHOOO!
FreeOrion built successfully after linking the new boost libraries! :D
Now it's crashing immediately after launching:

Code: Select all

main() caught exception(std::runtime_error): Failed to find an Ogre GL render system.

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

#78 Post by Geoff the Medio »

"Failed to find an Ogre GL render system" probably means it's looking for ogre_plugins.cfg but can't find it. I'm not sure exactly where it's expected to be relative to the binary on OSX, but basing things off the v0.3.15 installer's structure might work.

Based on the code, it seems to expect it in:

FreeOrion.app/Contents/Resources

On Windows, it's in the root FreeOrion directory with the binaries. Presumably the original XCode project and OSX SDK had things where they needed to be, so that might also help.

OISInput.cfg should also be in the same location.

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#79 Post by night »

Okay I'll try that.

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#80 Post by night »

Both files need to be in FreeOrion.app/Contents/Executables/
The application keeps crashing even though the files are there.

This is the code from chmain.cpp:194 which is causing the crash (selected_render_systen is 0):

Code: Select all

        RenderSystem* selected_render_system = root->getRenderSystemByName("OpenGL Rendering Subsystem");
        if (selected_render_system == 0)
            throw std::runtime_error("Failed to find an Ogre GL render system.");

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

#81 Post by Geoff the Medio »

night wrote:Both files need to be in FreeOrion.app/Contents/Executables/
Are you sure? In chmain.cpp, the Ogre::Root object is created like this:

Code: Select all

root = new Root((GetRootDataDir() / "ogre_plugins.cfg").string());
So it's looking for ogre_plugins.cfg in the root data directory.

In Directories.cpp, GetRootDataDir() returns the static variable s_root_data_dir which is given a value in InitDirs:

Code: Select all

s_root_data_dir = app_path / "Resources";
where app_path is given a value by code I don't fully understand.

Regardless, it looks like it should be FreeOrion.app/Contents/Resources/
This is the code from chmain.cpp:194 which is causing the crash (selected_render_systen is 0):
That is probably where the crash occurs, but I wouldn't say it's the cause...

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#82 Post by night »

The old build from sourceforge has the files in FreeOrion.app/Contents/Executables and that's where Xcode puts them automatically, too.

EDIT: AWWW I'm so sorry... I read FreeOrion.app/Contents probably I'm too tired to work :( You were completey right - my fault!

Now I get a black window. It crashes after the window appears but I'll fix that tomorrow.
Last edited by night on Fri Jun 17, 2011 9:20 pm, edited 1 time in total.

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

Re: 3582 Build Errors, OS X 10.6

#83 Post by neuro »

Which boost version are you using night? Or can send me the compiled boost libs so I can just use that? sorry, I just finished a compile of 1.45 and have 30 errors with filesystem.

I've got at least 4 versions of boost so that'd just help me out. Otherwise, I'll be swapping in these libraries until I can get a build.

Also, that ogre_plugin.cfg file is in the root of the XCode project, isn't it? I don't see the OISplugin though.

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

#84 Post by Geoff the Medio »

night wrote:The old build from sourceforge has the files in FreeOrion.app/Contents/Executables and that's where Xcode puts them automatically, too.
Weird, but ok...

If you're getting to the point where it's failing to detect a render system, then the ogre.log file should be created. You might check if that is being updated with any useful error information.

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

#85 Post by Geoff the Medio »

neuro wrote:I just finished a compile of 1.45 and have 30 errors with filesystem.
Errors building boost filesystem, or errors compiling FreeOrion?
I don't see the OISplugin though.
It's possible that things work differently on OSX than Windows, so there may be no OISInput.cfg file needed...

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

Re: 3582 Build Errors, OS X 10.6

#86 Post by neuro »

Errors compiling FreeOrion with the boost library I compiled in 1.45. I'm swapping out boost libraries + includes now to see which one worked based on the changes that have been made.

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

#87 Post by Geoff the Medio »

neuro wrote:Errors compiling FreeOrion with the boost library I compiled in 1.45. I'm swapping out boost libraries + includes now to see which one worked based on the changes that have been made.
Whether you've compiled the Boost library or not shouldn't affect compile errors of FreeOrion... The compiled libraries are only used when linking, and compiling just uses the headers.

What are these errors? I was under the impression I'd fixed all the code to work with both filesystem2 and filesystem3, but Linux may have its own issues I don't get on Windows.

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#88 Post by night »

neuro wrote:Which boost version are you using night? Or can send me the compiled boost libs so I can just use that? sorry, I just finished a compile of 1.45 and have 30 errors with filesystem.
As I said before I am using Boost from svn.
I uploaded the compiled libs here. Make sure that you put them at the top of the list, so the old ones get ignored.
OISInput.cfg is hidden in freeorion-sdk/FreeOrion/GG/src/Ogre/Plugins. You have to add a new build phase to the target FreeOrion in which you copy the OISInput.cfg and the ogre_plugins.cfg to Resources.
Last edited by night on Fri Jun 17, 2011 10:51 pm, edited 1 time in total.

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

#89 Post by Geoff the Medio »

night wrote:Now I get a black window. It crashes after the window appears but I'll fix that tomorrow.
Could you post ogre.log and freeorion.log from after the crash? Or is there something output on the command line?

night
Space Kraken
Posts: 102
Joined: Sun Jun 12, 2011 1:21 pm

Re: 3582 Build Errors, OS X 10.6

#90 Post by night »

I did not want to bother you with the error but here it is:

Code: Select all

main() caught exception(GG::Font::BadFile): Face object created from "DejaVuSans.ttf" was invalid

Post Reply