[SOLVED] Houdini as a Shared Library on Mac

   1665   2   1
User Avatar
Member
34 posts
Joined: July 2015
Offline
Hi everyone,

I'm creating with a friend a bridge for Houdini and Blender but I have an issue I'm not sure how to tackle:

I'm creating a Pybind module linked to Houdini Libraries that reads and write geo, for now, it all works as expected in standalone, but if I try to use it inside blender I have the following error:
ImportError: dlopen(/Users/sven/Library/Application Support/Blender/2.81/scripts/addons/blender2houdini/b2h_17_5_425.cpython-37m-darwin.so, 2): Library not loaded: /Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/local/lib/libz.1.dylib
  Referenced from: /Applications/Houdini/Houdini17.5.425/Frameworks/Houdini.framework/Versions/Current/Libraries/./libAlembic_sidefx.1.7.9.dylib
  Reason: image not found

So I guess it's a conflict with Blender's own library, but I have no idea how to solve this.

I've tried to link the libraries as private but that makes the build fail

Any insights are welcome

Thanks
Edited by Akelian - April 2, 2020 15:56:52
User Avatar
Member
34 posts
Joined: July 2015
Offline
Yeaaahh !! I solved the issue.


So I was quite disturbed by this path
/Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/
this seems like the build environment at SideFX. I'm not sure how it's not creating issues in Houdini other than the one I faced (using shared hou libs )

So to solve the issue this is what I had to do:

sudo install_name_tool -change "/Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/local/lib/libz.1.dylib" "@rpath/libz.1.dylib" libAlembic_sidefx.1.7.9.dylib

sudo install_name_tool -change "/Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/local/lib/libz.1.dylib" "@rpath/libz.1.dylib" libAlembic_sidefx.1.7.dylib

sudo install_name_tool -change "/Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/local/lib/libz.1.dylib" "@rpath/libz.1.dylib" libAlembic_sidefx.dylib
User Avatar
Member
12 posts
Joined: June 2014
Offline
Note that this is now solved in Houdini 18
  • Quick Links