Instructions on how to build for Mac OSX?

very excited to see “preliminary OSX port” in the release notes for 1.2.1. I could use some help building it, however.

I downloaded panda3d-1.2.1.tar.gz.

Roger’s post here suggests I should be using ppremake, so I tried to compile ppremake following the instructions in BUILD_FROM_CVS.txt. I get this error:


Cannot determine platform; use --with-platform=name.

I looked inside configure.in but didn’t see any obvious choices for osx.

Ideas? A start-to-finish HOWTO would be nice…

As the distribution maintainer, I can honestly say, I have no idea.

I’m going to try to get my hands on a Mac, but no promises.

–with-platform=osx

David

thanks, drwr, that was it.

if I had a clean Mac, I would document what it takes to get running, but I already have 3 versions of python, fink, a ton of stuff…I don’t think it would be representative.

Next problem:

when I run ‘make’ in the panda directory, I get this error:

cd ./src/gobj && make all
g++ -ftemplate-depth-30 -c -o Opt3-osx/gobj_gobj_composite1.o -I. -I/Users/mivey/Desktop/3d/panda3d-1.2.1/panda -I../event -I../express -I../gsgbase -I../linmath -I../mathutil -I../pandabase -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda/include -I/Library/Frameworks/Python.framework/Headers    -g -O2 gobj_composite1.cxx
geomCacheManager.I: In static member function `static void GeomCacheManager::flush_level()':
geomCacheManager.I:69: error: 'class PStatCollector' has no member named 'flush_level'
geomCacheManager.I:70: error: 'class PStatCollector' has no member named 'flush_level'
geomCacheManager.I:71: error: 'class PStatCollector' has no member named 'flush_level'
geomCacheManager.I:72: error: 'class PStatCollector' has no member named 'flush_level'
geomCacheManager.I:73: error: 'class PStatCollector' has no member named 'flush_level'
make[1]: *** [Opt3-osx/gobj_gobj_composite1.o] Error 1
make: *** [gobj] Error 2
ook:~/Desktop/3d/panda3d-1.2.1/panda mivey$

I’ve looked in src/pstatclient/pStatCollector.h and src/pstatclient/pStatCollector.I and flush_level() appears to be defined. Is this something someone else has seen?

Well welcome to the bleeding edge. We saw this bug in one of our builds earlier today and I believe drwr has commited a fix. If not ill get right on it in the morning. I am not at a place to get at the source right know ï

Zovirl
I am not sure you can build panda/osx from the gz that is on the site. I will try and get hold of Josh and find out how old it is. A good indicator is the existence of a osxwindow dir in the panda/src/ directory. If Sorceforge ever comes back to life getting the head of the tree is a good bet. Or maybe I can work with Josh to get a alpha zip up for OSX people.
Another fellow has started to help on this he has got the shaders and nspr working(alpha) and cleaned up allot of the ptools for file conversion and such and done some work on the windowing event system.

Would love any help you can offer and any feedback is defiantly a good thing.   Good or bad.     I have drop a anonymous ftp server up on 198.178.189.30  you may want to grab the 

pub/panda.tar.gz
pub/ppremake-1.19.tar

This is the a tar of major panda directries from the cvs root on about Apr 17 15:00 … The premake is the source I used.

Cheers
Roger

Version 1.2.0 is a snapshot from last Wednesday, plus a few bugfixes here and there.

Here’s a patch that applies cleanly to Roger’s dist that fixes the compile issues I found. Most stuff won’t work without a few other fixes. (see patch two)

mazin.net/panda/panda-osx-1.patch

Below, find a patch to get direct, pandatool, nspr and cg going too. This also applies directly to Roger’s CVS tarball.

You’ll need cg 1.4.1 from Nvidia’s site and the latest nspr from Mozilla.

mazin.net/panda/panda-osx-2.patch.bz2

I’m puzzled by some of the Sources.pp changes I had to make. I have a feeling I’m missing a step somewhere. This did make it work for me though.

I can confirm that with these patches most of panda works fine for me on osx. I did have a bit of trouble with some shaders that I’m working on tracking down. I’m also working on integrating openal and a few other osx issues.

wow that’s a lot of replies, fast :slight_smile:

I got the source from the download section of this site, panda3d-1.2.1.tar.gz. It does not have panda/src/osxwindow, although it does have panda/src/osxdisplay.

I will try CVS and/or the version Roger put up plus the patches posted by tetious and report back.

Edit: this post originally asked about this error message:


/usr/bin/libtool: can't locate file for: -lnet

but I had made a mistake and not fully compiled panda. Oops.

Anyway, it turns out my iBook isn’t up to this job. It runs out of memory running interrogate in panda/src/display. After about an hour of hard-drive thrashing I decided that was enough and killed it. Any chance someone could post a pre-compiled version for OSX 10.4.5?

I will try to do this later today if someone doesn’t beat me to it. :slight_smile:

Thanks Tetious, that would be great.

For what it’s worth, I let it run overnight and it actually finished. I still can’t compile direct, though, because the net library wasn’t compiled. Possibly because I don’t have NSPR? (I couldn’t figure out where to download it for OSX) Since ./configure & ppremake didn’t give me any errors I assumed it would just compile without network code. Perhaps not?

A pre-compiled version would still be very useful.

Yeah, it should have compiled fine without support for NSPR. It wouldn’t have built the net library, but it should have built Makefiles for Direct that don’t require -lnet.

You could try running ppremake in Direct again to see if it changes anything. You should also check your Config.pp file to make sure you are not explicitly enabling something that you don’t have, for instance, make sure you don’t have a line like:


#define HAVE_NSPR 1

or:


#define HAVE_NET 1

David

This is probably my fault. I manually edited many of the Sources.pp to add net in because direct compilation was failing due to missing symbols from libnet. (even with nspr turned off)

I probably did something wrong to cause that, but I’ve not spent much time trying to figure it out and the process by which pp determines dependencies isn’t obvious to me.

Anyway, nspr can be found here: mozilla.org/projects/nspr/

The latest tarball worked for me, although I did have to manually install the headers. I put them in the system include path where panda’s build process was expecting them. You might be able to find a framework somewhere, but I wasn’t able to.

I’m still working on a precompiled panda tarball. Something I’m doing is making gigantic libraries. The libs folder is nearly 1GB uncompressed. Part of the problem is probably my compile settings. The other part is the way python extensions seem to work in osx – a .so for every .dylib. I think there’s a way around that, but I’ve not found anything right off and my time is limited for the next few days.

I’m compiling so much stuff you’d think I was on gentoo :slight_smile: I used the Config.osx.pp file. Looks like I should go give it a close look and see what it has to say about net and nspr.

The biggest issues I see are

1 Need to change the way optional libraries are linked in. Just putting xxxxx:c in the Sourerce.pp libs sections is not proper. This is just a wrong turn I took sorry.

2 The python xxxx.so and xxxx.dylib are just copies ( sort of ). We need to investigate just having the xxx.so reference the dylib.

  1. Mouse cursors?

Roger

Grapic state guardian is still clumsy at best …