Mac OS X General Release for 0.80 - Page 2

Mac OS X General Release for 0.80

Discuss everything related to compiling and running Spring on Mac OS X.

Moderator: Moderators

User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

Tobi wrote:In float3.h:36, change

Code: Select all

#ifdef _MSC_VER
to

Code: Select all

#if defined(_MSC_VER) || defined(__APPLE__)
In float3.cpp:24, change

Code: Select all

#ifdef _MSC_VER
to

Code: Select all

#if defined(_MSC_VER) || defined(__APPLE__)
I think that will get rid of all the 'float3::' undefined references.

If it does, let me know, then I'll commit this change.


MacMessageBox is currently not implemented; could comment the call out temporarily in errorhandler.cpp:50.


I've no clue about CSound::CSound(), maybe doublecheck that Sound.cpp is being linked in?
Those float changes worked, thank you.

Okay this has allowed me to nearly compile all the source code on Mac.

CSound isn't being found because I commented out the sound, because I cannot work out the error it is throwing at me (only know a handful of object based coding)

I will post the sound error I am getting, and maybe someone here can help out.
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

Code: Select all

/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp: In constructor ÔÇÿCSound::CSound()ÔÇÖ:
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:53: error: expected initializer before ÔÇÿ*ÔÇÖ token
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:54: error: ÔÇÿdeviceNameÔÇÖ was not declared in this scope
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:83: error: invalid conversion from ÔÇÿconst char*ÔÇÖ to ÔÇÿALCubyte*ÔÇÖ
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:83: error:   initializing argument 2 of ÔÇÿALCboolean alcIsExtensionPresent(ALCdevice*, ALCubyte*)ÔÇÖ
/Users/adso/Coding/Spring/spring_0.80.2/rts/System/Sound/Sound.cpp:86: error: invalid conversion from ÔÇÿALCubyte*ÔÇÖ to ÔÇÿconst char*ÔÇÖ
make[2]: *** [rts/CMakeFiles/spring.dir/System/Sound/Sound.cpp.o] Error 1
make[1]: *** [rts/CMakeFiles/spring.dir/all] Error 2
make: *** [all] Error 2
Keeping in mind I have the latest OpenAL headers installed.

Edit - Seems like the OpenAL headers that ship with OSX are not compatible with Spring!

What I did was remove an OpenAL framework folders and downloaded and compiled this : http://kcat.strangesoft.net/openal-rele ... 66.tar.bz2

Sound.CPP now compiles fine :)
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

Good news!

I have compiled Spring 0.80.2 on OSX!

However i'm getting this when I go to run the application :

Code: Select all

spring
dyld: Library not loaded: libboost_regex-xgcc40-mt-1_39.dylib
  Referenced from: /usr/local/bin/spring
  Reason: image not found
Trace/BPT trap
:)
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

springlobby compiled also

when you run the app, it doesn't allow you to focus on the program, so it's unusable...
Snapshot 2009-08-24 14-04-23.jpg
(189.88 KiB) Downloaded 30 times
attached is just a screenshot of it running :)

alright, I'm out for the next couple of days!
hopefully there is more to see when I return!
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Mac OS X General Release for 0.80

Post by koshi »

Apple decided that programs need to be made an app bundle or they won't get focus.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Mac OS X General Release for 0.80

Post by lurker »

...why let it have a gui at all if you won't be able to focus it?
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

hey guys, couldn't stay away at my mates place :p

remembered an easy way for commandline apps to get focus, just fakes an app bundle with a script launcher :)

i'll sort it out and test out spring lobby when I get home :D

still would like to solve the mystery of spring not working once compiled? can i assume it's not finding all the libraries it requires after being built?

cheers
adam
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Mac OS X General Release for 0.80

Post by Auswaschbar »

adso wrote:still would like to solve the mystery of spring not working once compiled? can i assume it's not finding all the libraries it requires after being built?
Obviously. It is even written which one...
yokosou
Posts: 21
Joined: 10 May 2009, 08:16

Re: Mac OS X General Release for 0.80

Post by yokosou »

Rebasing was exactly what I wanted to do. I'm working on it. Thanks.
adso wrote:still would like to solve the mystery of spring not working once compiled? can i assume it's not finding all the libraries it requires after being built?
Yes, at least libboost_regex-xgcc40-mt-1_39.dylib was not found.

Well, dynamic libraries on Mac have a "install name", the absolute path where they are supposed to reside. When a executable is linked against dynamic libraries, the install names of the libraries are recorded in the executable and will be used to load the library. You can use "otool -L" to see install names recorded in a executable

I suppose the install name of your boost dylib was not set properly when you built boost. If so, adding the directory where boost libs are installed to the DYLD_FALLBACK_LIBRARY_PATH environmental parameter may be a workaround.
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

thanks for that!

Spring is now running for me on OSX!
once I recompile springlobby so that the GUI is accessible, I should be in business!

thanks to all who have helped

[edit]
compiling springlobby from the git-source has compiled it into a neat .app file for OSx!

problem solved!
now to get spring into a .app file :) and see if I can get springlobby and spring to play nicely!
User avatar
Belmakor
Posts: 212
Joined: 16 Nov 2005, 00:01

Re: Mac OS X General Release for 0.80

Post by Belmakor »

adso wrote:thanks for that!

