TAO VERSION: 1.4.8
ACE VERSION: 5.4.8
HOST MACHINE and OPERATING SYSTEM:
Any.
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
Not different.
COMPILER NAME AND VERSION (AND PATCHLEVEL):
Any.
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
Not used.
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
Not used.
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
// $Id$
// This is an automatically generated file.
ssl=0
qos=1
cidl=0
rwho=0
sctp=0
AREA/CLASS/EXAMPLE AFFECTED:
Building ACE+TAO produces undesired effects.
DOES THE PROBLEM AFFECT:
COMPILATION?
Yes
LINKING?
Yes.
EXECUTION?
Yes.
OTHER (please specify)?
Building ACE+TAO is affected.
SYNOPSIS:
When using the autotools build system on any OS/compiler, static objects are compiled without ACE_AS_STATIC_LIBS (and TAO_AS_STATIC_LIBS when
compiling TAO) defined.
DESCRIPTION:
This produces the following error messages when starting a statically linked program which uses TAO:
ACE_DLL::open failed for TAO_PI: Error: check log for details.
Unable to find service: ORBInitializer_Registry
ACE_DLL::open failed for TAO_Codeset: Error: check log for details.
Unable to find service: TAO_Codeset
These are result of the code been compiled with dlopen() invocations (as if it is in a shared library). See
ACE_wrappers/TAO/tao/ORBInitializer_Registry.cpp#PortableInterceptor::regis ter_orb_initializer(...) for the source of these error messages.
Even worse: under Linux when TAO's shared libraries are in the library search path (i.e. when dlopen() succeeds) then no error messages are printed
but the program dies with a segmentation fault.
REPEAT BY:
cd ACE_wrappers
mkdir objdir
cd objdir
../configure --enable-static
make
Now create a very simple CORBA program which which uses TAO and links with -static. Then run it.
SAMPLE FIX/WORKAROUND:
I don't have a fix. I think that you should introduce separate CPPFLAGS for static and shared objects throughout the Makefile.am's somehow.