Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-31-2004
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
Patch to build Ice-1.2.0 on MacOS X 10.3

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.
Attached Files
File Type: gz macosx.patch.gz (5.3 KB, 130 views)
Reply With Quote
  #2 (permalink)  
Old 02-01-2004
mottainai mottainai is offline
Registered User
 
 
Join Date: Feb 2004
Location: Berlin
Posts: 6
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?
Reply With Quote
  #3 (permalink)  
Old 02-02-2004
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
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.
Reply With Quote
  #4 (permalink)  
Old 02-02-2004
mottainai mottainai is offline
Registered User
 
 
Join Date: Feb 2004
Location: Berlin
Posts: 6
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
Reply With Quote
  #5 (permalink)  
Old 02-02-2004
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
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.
Reply With Quote
  #6 (permalink)  
Old 02-02-2004
mottainai mottainai is offline
Registered User
 
 
Join Date: Feb 2004
Location: Berlin
Posts: 6
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.
Reply With Quote
  #7 (permalink)  
Old 02-02-2004
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
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.
Reply With Quote
  #8 (permalink)  
Old 02-02-2004
mottainai mottainai is offline
Registered User
 
 
Join Date: Feb 2004
Location: Berlin
Posts: 6
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
Reply With Quote
  #9 (permalink)  
Old 02-02-2004
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
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.
Reply With Quote
  #10 (permalink)  
Old 02-03-2004
mottainai mottainai is offline
Registered User
 
 
Join Date: Feb 2004
Location: Berlin
Posts: 6
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
Reply With Quote
  #11 (permalink)  
Old 02-03-2004
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,475
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.
Reply With Quote
  #12 (permalink)  
Old 02-03-2004
mottainai mottainai is offline
Registered User
 
 
Join Date: Feb 2004
Location: Berlin
Posts: 6
You are right. It is working now.
Thanks a lot!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MacOS version wants to be in /opt ctennis Bug Reports 4 07-05-2006 08:02 AM
Patch for Windows IcePackRegistry build problem (Ice 1.5.x) benoit Patches 0 08-25-2004 09:21 AM
Ice on MacOS? rbx Help Center 5 01-31-2004 12:37 AM
Ice 1.2.0 Linux build patch bernard Patches 0 01-30-2004 05:23 PM
MacOS X Port benoit Patches 2 02-28-2003 08:54 AM


All times are GMT -4. The time now is 08:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.