Any one up for OSX work.

I haven’t yet had a chance to try to get Cg compiling on OSX. It might be as simple as adding the lines:

#define CG_LIBS
#define CG_FRAMEWORK Cg
#define HAVE_CG 1

to your Config.pp. If that doesn’t work, you can always bail on Cg with:

#define HAVE_CG

David

One idea for the Config.pp:

#define GL_FRAMEWORK OpenGL

If the CG_FRAMEWORK solves the other problems, this will probably help later on…

(edit: this is most probably solved, it seems a old version of this lib was causing the problem)

However i cannot compile direct, it seems dtool has some stuff missing (just because something seems to be missing in libdtoolbase)?

cd ./src/dcparser && make all
g++ -undefined dynamic_lookup -dynamic -dynamiclib -o Opt3-OSX/libdcparser.dylib -install_name libdcparser.dylib Opt3-OSX/dcparser_dcparser_composite1.o Opt3-OSX/dcparser_dcparser_composite2.o Opt3-OSX/dcparser_dcParser.o Opt3-OSX/dcparser_dcLexer.o Opt3-OSX/libdcparser_igate.o -L…/directbase/Opt3-OSX -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/local/panda/lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -ldirectbase -lexpress -lpstatclient -lpipeline -linterrogatedb -ldconfig -ldtoolutil -ldtoolbase -lprc -lpandabase -lnet -lnativenet -llinmath -lputil -framework Python
ld: Undefined symbols:
__ZN10TypeHandle16dec_memory_usageENS_11MemoryClassEm referenced from libexpress expected to be defined in libdtoolbase
__ZN10TypeHandle16inc_memory_usageENS_11MemoryClassEm referenced from libexpress expected to be defined in libdtoolbase
/usr/bin/libtool: internal link edit command failed
make[1]: *** [Opt3-OSX/libdcparser.dylib] Error 1
make: *** [dcparser] Error 2

Any idea’s what’s causing this problem?
Thanks

i didn’t have problems with direct, after solving the Cg issue. i will have a patch and instructions available later today to compile panda3d from cvs on OS X. i also added a change in the dtool Config templates to allow correct compilation of executables (pview), because needed frameworks (Cg triggered the problem for me) weren’t included as needed.

i want to forward the patch/instructions how_to.txt to david, hopeing that he’ll be able to test, confirm and incorporate these changes into CVS.

i’m now fighting my way through pandatools, CVS has a couple of link problems, which i had solved previously for my OS X panda3d package. i’ll try to provide a more general patch for this too.

cheers,
kw.

By the way kaweh, if you are going to create a new osx installer for panda3d it would be great if you could include the networking as well. The only reason a compiled a version myself was because i missed that in your installer.

Thanks

Note that the latest version of Panda no longer depends on NSPR for networking, and will build networking interfaces automatically.

David

I have now successfully compiled panda & direct however there are still a lot of compile errors i have to fix manually. i put together a script with all fixed compile commands, it adds a “-framework Cg” to all changed lines.

pastebin.be/3156

This is the Config.pp i am using

pastebin.be/3152

It would be great if that could be incorporated into the compile scripts.

thanks for that. i have a patch, that will correct the approriate Sources.pp. i"ll create one and release it hoepfully on monday (wanted to do so on friday, but didn’t get around to finish that).

cheers,
kw.

make this work some how OSX will be great!

Hi.

I was just wondering how this is going. I’m planning on doing my final year University project using Panda3d and I only have a Mac at the moment.

Do you think I should be safe and buy a PC with Linux or Win, or will this run on a Mac properly once set up?

Thanks to everyone who is working on this.

Matt

Panda runs great on a Mac. In fact, I’ve been doing more and more of my primary development on the Panda3D code itself on my iMac, since it’s the fastest computer on my desktop right now. Then I commit it and see if it still runs on Windows. :slight_smile:

David

Thanks for your reply David.

That’s great news. Is there a place I can go to see instructions on how to set up? (up to date version of knuddl.net/moin.cgi/InstallPanda3d).

I’ve not done any C before but a fair bit of Java and php etc… (My degree is Multimedia, rather than Computer Science). I’m learning Python right now. Am I going to struggle to get going with this?

I have the rest of the summer to prepare and do as much work as I can before I ‘officially’ start the project.

Matt

I can get Panda3D to build on Mac OS X, but genPyCode fails.

genPyCode
Fatal Python error: Interpreter not initialized (version mismatch?)
/usr/local/panda/bin/genPyCode: line 4: 18786 Abort trap              python -u '/usr/local/panda/bin/genPyCode.py' "$@"

The only oddity in my build is that I’m using Python 2.4.4 from MacPorts, instead of the pre-built package from pythonmac.org. Does anyone know how to get panda working with Python from MacPorts?

Well I got genPyCode to work. I did change a lot of stuff before getting it to work, but the change that seemed to fix it was in Config.pp. Mine now looks like this:

Config.pp

#define HAVE_GL 1 
#define HAVE_PYTHON 1
#define PYTHON_IPATH /opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
#define PYTHON_LPATH /opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
#define INSTALL_PYTHON_SOURCE 1
#define GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect libpandafx 

#define PRC_PATH_ENVVARS CFG_PATH ETC_PATH 
#define DEFAULT_PATHSEP : : 

Great. looks like you found the magic. Python is very pedantic (rightfully so) about versions of compiles and the running python version. So the key is to absolutely make sure the first python in your path is the python you built agents. genPycode is just a python program :slight_smile: So the framework path is the key.

Roger

Glad to see another OSX user of Python.

I wrote an article detailing all the steps for building Panda3D on Mac OS X. It’s available on my blog.

http://www.edalytical.com/articles/2007/08/17/building-panda3d-on-mac-os-x

I hope it’s useful for someone.

hmm does this allow all of panda3d to work on mac…if so I hope this can be included soon as a .app for mac users :wink:

cheers
nl
P.S.- i’d love to test but I dont have a mac ;(

I followed the directions linked above (on edalytical.com), and got Panda compiling with no problem. If I do the trivial:

import direct.directbase.DirectStart
run()

then it works fine; I get the gray window, no problem. Once I try to do anything before my run() call, though, the game hangs and I have to manually kill the process. I was trying the first step in the tutorial just to see if base functionality was there:

import direct.directbase.DirectStart

#Load the first environment model
environ = loader.loadModel("/Users/sjml/ext/panda3d/models/environment.egg")
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)
#Run the tutorial
run()

(Had to use a full path instead of a relative one, but I can’t imagine that’s the problem.)

If I put an output statement just before the run(), it gets printed, so I know it isn’t actually getting hung up until it tries to start the main loop.

Any thoughts? Is there a good way to find out where it’s getting stuck?

Can you run pview successfully? Can you pview a model?

David

I dont think that help you a lot, but the first thing i would try is to replace run() with:

while True:
  taskMgr.step()
  print "next frame"

Pview seems to have the same problem, whether I give it a model or not.

I’m at work now and don’t have my Mac in front of me, but I’ll give this a go when I get home.