Spring is now running for me on OSX!
once I recompile springlobby so that the GUI is accessible, I should be in business!

thanks to all who have helped

[edit]
compiling springlobby from the git-source has compiled it into a neat .app file for OSx!

problem solved!
now to get spring into a .app file :) and see if I can get springlobby and spring to play nicely!
You, sir, are awesome! Looking forward to seeing the fruits of your labour. And would be good to make sure your changes get pushed into the main tree so that future releases get Mac versions up front with no more of this silly run-around.
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

funniest part is, I had less compile errors with 0.80 than I did with the previous build :)

[edit]
I just need to sort out Springlobby actually loading my libunitsync.dylib and I'm all set to try this out online!

Actually, could someone help me here? I've got libunitsync.dylib and if I try pointing springlobby to this file... it still says it can't read / load this... is there anything special it's looking for? Because in the dialog box to search where the file is... it's looking for a *.bundle extension (spring compiles the unit sync as a single .dylib file)

any help would be appreciated, because I cannot join games without unitsync...

Until then, spring by itself is hardly useable :P

I will start documenting all the changes I made (I can't remember there being too many to be honest) tonight and I will try and get my app bundles online asap for people to try out.

P.S - Here's a teaser screen :p
Snapshot 2009-08-26 20-06-50.jpg
(289.73 KiB) Downloaded 20 times
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Mac OS X General Release for 0.80

Post by Auswaschbar »

adso wrote:funniest part is, I had less compile errors with 0.80 than I did with the previous build :)
I added some patches from some people who tried building on OS X. Good to know it helped.
User avatar
Belmakor
Posts: 212
Joined: 16 Nov 2005, 00:01

Re: Mac OS X General Release for 0.80

Post by Belmakor »

adso wrote: Actually, could someone help me here? I've got libunitsync.dylib and if I try pointing springlobby to this file... it still says it can't read / load this... is there anything special it's looking for? Because in the dialog box to search where the file is... it's looking for a *.bundle extension (spring compiles the unit sync as a single .dylib file)

any help would be appreciated, because I cannot join games without unitsync...

Until then, spring by itself is hardly useable :P

I will start documenting all the changes I made (I can't remember there being too many to be honest) tonight and I will try and get my app bundles online asap for people to try out.
Looking good. Do you have a spring settings program compiled, or, how do we change the settings for Spring?

I am willing to help out if you like. I'm up for a few more hours and on my Mac Pro. I have XCode installed. If you could point me at some archives of code to build/play with let's see if we can't get this sorted asap.

Belmakor
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Mac OS X General Release for 0.80

Post by koshi »

springsettings will work as soon as springlobby loads unitsync, both standalone and integrated
maybe get onto #springlobby on main server / irc #springlobby @ Freenode to get this a bit more interactive?
User avatar
Belmakor
Posts: 212
Joined: 16 Nov 2005, 00:01

Re: Mac OS X General Release for 0.80

Post by Belmakor »

koshi wrote:springsettings will work as soon as springlobby loads unitsync, both standalone and integrated
maybe get onto #springlobby on main server / irc #springlobby @ Freenode to get this a bit more interactive?
Right. I'm there. Wonder if adso is still awake?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Mac OS X General Release for 0.80

Post by imbaczek »

much QQ for
[19:31:12] ** baczek joined the bitwa.
[19:31:12] ** adso left the bitwa( ).
anyway, a way to make gdb useful in your problem:

Code: Select all

(gdb) catch throw
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

I've gotten springlobby to find and utilise unit-sync...

But cannot start a game..
I'm pretty tired. So I will post more when my brain is working!

So close guys!
yokosou
Posts: 21
Joined: 10 May 2009, 08:16

Re: Mac OS X General Release for 0.80

Post by yokosou »

I have a similar problem.

I tried to make a bundle and that worked when it was launched directly. But, when launched from a springlobby, only an error dialog appeared and said.

Code: Select all

Fatal Error

boost::bad_any_cast: failed conversion using boost::any_cast
After some examine, it turned out that it crashes if it is launched with "--name" or "--config" command line option. So, I think BaseCmd::GetString or BaseCmd::GetInputFile causes the crash. Maybe I did something wrong when I installed boost.

I pushed macfix baranch in git. This branch can make a bundle on Mac if float3 is fixed as Tobi said, but it has the problem above. I hope this will help adso a little
User avatar
adso
Posts: 23
Joined: 22 Aug 2009, 04:23

Re: Mac OS X General Release for 0.80

Post by adso »

yokosou wrote:I have a similar problem.

I tried to make a bundle and that worked when it was launched directly. But, when launched from a springlobby, only an error dialog appeared and said.

Code: Select all

Fatal Error

boost::bad_any_cast: failed conversion using boost::any_cast
After some examine, it turned out that it crashes if it is launched with "--name" or "--config" command line option. So, I think BaseCmd::GetString or BaseCmd::GetInputFile causes the crash. Maybe I did something wrong when I installed boost.

I pushed macfix baranch in git. This branch can make a bundle on Mac if float3 is fixed as Tobi said, but it has the problem above. I hope this will help adso a little
This is the exact problem I am having... I was going to look into how boost is laid out on my system and see if that's the cause of the problem...

Slowly getting there..
Post Reply

Return to “Mac OS X”