Mac OS X 10.9 Mavericks : Some progress but now Boost errors

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Message
Author
AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#16 Post by AndrewW »

Dilvish wrote:For Ubuntu (and probably other linux varieties) Ogre 1.9 is only available as a prebuilt package in the most very recent versions (14.04, out for about six months now), which many people (including myself) haven't moved to yet.
Just checked, with Gentoo it's at Ogre 1.8.1 even with going to the 'unstable' branch.

Eloque
Space Squid
Posts: 53
Joined: Mon Jul 21, 2014 11:56 am

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#17 Post by Eloque »

I am new here, so please forgive me if I ask anything stupid. Also, since this already about Mac OS, I figured asking here be better then starting a new thread.

I am currently successful in compiling on Mac OS, 10.9.2, however, I can't get a debug session started for the life of me. That might be my inexperience with XCode, usually I code in Eclipse style IDE's, notepad++ or Bloodshed. However, I currently have some layovers and only my MacBook on me.

I downloaded the SDK, I've updated via SVN and I can compile no problem. The resulting binary runs as well, however, I cannot start a debug session. I keep getting this;

Code: Select all

main() caught exception(std::runtime_error): Unknown option "-N" was given.
main() failed config.
Anyone got a clue? I checked al around XCode, but so far, nothing, it is supposed to start with 0 arguments.
Code, justify, code - Pitr
Attached patches are released under GPL 2.0 or later, artwork and such are released under CC-BY-SA 3.0 license.

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#18 Post by Vezzra »

Eloque wrote:Anyone got a clue? I checked al around XCode, but so far, nothing, it is supposed to start with 0 arguments.
First of all you need to tell Xcode to make a debug build. And even then the only way I ever managed to use the debugger with FO was to launch the FO app from the finder, not from within Xcode, and then attach the debugger to the FO process I wanted to debug (client, server or one of the AI processes). This is done via the Debug/Attach to process menu.

However, the last time I tried that was on OSX 10.6 with Xcode 3. Never on Mavericks with Xcode 5.

Eloque
Space Squid
Posts: 53
Joined: Mon Jul 21, 2014 11:56 am

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#19 Post by Eloque »

Vezzra wrote:
Eloque wrote:Anyone got a clue? I checked al around XCode, but so far, nothing, it is supposed to start with 0 arguments.
First of all you need to tell Xcode to make a debug build. And even then the only way I ever managed to use the debugger with FO was to launch the FO app from the finder, not from within Xcode, and then attach the debugger to the FO process I wanted to debug (client, server or one of the AI processes). This is done via the Debug/Attach to process menu.

However, the last time I tried that was on OSX 10.6 with Xcode 3. Never on Mavericks with Xcode 5.
Well, that at least works. I can run the the binary and attach. Well, that is a start. Wonder why I can't just start from XCode, but hey, tx!
Code, justify, code - Pitr
Attached patches are released under GPL 2.0 or later, artwork and such are released under CC-BY-SA 3.0 license.

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#20 Post by Vezzra »

Eloque wrote:Wonder why I can't just start from XCode
When it comes to computers and their oddities, I've stopped wondering a loooooooong time ago... ;)
but hey, tx!
You're welcome :D

And, btw, welcome to our forum as well :D

Eloque
Space Squid
Posts: 53
Joined: Mon Jul 21, 2014 11:56 am

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#21 Post by Eloque »

Spoke a bit too soon. It worked for a bit, but every time I try to step into a function, it crashes.

Latest XCode, clean checkout from SVN, the compiled binaries run. But debugging remains next to impossible. I blame my lack of knowledge of XCode, but the error "Unknown option "-N" was given." keeps popping up. Has anyone actually succeeded in building/debugging inside XCode?
Code, justify, code - Pitr
Attached patches are released under GPL 2.0 or later, artwork and such are released under CC-BY-SA 3.0 license.

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

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#22 Post by Geoff the Medio »

Maybe add a line at the start of the client main() to output the full text of what was called to run it?

It does look like XCode is calling with some parameters that FreeOrion doesn't recognize.

Alternatively, you could edit the parameter checking code to not throw when it sees an unrecognized parameter.

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#23 Post by Vezzra »

Eloque wrote:Has anyone actually succeeded in building/debugging inside XCode?
Yes, although that was a long time ago, as I already mentioned, with Xcode 3 on OSX 10.6. And even that was always shaky at best. I've never tried using the debugger with Xcode 5 on OSX 10.9 (partly because making debug builds has always been difficult, so I've given up on using the debugger).

Just to be sure: You have made sure that you have a debug build, right? Because the normal build you get when just hitting ⌘-B is a release build, without debug symbols and with code optimization enabled. If you try to use the debugger with that you probably won't get very far...

Eloque
Space Squid
Posts: 53
Joined: Mon Jul 21, 2014 11:56 am

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#24 Post by Eloque »

Yeah, I am pretty sure I build the debug version.

I can attack the debugger if I start the binary outside XCode, but as soon as I hit a breakpoint and then try to step into a function, both XCode and FreeOrion crash.
Code, justify, code - Pitr
Attached patches are released under GPL 2.0 or later, artwork and such are released under CC-BY-SA 3.0 license.

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#25 Post by Vezzra »

Eloque wrote:I can attack the debugger if I start the binary outside XCode, but as soon as I hit a breakpoint and then try to step into a function, both XCode and FreeOrion crash.
Hm... I remember that when I tried debugging with Xcode 3, I could never be sure if execution would actually stop at a breakpoint or just continue. Sometimes it did stop, but I got no indiciation where in the code I was, and only after issuing some single step commands the display would jump to a code location and show me a cursor. As I said, it has been very shaky. Maybe that got worse, to the point where the thing simply crashes when you try to stop at a breakpoint.

But maybe I messed up some setting during the transition to Xcode 5. Can you make a normal release build and compare its size to the debug build? The debug build should be significantly larger. If they are about the same size, then something is messed up with the debug build configuration.

Eloque
Space Squid
Posts: 53
Joined: Mon Jul 21, 2014 11:56 am

Re: Mac OS X 10.9 Mavericks : Some progress but now Boost er

#26 Post by Eloque »

I can, and will, try tomorrow. Then I am back at the Mac, right now, I am using a Windows machine.

But yeah, I noticed some weird stuff with the binaries, sometimes it does debug, sometimes it doesn´t.
Code, justify, code - Pitr
Attached patches are released under GPL 2.0 or later, artwork and such are released under CC-BY-SA 3.0 license.

Post Reply