Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Any known build issues on OSX Snow Leopard? #16
I am wondering if there are any known issues when trying to build on OSX Snow Leopard (10.6.8)?
My current approach was to install python2.7 and rebuild, though now I am dealing with mixed interps. I can get the build to succeed but its till expecting various headers and libs in certain locations, and I get a corrupt .so
While trying to build on OSX Lion (10.7.4), I can neither build a working module with the system python2.7 (complains about mismatched interps), or with a homebrew python2.7 (Complains about a symbol not found: _environ)
Are there any detailed instructions on how to build for OSX? I don't see where it says in the README that python2.7 is expected and hardcoded. Any ideas?
Yes, you're right. As this is a Python extension,
You need the Python development files and Python 2.7 or higher to build.
You can try to enable them (just undo the changes in #8).
If that doesn't work, please post the output of
Thanks for using PyOpenNI.
Thanks for the reply! I actually just made some progress. I'm not extremely fluent with all the possible ways to specify libs and whatnot during compile phase, but maybe this will offer some insight and you would see a more direct fix...
I first reinstalled my python2.7 install via homebrew, adding the --framework flag
After building the module, I noticed via otool that it was still linking to my system python, and the system python on Lion is fat i386 and x86_64. I also noticed that the libboost which was linked to openni.so was also linked against the system python instead of homebrew. So I used the following to relink them:
After doing this, I was able to import openni without any errors. Also performed these steps again using the unpatched .cpp source files (no extra Python includes, etc), and it still built fine. Ultimately, I am suggesting that the steps to building on OSX specifically need to address:
Maybe you have a suggestion about how to properly set the env before building to get it to link properly in the first place?
added a commit
May 29, 2012
My previous working procedure didn't end up being very consistant. When I tried to rebuild recently I kept having an issue with the build not finding the proper python2.7 includes. Removing all other python installs from my system isn't really a viable option. What I found to be a consistent fix was: