Author Topic: Building PS on the Mac  (Read 8869 times)

named

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #45 on: February 01, 2006, 10:43:25 pm »
I finaly did spot my problems, seams to be the fink library:s.
Is not the standard paths. and did a downgrade of sql.

Have to get this sorted and get back to you.

regards,
named

named

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #46 on: February 20, 2006, 09:22:58 pm »
When building Planeshift I get:

...failed C++ ./out/macosxppc/debug/plugins/sndsys/renderer/software/drivers/coreaudio/driver_coreaudio.o ...
...skipped sndsyscoreaudio.csbundle for lack of driver_coreaudio.o...

Cant figure it out...

I need help / Ideas.

regards
« Last Edit: February 26, 2006, 01:33:42 am by named »

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #47 on: February 26, 2006, 07:19:59 am »
Which CS date is this from?  The sound plugin (coreaudio for the mac) is broken at the moment anyways, but should compile.  CS as of the 17th has a minor break on the Mac though, there\'s an #if that needs to be changed to #ifdef
Quidquid latine dictum sit, altum sonatur.

named

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #48 on: February 26, 2006, 11:32:37 am »
Hi dfryer Im glad to get a respond here :-)

Using cal3d-0.9.1, cant compile/build cal3d-0.10.0 or any CS version?
Where do I find the \"#if that needs to be changed to #ifdef\"?

After building Planeshift (ignoring the coreaudio error).
When I start the server I get:

[40mWARNING: could not load plugin \'crystalspace.kernel.vfs\'
 * This likely means that the plugins could not be found.
 If you\'re a user: Check the working directory the application starts from - usually, it is the same as the directory with the executable.
  If in doubt, contact the vendor.
 If you\'re a developer: Check if the CRYSTAL environment var points to the
  correct location - usually the directory CS was built in.
ERROR: csInitializer::SetupConfigManager failed!
Is your CRYSTAL environment variable set?

Could all this weird things be related to gcc-4.0?
(Im on OS X 10.4.4.5 latest Xcode)

Post edited for this reason :
https://sourceforge.net/tracker/index.php?func=detail&aid=1311220&group_id=649&atid=100649

Anyone got experience of this?
« Last Edit: February 26, 2006, 06:24:04 pm by named »

backeroo

  • Hydlaa Resident
  • *
  • Posts: 129
    • View Profile
(No subject)
« Reply #49 on: February 26, 2006, 07:11:20 pm »
I guess it\' s here :

libs/csutil/radixsort.cpp:57:18: #if with no expression

regards

  backeroo
\"Everything you can imagine is real.\"
Pablo Picasso

Cha0s

  • Veteran
  • *
  • Posts: 1860
    • View Profile
(No subject)
« Reply #50 on: February 26, 2006, 09:44:31 pm »
Yes, gcc 4 = bad. Don\'t use it. There\'s a script to change gcc version somewhere on the Mac... Don\'t recall it exactly at the moment. Probably findable in Google...
Cha0s
Mac OS X Forum Moderator
In-Game Roleplay Forum Moderator
Please search and skim existing threads before posting!

backeroo

  • Hydlaa Resident
  • *
  • Posts: 129
    • View Profile
(No subject)
« Reply #51 on: February 26, 2006, 10:24:03 pm »
gcc_select 3.3 as root or with sudo.

regards

  backeroo
\"Everything you can imagine is real.\"
Pablo Picasso

named

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #52 on: February 27, 2006, 09:06:38 am »
After the change to gcc 3.3 and building Planeshift with ./configure --enable-debug --enable-new-renderer    jam
I get :
warning: `friend\' is not at beginning of declaration
warning: `static\' is not at beginning of declaration
warning: `virtual\' is not at beginning of declaration

Planeshift does compile anyway but of course it wont start, getting:
[40mWARNING: could not load plugin \'crystalspace.kernel.vfs\'

Im lost here.......
What OS ver. are you guys using to make this work? 10.3.8?
Im on.
G5 dual 2.0
8.5g ram
ATi 9600xt

Os X 10.4.5
Xcode 2.2

backeroo

  • Hydlaa Resident
  • *
  • Posts: 129
    • View Profile
(No subject)
« Reply #53 on: February 27, 2006, 09:38:31 pm »
Didn\'t say i got it working. But anyway, got almost the same Configuration then you, named (except memory, of course).

I\'m already stuck in finding a working CS/cel, planeshift compiles on.

So, which CS/cel version are the Gurus building on?

regards

  backeroo
\"Everything you can imagine is real.\"
Pablo Picasso

mizar2

  • Traveller
  • *
  • Posts: 19
    • View Profile
(No subject)
« Reply #54 on: February 28, 2006, 04:25:59 am »
Since building planeshift changes slightly with time and previous information is missing a few details that confuses people I\'m updating this as I learn new things.  The source code from the dates I chose builds without errors.  If you run the java updater you get the art and data files and more, including whatever the current Mac apps are.  So if you want to run your build you need to rebuild after updating.  I recommend keeping two planeshift directories, one official one and your built one.

This is with OS X 10.4.6 and you need to understand how to setup up Fink unstable (update Fink before going to unstable)--Darwin Ports may also work but I have not played with that yet at all. [m] marks my fixes.

Use Fink unstable to install: autoconf2.5, autogen, autogen-dev, autogen-shlibs, automake1.8, jam, freetype2, freetype2-dev, freetype2-shlibs, libiconv, libiconv-bin, libiconv-dev, libjpeg, libjpeg-bin, libjpeg-shlibs, libogg, libogg-shlibs, libpng3, libpng3-shlibs, libtool14, libtool14-shlibs, libvorbis0, libvorbis0-shlibs, m4, curl-dev, openssl097-dev,  mysql15-dev, mysql, mysql-client (libiconv-shlibs is part of libiconv)

[m] based on crystalspace configure output I also added as an experiment: lib3ds bison swig swig-shlibs lcms lcms-shlibs libmng2 libmng2-shlibs libmikmod libmikmod-shlibs libcaca-dev sdl
[m] to use svn to get files from sourceforge, install: svn-client-ssl
----------------------------
cd ; mkdir src ; cd src

setenv CRYSTAL    ~/src/CS
setenv CEL        ~/src/cel
setenv CSCONFPATH ~/src/cel
setenv CSDIR  ~/src/CS
setenv PSDIR  ~/src/planeshift
setenv CELDIR ~/src/cel
setenv CFLAGS -O3
setenv CXXFLAGS -O3

If your shell is bash instead of tcsh use \"export CRYSTAL=path\" instead of \"setenv CRYSTAL path\", etc.
----------------------------
[m] for OS X 10.4 only
cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od login
cvs -d :pserver:anonymous@anoncvs.opendarwin.org:/Volumes/src/cvs/od co -d dlcompat proj/dlcompat
cd dlcompat
make clean
autoconf
./configure --enable-fink --prefix=/sw
make
sudo make install
cd ..
----------------------------
sudo gcc_select 3.3
** I\'m not sure if this is neccessary anymore, I\'m building with 4.0.1 now
** do \"sudo gcc_select 4.0\" after you are done and before updating fink
----------------------------
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cal3d login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cal3d co -P cal3d
cd cal3d
[m] emacs -nw autogen.sh
[m] -if libtool --version < /dev/null > /dev/null 2>&1 ; then
[m] +if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
./autogen.sh
./configure --enable-debug
[m] emacs -nw src/cal3d/Makefile
[m] to search in emacs use: crtl-s all_lib
[m] -all_libraries = @all_libraries@
[m] +all_libraries =
make
sudo make install
cd ..
----------------------------
cvs -d:pserver:anonymous@cvs.crystalspace3d.org:/cvsroot/crystal login
cvs -z3 -d:pserver:anonymous@cvs.crystalspace3d.org:/cvsroot/crystal co -D \"2006-04-14 00:00:00\" crystal
or
svn co https://svn.sourceforge.net/svnroot/crystal crystal
(side effect your crystal space and cel files could be from different dates)
----
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cel login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cel co -D \"2006-04-14 00:00:00\" cel
----------------------------
if sourceforge is acting up you can grab a tarball from the CrystalSpace site for CS and cel -- I used one from late on Apr. 13, look down the page to CVS section
<http://www.crystalspace3d.org/tikiwiki/tiki-index.php?page=Download> (this seems to be the easiest way to get matching versions of crystal space and cel, especially given the issues with source forges cvs server lately).
----------------------------
cd CS
./configure --enable-debug --enable-new-renderer --without-python
jam libs ; jam plugins ; jam cs-config
----------------------------
cd ../cel
./configure --enable-debug --enable-new-renderer --without-python
jam
----------------------------
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/planeshift login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/planeshift co -P planeshift

cd ../planeshift
setenv CPPFLAGS \"-I/sw/include/mysql -I~/src/cel/include\"
setenv LDFLAGS \"-L/sw/lib/mysql\"
./autogen.sh
./configure --enable-debug --enable-new-renderer
jam

cd ~/src/planeshift/psclient.app/Contents/Resources
~/src/planeshift/support/macosx/cslibs.sh
-- regarding the errors ---
[m] cssgiimg & cswalimg gone 13-Jan-2006
[m[ opcode renamed to csopcode 16-Dec-2005
[m] no files in CS contain strings \'sndogg\' or \'sndplex\'
[m] \'snddoft\' & \'casnddrv\' & \'sndwav\' & \'sndmod\' seem to be gone as well
[m] given that cslibs.sh is totally out of date I used the following
[m] cp ~/src/CS/*.cs* ~/src/planeshift/psclient.app/Contents/Resources/.
------------------------------
cd ~/src/planeshift/updater.app/Contents/Resources/
~/src/planeshift/support/macosx/updaterlibs.sh
cd ~/src/planeshift
~/src/planeshift/support/macosx/internallibs.sh
-----------
[m] I manually copied cspngimg.csbundle & freefnt2.csbundle
to ~/src/planeshift/pssetup.app/Contents/Resources/.
-----------

copy art, etc. from PC, Linux, or Mac install (untested at the moment).  See note at top about using Java Updater (thanks Optagon).
« Last Edit: April 16, 2006, 05:06:30 pm by mizar2 »

named

  • Hydlaa Resident
  • *
  • Posts: 78
    • View Profile
(No subject)
« Reply #55 on: February 28, 2006, 11:48:52 am »
Hi.

Thanks mizar2!!!
Did miss the:
 \"export CSDIR=${~/src/CS} or setenv CSDIR ~/src/CS
export PSDIR=${~/src/planeshift} or setenv PSDIR ~/src/planeshift
export CELDIR=${~/src/cel} or setenv CELDIR ~/src/cel \"

About the libiconv-shlibs , strange should be in fink. Dont really get it how you can compile/build without them.

About the CS/cel version, I use the latest CVS.

I did use these:
dlcompat
http://www.opendarwin.org/projects/dlcompat/
3dcal
http://cal3d.darwinports.com/                                  
libpng
http://www.libpng.org/pub/png/libpng.html
libjpeg
http://ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz

So ... Im gone try again :-)
« Last Edit: February 28, 2006, 12:10:53 pm by named »

Optagon

  • Wayfarer
  • *
  • Posts: 3
    • View Profile
(No subject)
« Reply #56 on: April 16, 2006, 11:29:48 am »
Hello! Today i could build my PS client from source and played PS as fine.
thank you Mizar for your very kindful instructions!!!

i installed all the libraries and also MySQL using Fink
i once installed cal3d using Darwin Ports but it is out dated. ( i also heard about it in IRC PlaneShift Channel.)
i also built it with gcc 4.0.1

My shell is bash so i wrote ...
export CRYSTAL=~/src/CS
export CEL=~/src/cel
export CSCONFPATH=~/src/cel
export CSDIR=~/src/CS
export PSDIR=~/src/planeshift
export CELDIR=~/src/cel
export CFLAGS=-O3
export CXXFLAGS=-O3
----------------------------
export CPPFLAGS=\"-I/sw/include/mysql -I~/src/cel/include\"
export LDFLAGS=\"-L/sw/lib/mysql\"

once i finished to build PlaneShift, i could run pssetup.app and updater.app from Terminal.
but it was not useful.
and also psclient.app didn\'t contain some important files.
so I manually copied all the files that should be in there from 013 version.
(also copied all files that wasn\'t in other directories but is in 013)

then i ran Updater.jar for updating. it worked fine.
i use PSClientCMD.jar for launching PS client.
Using -fullbright is much smoother than usual for me

*sorry for my bad english
« Last Edit: April 16, 2006, 03:29:33 pm by Optagon »

mizar2

  • Traveller
  • *
  • Posts: 19
    • View Profile
(No subject)
« Reply #57 on: April 16, 2006, 04:48:33 pm »
The instuctions I listed are the debug configuration so it may be slower then the released build, I\'m playing around with building an optimized PS/CS/cel with gcc 4.0.1 but with the source I chose and my options the center section of the arena is very dark even after relighting--my optimized build of 014b relights everything in 1/10 the time of the last released build of 013 (win some, lose some).

If you run the java updater you get the art & data files, along with the Mac apps now, which mostly work, so you may not be running what you built unless you rebuild PS after updating--not that this is a bad thing.  I haven\'t tested the server but I think it got built in my tests.  I have no idea what the other apps in the PS or CS areas do.

ps: Optagon - bad english, no. It wouldn\'t pass for an English major in school but then most of mine is not up to that standard either.