Archived

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

I can`t run py examples in mac-os

Hi all, I download the binary distribution (3.0.1)for mac-os, and when I try to run the hello example from the demospy for Mac-os I have the following message when running Server.py:

Traceback (most recent call last):
File "Server.py", line 11, in ?
import sys, traceback, Ice
File "/Applications/Ice-3.0.1/python/Ice.py", line 15, in ?
import IcePy
ImportError: dlopen(/Applications/Ice-3.0.1/python/IcePy.so, 2): Library not loaded: /Users/benoit/tmp/iceinstall/Ice-3.0.1/lib/libIce.30.dylib
Referenced from: /Applications/Ice-3.0.1/python/IcePy.so
Reason: image not found

Can any body help me?.

thank you in advance.

ACM.

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Did you add "/Applications/Ice-3.0.1/lib" to your DYLD_LIBRARY_PATH?

    If you don't want to have to set DYLD_LIBRARY_PATH, you can also modify the install names embedded in the Ice libraries (use "otool -L" to see the dependant libraries) with the Mac OS X "install_name_tool utility".

    For example:
      install_name_tool -change /Users/benoit/tmp/iceinstall/Ice-3.0.1/lib/libIce.30.dylib /Applications/Ice-3.0.1/lib/libIce.30.dylib  /Applications/Ice-3.0.1/python/IcePy.so
    

    See the man page of "install_name_tool" for more information.

    Cheers,
    Benoit.
  • Hi, it is my very first time on Mac-os and I was using LD_LIBRARY_PATH as the environment varible. Again you are right.

    thank you.

    ACM.
  • hi again benoit, this morning i run the server and works :) . I thought all were rigth, this afternoon i came back to the example an when i run the client i found the following error message:

    interna195:~/Desktop/ICE-MAC/Ice-3.0.1-demos/demopy/Ice/hello quality$ python Client.py
    Traceback (most recent call last):
    File "/Users/quality/Desktop/ICE-MAC/Ice-3.0.1/python/Ice.py", line 487, in main
    status = self.run(args)
    File "Client.py", line 42, in run
    twoway = Demo.HelloPrx.checkedCast(\
    File "/Users/quality/Desktop/ICE-MAC/Ice-3.0.1/python/Ice.py", line 157, in stringToProxy
    return self._impl.stringToProxy(str)
    DNSException: exception ::Ice::DNSException
    {
    error = 7
    host = interna195.qualityobjects.com
    }

    :confused:

    can you help me againg?

    ACM.
  • benoit
    benoit Rennes, France
    Hi,

    The "Ice.DNSException" indicates that the Ice client couldn't resolve the hostname "interna195.qualityobjects.com". More specifically, the "getaddrinfo" system call failed with the error code 7 which on Mac OS X means "no address associated with hostname". You should look into the network configuration of your machine or add this name to your DNS server.

    Alternatively, you can change the configuration of the demo and define Ice.Default.Host to 127.0.0.1 to use the loopback interface (or you can set it to the IP address of your machine).

    Cheers,
    Benoit.
  • Hello benoit,

    Thank you again.

    ACM.