Compiling ACE+TAO on Mac OS X

So, what's ACE+TAO?

It's big, it's complex, it's middleware!


In trying to compile ACE 5.7.5 and TAO 1.7.5 on my Mac OS X 10.5.8 system I encountered some strange error messages while linking. These were duplicate symbol errors I couldn't really track down to their root cause but was able to find simple cures.

For those poor souls also hitting those faults the following list of changes may help:
  1. File $ACE_ROOT/ace/Based_Pointer_Repository.h
  2. File $ACE_ROOT/ace/Obstack.h
Re 1. : File $ACE_ROOT/ace/Based_Pointer_Repository.h

I had to comment out the ACE_SINGLE_DECLARATION on lines 82 to 84:

/* - frgo, 2010-01-03
/// Declare a process wide singleton
ACE_SINGLETON_DECLARE (ACE_Singleton,
ACE_Based_Pointer_Repository,
ACE_SYNCH_RW_MUTEX)
*/

Re 2. : File $ACE_ROOT/ace/Obstack.h

I had to comment out the ACE_SINGLE_DECLARATION on line 24:

// - frgo, 2010-01-03
// ACE_SINGLETON_DECLARATION (ACE_Obstack_T ;)

Having solved these problems I was able to build and link ACE. Now on to TAO...

TAO also exhibits duplicate symbol errors. To get rid of these the following files have to be edited:
  1. File $TAO_ROOT/orbsvcs/orbsvcs/AV/AV_Core.h
  2. File $TAO_ROOT/orbsvcs/tests/Notify/lib/LookupManager.h
Re 1. File
$TAO_ROOT/orbsvcs/orbsvcs/AV/AV_Core.h

I had to comment out TAO_AV_SINGLE_DECLARE on line 167:

// - frgo, 2010-01-03
// TAO_AV_SINGLETON_DECLARE (ACE_Singleton, TAO_AV_Core, ACE_Null_Mutex)

Re 2. File $TAO_ROOT/orbsvcs/tests/Notify/lib/LookupManager.h

I had to comment out TAO_NOTIFY_TEST_SINGLETON_DECLARE on line 113:

// - frgo, 2010-01-03// - frgo, 2010-01-03
// TAO_NOTIFY_TEST_SINGLETON_DECLARE (ACE_Singleton, TAO_Notify_Tests_LookupManager, TAO_SYNCH_MUTEX)


Having implemented these changes you can run

$ make install

and you are up and running with the TAO ORB.

Cheers

Frank

Kommentare

Unknown hat gesagt…
Commenting out these could lead to runtime problems.
frgo hat gesagt…
Yep. Very true. So far no problems, though. If there's a better solution I'd be very interested to hear!

Thanks for pointing this out!

Regards
Frank
SWS hat gesagt…
I've run into a similar problem, and I think it boils down to the compiler version. See
http://developer.apple.com/library/mac/#documentation/DeveloperTools/gcc-4.2.1/gcc/Visibility-Pragmas.html
and
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html

In particular: “Although template declarations can be marked with the visibility attribute, template instantiations cannot. This is a known limitation and may be fixed in a future version of GCC.”

Beliebte Posts aus diesem Blog

SLIME, Lisp, Editing - the lost slime-close-parens-at-point