Crystal Space
Welcome, Guest. Please login or register.
September 17, 2014, 10:42:33 pm

Login with username, password and session length
Search:     Advanced search
9018 Posts in 2051 Topics by 8471 Members
Latest Member: Jeffhogan
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Mac CS Install?
« previous next »
Pages: [1] Print
Author Topic: Mac CS Install?  (Read 5091 times)
Macunixgeek
Newbie
*
Posts: 3


View Profile
« on: October 12, 2008, 01:55:19 am »

How do I install CS for the Mac, and get Xcode to see it? I know it compiles, but I have no idea how to make the compiler see the library.
Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #1 on: October 20, 2008, 04:38:59 pm »

To "install" CS, you probably have to "jam install" once CS was built.
It's probably not required, tho.
For XCode to "see" CS, you almost certainly have some [project] settings to tweak,
like include dir, lib dir, and some flags (like those given by `cs-config --cxxflags` and `cs-config --libs`).
I don't know Mac OS nor XCode, so I can't say much more.
Logged
Penwriter
Newbie
*
Posts: 9


View Profile Email
« Reply #2 on: October 26, 2008, 04:04:15 pm »

I am having a similar problem. I used 'cs-config --libs' to get the library designations for CS. I got the following:

Code:
-L././out/macosxppc/optimize/libs -lcrystalspace_python-1.2 -lcrystalspace_opengl-1.2
-lcrystalspace_macosx-1.2 -lcrystalspace-1.2  -lz -framework OpenGL -lm
-L/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3 Python -ldl  -lm -lmx -ldl
-L/usr/local/lib

Putting the paths in the library search paths didn't seem to help, but adding the above to 'Other linker flags' did... with the exception of the word 'Python' which gives me a 'not found' error. Removing that line (every space delimited phrase becomes a new line in the get info editor window) and things seem to start working. However, adding to the mix is that I am trying to link with the CEL library as well, and I can't seem to determine the proper reference for it. Any clues?

And yes, I'm a noob to all of this so I apologize in advance if this is explained elsewhere.
Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #3 on: October 26, 2008, 04:27:02 pm »

Putting the paths in the library search paths didn't seem to help, but adding the above to 'Other linker flags' did... with the exception of the word 'Python' which gives me a 'not found' error. Removing that line (every space delimited phrase becomes a new line in the get info editor window) and things seem to start working. However, adding to the mix is that I am trying to link with the CEL library as well, and I can't seem to determine the proper reference for it. Any clues?

mmm, I guess the standalone Python should be -framework Python.
For CEL compile/link flags, there's cel-config script which works in a similar fashion.
Are you using 1.2.1 or just 1.2 ? It may be that it was fixed later.
It may also be good to check with 1.4 (future stable release) SVN branch. The URL for 1.4 SVN are:
https://crystal.svn.sourceforge.net/svnroot/crystal/CS/branches/release/V1.4
https://cel.svn.sourceforge.net/svnroot/cel/cel/branches/release/V1.4
Logged
Penwriter
Newbie
*
Posts: 9


View Profile Email
« Reply #4 on: October 26, 2008, 04:42:56 pm »

First, thank you, thank you, thank you for the quick reply.

Adding '-framework Python' fixed that issue.

I am using CEL 1.2.1.

I could not find cel-config, but cel-config-1.2 --lib was there and yielded no results.

Do you suggest I skip the 1.2 branch and begin working with 1.4 now?
Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #5 on: October 26, 2008, 04:53:01 pm »

I could not find cel-config, but cel-config-1.2 --lib was there and yielded no results.

What about cel-config-1.2 --libs ?
As for 1.4, it's up to you wink
If you get too many problems with 1.2, yes, I'd suggest upgrading to 1.4, which needs testing too wink
Also, it's not likely that new fixes will be made in 1.2 branch, but you can help making 1.4 better.
Logged
Penwriter
Newbie
*
Posts: 9


View Profile Email
« Reply #6 on: October 26, 2008, 05:21:13 pm »

Here is what I got:
Code:
[Powerbook:~/cel-src-1.2.1] annelies% ./cel-config-1.2 --libs
 celtool
 cel_python

Unfortunately, noob that I am, I don't know how to add this into the link flags to make it work. I'll switch to the 1.4 as soon as I can figure out how to make the svn work... reading the subversion guide is giving me a migraine. It doesn't seem that there are a lot of mac users working in this environment yet. When I feel more competent in this, I'll be working on some additional startup guides Smiley
Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #7 on: October 26, 2008, 05:33:55 pm »

Here is what I got:
Code:
[Powerbook:~/cel-src-1.2.1] annelies% ./cel-config-1.2 --libs
 celtool
 cel_python

Ah, with CEL you need to pass --lflags argument, like in ./cel-config-1.2 --lflags.
You can also check --help with cs-config or cel-config wink
Logged
Penwriter
Newbie
*
Posts: 9


View Profile Email
« Reply #8 on: October 26, 2008, 09:25:15 pm »

The plot thickens...

I was able to get the proper (I guess) link flags using the cel-config script. But I get link errors indicating that I am trying to use i386 architecture (arch type 18) with ppc processor (arch type 7). The problem seems to be in the last two lines of:
Code:
-L/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3
-framework
Python
-ldl
-lm
-Wl,-framework,AppKit
-Wl,-framework,Foundation

When I remove the last two lines, I no longer have the architecture conflict, but it seems that most of the cs symbols can't be found (no such errors before adding the references to the CEL libraries). Argh! Is this a bug, or am I still missing something?

edit: upon further research, I think the problem is related to bringing in the two frameworks, AppKit and Foundation, which are universal binaries, meaning that they include both ppc and i686 variants, but the CS SDK only built ppc binaries. Ultimately, I'd want to produce universal binaries in the final product, so any ideas how to get the CS install to make both versions of the libraries?
« Last Edit: October 27, 2008, 01:30:24 pm by Penwriter » Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #9 on: November 03, 2008, 11:13:02 pm »

I think you first should try with CS/CEL 1.4 branch, to check if things go better now.
If not, you should either post a mail to the mailing list, or file a bug report, in order to reach people with knowledge about CS on Mac...
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 9.476 seconds with 17 queries.