This forum has been archived. Please start a new discussion on GitHub.

Mac and IceSSL:createIceSSL

I have been asked to compile an application that currently runs on both Windows and Linux on a Mac using xCode. The application compiles with the following warning:

"warning prebinding disabled because dependent library: /opt/Ice-3.2/lib/libGlacier2.32.dylib is not prebound"

When I try running the application I get the following error:

plugin initialization failed: unable to load entry point `IceSSL:createIceSSL': dlopen(libIceSSL.32.dylib, 10): image not found

The application does need to use https so I cannot simply remove that dependency.

I have seen other references to this problem for Windows on this forum but I was hoping that someone has worked out the solution for the Mac as well.

Here is some additional information about my system/setup:
MacBook Pro 3.1
OSX 10.4.11
xCode 2.4.1
Ice-3.2.1 (precompiled binary)
In evnironment.plist: DYLD_BIND_AT_LAUNCH = 1 & DYLD_LIBRARY_PATH = /Developer/code/Ice-3.2.1/lib/

I appreciate any help that can be provided.


  • matthew
    matthew NL, Canada
    Please note that we do not provide free support for Ice for an older version of Ice. You should upgrade to the latest version of Ice as soon as possible.

    The warning is caused because the Ice libraries are not compiled without support for prebinding. I'm not sure why we don't support prebinding, and we'll discuss this internally.

    With respect to not being able to locate the IceSSL shared library. The link to the windows issue you provided is unrelated to the issues that you are experiencing. /opt/Ice-3.2/lib/libGlacier2.32.dylib and /Developer/code/Ice-3.2.1/lib/ seem to conflict to me. Surely they should point at the same location. Where do you have Ice installed?
  • Thanks for your help and sorry for the confusion about the conflicting locations.

    My initial approach was to extract the binary versions that I downloaded from this site to the /opt/Ice-3.2.1/ folder. This is where I got the original IceSSL plugin error.

    My next approach was to download the source code and build it myself. That was what I put into the /Developer/code/Ice-3.2.1/ folder. After running "make install" it copied the files into the /opt/Ice-3.2.1/ folder and an /opt/Ice-3.2/ folder (which contained an alias pointing to the 3.2.1 folder).

    Using my own build version rather than the pre-built version, I then got the following runtime error:

    dyld: Library not loaded: ../../lib/libIce.3.2.1.dylib
    Referenced from: /Developer/code/mWorlds2/Mac/mClient/build/Release/
    Reason: image not found

    Since this seemed to be a step back from what I had working, I reverted back to the original approach and forgot to update the DYLD_LIBRARY_PATH variable back to the /opt/Ice-3.2.1/lib/ folder. Updating it back so that everything once again points to the opt folder, I am still getting the original error that I reported.

    By the way, the reason that I though my issue was related to the issue that I listed was that this posting seemed to have the same error listed as the one that I was getting and Mark Spruiell from ZeroC pointed the user to that document.
  • benoit
    benoit Rennes, France

    You can ignore the prebinding warning. Prebinding is not necessary anymore since 10.4 (see this page).

    The setting of DYLD_LIBRARY_PATH in environment.plist is the problem: it has no effect since Apple disabled it with a security update, see also this link.

    You can try two things to work-around this problem:
    • Link your application with the IceSSL library.
    • Launch a shell script to setup DYLD_LIBRARY_PATH before launching the executable.

  • Thanks Benoit for those two pieces of information.

    Regarding your two suggestions:
    If I took the first approach, is it anything more than adding the libIceSSL.dylib file to the xCode project and putting it in the "Link Binary With Libraries" group under the target application? This is how I have linked other Ice libraries (which seem to work fine) like libIce.dylib, libGlacier2.dylib, libIceStorm.dylib. The main difference is that the ssl code is being referenced as a plugin from a runtime config file, like this:

    In any case, just linking the libIceSSL.dylib in the xCode project didn't change the error message that I was getting. Is there anything that I need to do with the Ice\ file?

    If I took the second approach, I have read that setting an environment variable through the terminal does not affect applications that are not started from the terminal (for example, from xCode or a .app file). That is why I went the approach of using the environment.plist file. I have set and exported all the suggested environment variables in the .bash_profile file. This seems to have had no affect on my problem either.

    Is the problem that Ice requires the DYLD_LIBRARY_PATH variable to be set for the plugins to work, and the Mac does not make it easy to set environment variables for general applications?

    Also, in the readme file that was included with Ice, it mentions adding the Ice bin folder to the PATH variable. Is that needed for the ssl plugin to work?

    Thanks again for all of your help.

  • I was just looking through the Ice code more and I noticed the DynamicLibraryList that gets added to the PluginManagerI. Is this related? I have not yet found where this could be edited in the application that I am working with... or what the default entry points are (if any).

    Thanks again,
  • I just found that if I put both the libIceSSL.3.2.1.dylib executable and the libIceSSL.32.dylib alias into the same directory as my .app, I no longer get this error.

    I am very happy that it is at least working this far but it would be even better if I could resolve the linking issue so that I would not have to add the dylib files in that directory.

    xCode is set up so that you can have the dylib files added into the contents of the .app file/folder. This way, these files are hidden from the end user. I have found that this is the way that the Ogre graphics engine handles their runtime plugins. It would be great if I could embed the library into the .app and then make sure that the plugin process could find it.

  • benoit
    benoit Rennes, France

    Ok, you're right -- linking with the IceSSL library doesn't help.

    Otherwise, I wasn't suggesting to set DYLD_LIBRARY_PATH in your .bash_profile but to instead use a shell script in your .app bundle. This shell script would set DYLD_LIBRARY_PATH and launch the executable.

    With 10.4, setting DYLD_LIBRARY_PATH is the only way to find Ice plugins if it's not in a default location (i.e.: if it's not in the process working directory, $HOME/lib, /usr/local/lib or /usr/lib). With 10.5, it's also possible to add a given path to the executable runpath search list using the ld -rpath linker option, see the 10.5 ld man page for more information.

  • That was very helpful. Thanks Benoit and Matthew!