Archived
Python / MacOS Sierra / IceSSL plugin fails to load
Hi everyone,
I try to figure out how to use the IceSSL plugin with python on Mac OSX (Sierra). When I start my script, the following exception is logged:
File ".../python/Ice.py", line 713, in initialize communicator = IcePy.Communicator(args, data) PluginInitializationException: exception ::Ice::PluginInitializationException { reason = unable to load entry point `IceSSL:createIceSSL': dlopen(libIceSSL.37a2.dylib, 10): image not found; dlopen(libIceSSL.37a2.so, 10): image not found; dlopen(libIceSSL.37a2.bundle, 10): image not found }
I copied the Ice library libraries to /usr/local/lib where they should be located by dlopen API call, shouldn't they?
ll /usr/local/lib/libIce* -rwxr-xr-x 1 mathias admin 12M 29 Jan 15:57 /usr/local/lib/libIce.37a2.dylib -rwxr-xr-x 1 mathias admin 990K 29 Jan 20:09 /usr/local/lib/libIceSSL.37a2.dylib
I think the dylibs are valid, as they work with my C++ application quite well.
Is there any property for the plugin location to be defined? Any other suggestions?
Best,
Mathias
Comments
-
Update:
Finally I figured out a temporary solution for my problem. When I set the property "Ice.Plugin.IceSSL" to "/usr/local/lib/IceSSL:createIceSSL", the plugin gets loaded. The system python executable I use (/usr/bin/python) does not contain the rpath /usr/local/lib and I cannot modify it, as it is not possible to deactivate SIP on m account, so there is no other way to define search paths for libraries at all, is it?Best,
Mathias0 -
Hi Mathias,
I assume you built and installed Ice from sources on your macOS box?
Setting the
embedded_runpath_prefix
in config/Make.rules to the installation directory should make it possible for the IcePy library to find the IceSSL library in the installation directory.Can you try to set it, rebuild and install Ice to see if this fixes the issue? I also recommend updating to the latest alpha version 3 (v3.7.0-alpha3).
Note that you will still need to set
Ice.Plugin.IceSSL=IceSSL:createIceSSL
to enable SSL but should no longer need to specify the path of the library.Another possibility is to just use our PyPI package if using Ice 3.6.3 is ok.
Cheers,
Benoit.0 -
Thanks for your feedback. I have built 3.7.a2 from source some time ago and don't want to repeat this once again. So I can stick to my temporary fix.
But I have some other questions in mind:
Which installation path should be used for the Ice binaries on Mac OS X?
Where should the IcePy.so library be installed, if one does not want to modify the PYTHON_PATH environment variable?Best,
Mathias0 -
Hi Mathias,
Typically, Ice for Python is installed as a PyPI package instead of being installed from a source build. When installing the PyPI package, you don't have anything to set in your environment to use IcePy. We currently don't provide a PyPI package for 3.7a3 (only for 3.6.3) but this is something we could provide you if you want to try it out.
Cheers,
Benoit.0