Compiling 1.6.1 (OSX, XCode 3.1.2)

i tried building 1.6.1. on OS X using makepand and ran into a couple of pitfalls i want to document:

  • OSX is using the Unix DTOOL_CONFIG “column”; i had to manually edit HAVE_THREADS and SIMPLE_THREADS to “0” to get it to compile (i believe that’s a known issue on OS X)

  • the process chokes on panda.egg model for some reason and stops there:

built/models/panda-walk.egg.pz
built/bin/pzip built/models/panda-walk4.egg
built/models/panda-walk4.egg.pz
built/bin/pzip built/models/panda.egg
built/models/panda.egg.pz
:prc(warning): value queried before default value set for Storing dependency cache.

i went into makepanda.py #721 and changed

    oscmd(GetOutputDir()+"/bin/pzip " + eggpz[:-3])

to

    oscmd(GetOutputDir()+"/bin/pzip " + eggpz[:-3], ignoreError=True)
  • genCodePy was expecting the ode integration to be around, i couldn’t create a build with ode disabled (–no-ode) (sorry did forget to cut&copy the output)

  • getting maya2egg and co. tools to compile was tricky (against Maya 2008). makepanda was expecting the includes and (dynamic) libs from the same directory, which is not the case with a default Maya 2008 installation; the includes are found /Applications/Autodesk/maya2008/devkit but the dynamic libraries are found in /Applications/Autodesk/maya2008/Maya.app/Contents/MacOS. i suspect nobody really uses these tools, but if someone is interested i can post the changes. but they are very hackish, i don’t know what would be a good general solution for that.

  • after these changes compilation and linking did finish and an installer was created. BUT unfortunatly my build is not working:

DirectStart: Starting the game.
:display(warning): Unable to load: dlopen(/Applications/Panda3D/1.6.1/lib/libpandagl.dylib, 6): Library not loaded: /usr/X11/lib/libOSMesa.6.dylib
  Referenced from: /Applications/Panda3D/1.6.1/lib/libpandagl.dylib
  Reason: image not found
Known pipe types:
(all display modules loaded.)

there is no libOSMesa.6.dylib in /usr/X11/lib but there is on in the OS X 10.5 dev kit provided with XCode. it seem this is picked up for linking but for some reason not found anymore. even if i add corresponding path into the 10.5 dev kit to DYLD_LIBRARY_PATH it starts with no success.

any hints how i can solve that problem?

if makepanda on OS X is still not there yet, i might go back to ppremake though.

thanks in advance for any help you can provide,
kw.

That’s a known issue, we’re working on it. Just disable threading for now (change them to ‘UNDEF’) and you won’t get the crash anymore. I really recommend you to do so otherwise your copy of Panda will be unstable.
OSX correctly uses the unix column. What exactly is wrong with that?
It might somewhere still be called ‘Linux’ but just read ‘Unix’.

This has already been fixed on CVS head.

Thank you for reporting. Minor mistake from me, sorry. I myself keep maya in a different kind of directory structure.
I’ll put this on my todolist - for now, I recommend just making a symlink.

I’ve seen similar issues in the past. What version of XCode are you using? Then I can try to reproduce the problem myself.
Maybe it’s one of the thirdparty libraries linked against a library that was moved in a certain XCode version. (I can probably fix that by using install_name_tool somewhere.)

No, it’s there. You’re just unlucky to hit so many problems at the same time.

Hasn’t OSX earned it’s own column? :smiley: I’m just kidding… nothing’s wrong with that, it was just a small note. I’m grateful and many thanks for putting the effort into making makepanda work that smoothly and especially having the installer. This was a really a great help for me today. The changes I mentioned were all minimal.

Cool. Thanks. I’ll have a look.

symlink is a good idea. Didn’t think about it myself. Will do!

XCode 3.1.2 and I believe I was using the third-party libs package you were providing in a different thread. Maybe I was using the wrong package?

Good to know, thanks. I was just wondering… because compilation was smooth, linkage was fixable, but I couldn’t figure out what’s wrong with the Mesa libs.

Well, the column would be so very similar to the Linux column that I didn’t really bother to create a new one.

The ones on the download page are more recent - although I don’t think that will solve your issue.
panda3d.org/download/panda3d-1.6 … mac.tar.gz

Hm. Maybe it’s a mistake from Apple? Can you try this command:

readlink /usr/X11/lib/libOSMesa.dylib

and see what it prints?
I’ve checked the thirdparty packages and they can’t be the cause. None of them is linked against osmesa.

This is the output:

readlink /usr/X11/lib/libOSMesa.dylib
libOSMesa.4.dylib

But as far as I can see, during compilation/linking it’s using the one from the SDKs - and that one is linked against a different one…

readlink /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libOSMesa.dylib 
libOSMesa.6.5.dylib

downloading the most recent libraries anyways for a clean rebuild.

Huh? Well, that’s weird. Do you have the latest updates via Software Update?

Either this is Apple’s fault or I’m just not understanding something correctly.
I always thought the 10.5 SDK symlinked to ‘/’. Apparently not.

Well anyways, you’ll probably be able to solve it by locating the ‘SdkLocateMacOSX’ function in makepandacore.py. Make it set SDK[“MACOSX”] to “” or “/” or so.
Sorry, I think this requires a full rebuild.

Thanks, I’ll give it a try and will report when finished.

pro-soft, setting SDK[“MACOSX”] to “/” did work. pview and basic python script works. Thanks a lot for your help.

Some more testing now…

I had a similar libpanda.dylib error after installing X11 on OS X 10.5.6

I tried uninstalling X11 to no avail.

This is the error I get when I try to run anything:

I have tried reinstalling panda, NVIDIA Cg Toolkit, but Panda3D does not seem to work anymore on my computer. As a desperate measure I was going to format my computer, but I would not want to go there.

Could you give me a few pointers? I can’t seem to find anyone with the same issue as me.

Well, besides kaweh. :slight_smile:
As I suggested him, edit makepandacore.py, function SDKLocateMacOSX so that it sets the sdk path to / instead of /Developer/SDKS/Blah.

Thank you for your response (and patience)

Is there a way to change this parameter in the Installer for Mac OS X? I’m a bit of a newbie when it comes to compiling unix programs from source. I mean, if it got corrupted after installation I would think it is possible to reverse the problem right?

Sorry to have posted in this section, but it is the only place where I have found an issue similar to mine.

Dank u wel!

It might be possible to fix it after the fact, using install_name_tool, but that would be a terrible mess.

I’ll rebuild it over here with the fix - I’ll get back to you tomorrow.

I can’t thank you enough, pro-rsoft!

I just updated to 10.5.7 and everything works fine again. I am also using Panda 1.6.2 now.

Whatever got messed up with the X11 installation must have been fixed by this update.

Thanks for all the help! :smiley:

Ah, it must be a mistake on Apple’s side, then.