Archived

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

Patch to build Ice-1.2.0 on MacOS X 10.3

benoit
benoit Rennes, France
Here's a patch to build Ice-1.2.0 on Mac OS X 10.3.x! To apply the patch:
  • Unpack Ice, tar -zxvf Ice-1.2.0.tar.gz
  • Unzip the patch, gunzip macosx.patch.gz
  • Apply the patch: cd Ice-1.2.0; patch -p1 < macosx.patch

Then, follow the instructions from the INSTALL.MACOSX file in the top level directory of your patched Ice distribution. Let me know if you have any issues with this patch!

Benoit.

Comments

  • Problem with macosx patch

    Thanks for the patch. I applied it and run into the following problem:

    c++ -c -I.. -I../../include -DICE_API_EXPORTS -DICE_PROTOCOL_API_EXPORTS -g -ftemplate-depth-128 -Wall -D_REENTRANT FactoryTableDef.cpp
    FactoryTableDef.cpp: In member function `IceInternal::UserExceptionFactoryPtr
    Ice::FactoryTableDef::getExceptionFactory(const std::string&) const':
    FactoryTableDef.cpp:74: error: `RTLD_DEFAULT' undeclared (first use this
    function)
    FactoryTableDef.cpp:74: error: (Each undeclared identifier is reported only
    once for each function it appears in.)
    make[2]: *** [FactoryTableDef.o] Error 1
    make[1]: *** [all] Error 1
    make: *** [all] Error 1

    My machine runs macosX 10.3 (panther) or more specific

    Darwin 7.2.0 Darwin Kernel Version 7.2.0: Thu Dec 11 16:20:23 PST 2003; root:xnu/xnu-517.3.7.obj~1/RELEASE_PPC Power Macintosh powerpc

    The used gcc is

    Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
    Thread model: posix
    gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)

    Any ideas?
  • benoit
    benoit Rennes, France
    Interesting, looks like this symbol was added in one of the minor 10.3.x update? I used 10.3.2 for the port.

    Could you try the following for me and send me the output?

    $ grep RTLD /usr/include/dlfcn.h

    You could either try to update to 10.3.2 or comment out the offending code in src/Ice/FactoryTableDef.cpp (however the automatic registration of user exception and class factories won't work and will cause the test/IcePack/deployer test to fail). I'll see if I can install 10.3 on another partition to try it out.

    Benoit.
  • Hi,

    my powerbook is running MacosX 10.3.2.
    Here is the result of running grep

    grep RTLD /usr/include/dlfcn.h
    #define RTLD_LAZY 0x1
    #define RTLD_NOW 0x2
    #define RTLD_LOCAL 0x4
    #define RTLD_GLOBAL 0x8
    #define RTLD_NOLOAD 0x10
    #define RTLD_NODELETE 0x80
    #define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */
    #define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */

    Regards
  • benoit
    benoit Rennes, France
    Mmm, I don't see why it's not finding this symbol if it's correctly defined in /usr/include/dlfcn.h :(. Is your C pre-processor perhaps picking up another dlfcn.h installed on your system? Can you try the following?

    $ cpp -v

    This should print the include search path.

    Benoit.
  • Thanks for the quick replies. Here is the output of cpp -v.
    Hope this helps.

    Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
    Thread model: posix
    gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
    /usr/libexec/gcc/darwin/ppc/3.3/cc1 -E -traditional-cpp -quiet -v -I/usr/include -iprefix /usr/libexec/gcc/darwin/ppc/default/../libexec/gcc/darwin/ppc/3.3/ -D__DYNAMIC__ -D__GNUC__ - -fPIC
    ignoring nonexistent directory "/usr/libexec/gcc/darwin/ppc/default/../libexec/gcc/darwin/ppc/3.3/c++/.."
    ignoring nonexistent directory "/usr/ppc-darwin/include"
    ignoring nonexistent directory "/Local/Library/Frameworks"
    ignoring duplicate directory "/usr/include"
    as it is a non-system directory that duplicates a system directory
    #include "..." search starts here:
    #include <...> search starts here:
    /usr/local/include
    /usr/include/gcc/darwin/3.3
    /usr/include
    End of search list.
    Framework search starts here:
    /System/Library/Frameworks
    /Library/Frameworks
    End of framework search list.
  • benoit
    benoit Rennes, France
    Ok, so you have the following in your include search path:

    /usr/local/include
    /usr/include/gcc/darwin/3.3
    /usr/include

    I don't have any /usr/local/include directory on my system. Do you perhaps have a dlfcn.h file in /usr/local/include which is different from /usr/include/dlfcn.h and doesn't define RTLD_DEFAULT? If yes, do you know where it could come from?

    Benoit.
  • Hi,

    it is as you said I have a dlfcn.h in /usr/local/include and it does not define RTLD_DEFAULT. Its presence might be related to the an earlier attempt
    of installing mono (There is a directory /usr/local/include/mono on
    my system as well).
    I check whether I can safely get rid of the /usr/local/include so
    that cpp finds the propper dlfcn.h.
    I keep you informed. Thanks a lot for your help so far!

    mottainai
  • benoit
    benoit Rennes, France
    I'm glad we figure it out! You could also try to add -I/usr/include to the CPPFLAGS variable defined in Ice-1.2.0/config/Make.rules to make sure it's first in the include search path. Let us know if you have any other problems using Ice on Mac OS X!

    Benoit.
  • Hi Benoit,

    finally I got Ice-1.2.0 compiled and installed on macosX 10.3.2. Thanks!
    (I've used expat and db4 from the fink distribution.)
    I run 'make test' and it reported ok on all tests.
    However, when I want to start the small Printer example from the Ice documentation
    I get the following error message.

    dyld: server can't open library: @executable_path/../lib/libIce.12.dylib (No such file or directory, errno = 2)
    Trace/BPT trap

    The problem seems to be that I don't know how to tell the dynamic loader where
    to find the Ice libs.
    Your help is appreciated.

    Jens
  • benoit
    benoit Rennes, France
    Did you set the DYLD_LIBRARY_PATH envrionment variable as mentioned in the INSTAL.MACOSX file? You should set it to point to the Ice-1.2.0/lib directory.

    Benoit.
  • You are right. It is working now.
    Thanks a lot!
  • error regarding dlfcn.h

    i have to port Icecat on on MAC OS leopard
    i have the following error while i was trying to build

    nsStackWalk.cpp


    nsStackWalk.cpp: In function 'nsresult NS_DescribeCodeAddress(void*, nsCodeAddressDetails*)':


    nsStackWalk.cpp:1502: error: 'Dl_info' was not declared in this scope


    nsStackWalk.cpp:1502: error: expected `;' before 'info'


    nsStackWalk.cpp:1503: error: 'info' was not declared in this scope


    nsStackWalk.cpp:1503: error: 'dladdr' was not declared in this scope


    make[4]: *** [nsStackWalk.o] Error 1


    make[3]: *** [libs] Error 2


    make[2]: *** [libs_tier_xpcom] Error 2


    make[1]: *** [tier_xpcom] Error 2


    make: *** [default] Error 2


    ### execution of make failed, exit code 2


    ### execution of /var/tmp/tmp.2.TGxdt0 failed, exit code 2


    Removing runtime build-lock...


    Removing build-lock package...


    /sw/bin/dpkg-lockwait -r fink-buildlock-icecat-3.0.2-1


    please suggest me how to proceed now
    thanks
    benoit wrote: »
    Here's a patch to build Ice-1.2.0 on Mac OS X 10.3.x! To apply the patch:
    • Unpack Ice, tar -zxvf Ice-1.2.0.tar.gz
    • Unzip the patch, gunzip macosx.patch.gz
    • Apply the patch: cd Ice-1.2.0; patch -p1 < macosx.patch

    Then, follow the instructions from the INSTALL.MACOSX file in the top level directory of your patched Ice distribution. Let me know if you have any issues with this patch!

    Benoit.
  • bernard
    bernard Jupiter, FL
    Hi Digvijay,

    Welcome to our forums.

    What is Icecat? If you're talking about GNU IceCat, I am afraid you're on the wrong forums. These forums are about the Internet Communications Engine (Ice), which is unrelated to GNU IceCat.

    Cheers,
    Bernard
  • to bernard

    sir
    i thought that i m getting the same error "regarding dlfcn.h" as one of the person in the same thread.
    so i posted in this thread.
    can u help in resolving this if you have any idea about Icecat
    If u dont have any clue, can you please sujjest any suitable forum for Icecat where i resovle my problem
    thanks
    cheers
    digvijay
  • benoit
    benoit Rennes, France
    Sorry, this look like a totally different problem and there's not much we can do to help you. You should try to find a forum or mailing list for Icecat and post your question there.

    Cheers,
    Benoit.