[ace-users] problems compiling with gcc 4.1.1

Hans Utz hans.utz at nasa.gov
Mon Aug 27 16:33:10 CDT 2007


Hi,

sorry if duplicate, first attempt to send came back with an error message...

       TAO VERSION: 1.5.10
       ACE VERSION: 5.5.10

       HOST MACHINE and OPERATING SYSTEM: Linux RH Enterprise Linux 5
       COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc 4.1.1

       THE $ACE_ROOT/ace/config.h FILE:
         config-linux.h
       THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:
         platform_linux.GNU

       AREA/CLASS/EXAMPLE AFFECTED: compilation

       DOES THE PROBLEM AFFECT:
            COMPILATION

SYNOPSIS:

Multiple tests & examples fail at link time due to 'undefined
references'. Mostly in conjunction with ACE_Singleton<>. Looks like a
template instantiation problem.

Sorry, if this is a FAQ. I didn't find anything on the 
building/installing ACE pages. But gcc 4.1.1 is the system compiler of 
RH Enterprise Linux 5. So I guess somebody else might already have had
similar problems...


      DESCRIPTION:

Here is the output from make:

GNUmakefile:
/usr/local/irg/hutz/5.5.10/ACE_wrappers/examples/APG/Shared_Memory/GNUmakefile.PI_Malloc 

MAKEFLAGS=w

g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall
-Wpointer-arith -O2 -pipe   -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS
-D_GNU_SOURCE   -I/usr/local/irg/hutz/5.5.10/ACE_wrappers -DACE_NDEBUG
-DACE_USE_RCSID=0 -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I../../..
-Wl,-E -L/usr/local/irg/hutz/5.5.10/ACE_wrappers/ace -L./
-L/usr/local/irg/hutz/5.5.10/ACE_wrappers/lib -L. -L../../../lib -o
PI_Malloc .obj/PI_Malloc.o -lACE -ldl -lpthread -lrt
.obj/PI_Malloc.o: In function
`ACE_Based_Pointer_Basic<char>::ACE_Based_Pointer_Basic()':
PI_Malloc.cpp:(.text._ZN23ACE_Based_Pointer_BasicIcEC1Ev[ACE_Based_Pointer_Basic<char>::ACE_Based_Pointer_Basic()]+0x1f): 

undefined reference to `ACE_Singleton<ACE_Based_Pointer_Repository,
ACE_RW_Thread_Mutex>::instance()'
collect2: ld returned 1 exit status
make[1]: *** [PI_Malloc] Error 1

That's the first example that fails, but same happens for
tests/Based_Pointer_Test and others.

Thanks,
Hans

-- 
Hans Utz - USRA/RIACS at NASA Ames
I do not speak for NASA, and NASA does not speak for me.



More information about the Ace-users mailing list