[Ace-users] [ace-users] ACE Compile Error on SAXPrint (unresolved externals on ACE_Obstack_T)

Adam Mitz mitza at ociweb.com
Wed Jan 9 16:26:56 CST 2008


Hi Jim,

Please try building with no_hidden_visibility=1 in your 
platform_macros.GNU file.  The various distro-patched versions of gcc 
4.1.x all have different behaviors with hidden visibility.  Also, try to 
put your #define before the #include in config.h.

Thanks,
Adam Mitz
Software Engineer
Object Computing, Inc.


Mathis, Jim wrote:
> Hello,
>  
> I am using the following configuration and have read the potential 
> solution to this problem (Posted by Johnny W.)
>  
> Gcc - 4.1.2
> RH - ES v5.1
> ACE &TAO - 5.5 / 1.5
>  
> config.h :
> #include "ace/config-linux.h"
> #define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1
>  
> platform_macros.GNU: (default linux setting)
>  
>
> GNUmakefile: 
> /opt/FOSS/ACE_wrappers/ACEXML/examples/SAXPrint/GNUmakefile.SAXPrint 
> MAKEFLAGS=w
>
> g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall 
> -Wpointer-arith -O3 -g -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS 
> -D_GNU_SOURCE -I/opt/FOSS/ACE_wrappers -DACE_HAS_EXCEPTIONS 
> -D__ACE_INLINE__ -I../../.. -I../../../ACEXML/common -c -o 
> .obj/Print_Handler.o Print_Handler.cpp
> g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall 
> -Wpointer-arith -O3 -g -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS 
> -D_GNU_SOURCE -I/opt/FOSS/ACE_wrappers -DACE_HAS_EXCEPTIONS 
> -D__ACE_INLINE__ -I../../.. -I../../../ACEXML/common -c -o 
> .obj/SAXPrint_Handler.o SAXPrint_Handler.cpp
> g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall 
> -Wpointer-arith -O3 -g -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS 
> -D_GNU_SOURCE -I/opt/FOSS/ACE_wrappers -DACE_HAS_EXCEPTIONS 
> -D__ACE_INLINE__ -I../../.. -I../../../ACEXML/common -c -o .obj/main.o 
> main.cpp
> g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall 
> -Wpointer-arith -O3 -g -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS 
> -D_GNU_SOURCE -I/opt/FOSS/ACE_wrappers -DACE_HAS_EXCEPTIONS 
> -D__ACE_INLINE__ -I../../.. -I../../../ACEXML/common -Wl,-E 
> -L/opt/FOSS/ACE_wrappers/ace -L./ -L. -L../../../lib -o SAXPrint 
> .obj/Print_Handler.o .obj/SAXPrint_Handler.o .obj/main.o 
> -lACEXML_Parser -lACEXML -lACE -ldl -lpthread -lrt
> ../../../lib/libACEXML_Parser.so: undefined reference to 
> `ACE_Obstack_T<char>::~ACE_Obstack_T()'
> ../../../lib/libACEXML_Parser.so: undefined reference to 
> `ACE_Obstack_T<char>::ACE_Obstack_T(unsigned int, ACE_Allocator*)'
> ../../../lib/libACEXML_Parser.so: undefined reference to 
> `ACE_Obstack_T<char>::grow(char)'
> ../../../lib/libACEXML_Parser.so: undefined reference to 
> `ACE_Obstack_T<char>::unwind(void*)'
> ../../../lib/libACEXML_Parser.so: undefined reference to 
> `ACE_Obstack_T<char>::release()'
> collect2: ld returned 1 exit status
> make[4]: *** [SAXPrint] Error 1
> make[4]: Leaving directory 
> `/opt/FOSS/ACE_wrappers/ACEXML/examples/SAXPrint'
> make[3]: *** [SAXPrint] Error 2
> make[3]: Leaving directory 
> `/opt/FOSS/ACE_wrappers/ACEXML/examples/SAXPrint'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/opt/FOSS/ACE_wrappers/ACEXML/examples'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/opt/FOSS/ACE_wrappers/ACEXML'
> make: *** [all] Error 2
> [root at localhost ACE_wrappers
>  
> Is this fix also applicable to Gcc 4.1.2 . I still get the above error 
> after changing the config.h file as recommended by the TPG. Thanks.
>  
> -Jim
> ------------------------------------------------------------------------
>
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
>   



More information about the Ace-users mailing list