[omniORB-dev] Building for Mac OS X Lion

Duncan Grisby duncan at grisby.org
Mon Feb 13 10:20:46 GMT 2012


On Sat, 2012-02-11 at 19:03 -0800, Thomas Lockhart wrote:

> I'm trying to get code running on Mac OS X including omniORB and omniORBpy.

They work fine for me, just running configure; make, which uses the gcc
compiler front-end.

[...]
> /Developer/usr/bin/clang++ -o catior -L/opt/local/lib -arch x86_64 -pipe 
> -O2 -arch x86_64 -fno-common -bind_at_load -L../../../../lib 
> -L../../../../lib catior.o -lomniORB4 -lomnithread
> Undefined symbols for architecture x86_64:
>    "operator<<=(unsigned int&, cdrStream&)", referenced from:
>        
> _CORBA_Unbounded_Sequence<IOP::TaggedProfile>::operator<<=(cdrStream&) 
> in catior.o
> 
> Which I see is indeed undefined in both catior.o and in 
> libomniORB4.dylib (along with undefined operators for a few other int 
> types). I'm guessing it is an implicit template issue but...

It's an inline function declared in include/omniORB4/cdrStream.h, so
it's right that it's not defined in the object files. The functions are
somewhat trickily defined as friend functions within the cdrStream
class, and the clang front-end is clearly somewhat confused by it. 

Luckily the IBM xlC compiler has the same problem, so there are already
pre-processor defines for a work-around. This little patch fixes it.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-patch
Size: 342 bytes
Desc: not available
Url : http://www.omniorb-support.com/pipermail/omniorb-dev/attachments/20120213/a8b6fd94/clang.bin


More information about the omniORB-dev mailing list