You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/04/08 18:09:13 UTC

DO NOT REPLY [Bug 18820] New: - bug in compiling xerces whith gcc on AIX

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18820>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18820

bug in compiling xerces whith gcc on AIX

           Summary: bug in compiling xerces whith gcc on AIX
           Product: Xerces-C++
           Version: 2.2.0
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Build
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: tireguit@lea.ma


I need to build xercesc on AIX whith gcc and I found some trouble and i give 
here the workaround I use:
$ gcc --version                                                            
gcc (GCC) 3.2.1                                                            
Copyright (C) 2002 Free Software Foundation, Inc.                          
This is free software; see the source for copying conditions.  There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ./config.guess       
powerpc-ibm-aix4.3.2.0 

$ uname        
AIX            
$ oslevel -r   
4330-11        

$./runConfigure -p aix -c gcc -x gcc -r pthread -b 32  
-----------------------------------------
-----------------------------------------------
$ gmake
----------------------------------------------------
---------------------------------------------------
gcc: unrecognized option `-qnotempinc'     
....                                     
In file included from /usr/include/sys/pri.h:29,                                
                 from /usr/include/sys/sched.h:38,                              
                 from /usr/include/sched.h:52,                                  
                 from /usr/include/pthread.h:43,                                
                 from AIXPlatformUtils.cpp:71:                                  
/usr/include/sys/proc.h:203: 'crid_t' is used as a type, but is not defined as  
   a type.                                                                      
/usr/include/sys/proc.h:212: 'class_id_t' is used as a type, but is not defined 
   as a type.      
....
In file included from /usr/include/sys/pri.h:29,                                
                 from /usr/include/sys/sched.h:38,                              
                 from /usr/include/sched.h:52,                                  
                 from /usr/include/pthread.h:43,                                
                 from /install/home/include/c++/3.2.1/powerpc-ibm-aix4.3.2.0/bit
s/gthr-posix.h:37,                                                              
                 from /install/home/include/c++/3.2.1/powerpc-ibm-aix4.3.2.0/bit
s/gthr-default.h:33,                                                            
                 from /install/home/include/c++/3.2.1/powerpc-ibm-aix4.3.2.0/bit
s/gthr.h:98,                                                                    
                 from /install/home/include/c++/3.2.1/powerpc-ibm-aix4.3.2.0/bit
s/c++io.h:37,                                                                   
                 from /install/home/include/c++/3.2.1/bits/fpos.h:44,           
                 from /install/home/include/c++/3.2.1/iosfwd:46,                
                 from /install/home/include/c++/3.2.1/ios:44,                   
                 from /install/home/include/c++/3.2.1/ostream:45,               
                 from /install/home/include/c++/3.2.1/iostream:45,              
                 from /install/home/include/c++/3.2.1/backward/iostream.h:32,   
                 from StdOutFormatTarget.cpp:83:                                
/usr/include/sys/proc.h:203: 'crid_t' is used as a type, but is not defined as  
   a type.                                                                      
/usr/include/sys/proc.h:212: 'class_id_t' is used as a type, but is not defined 
   as a type.                                                                   
gmake[1]: *** [StdOutFormatTarget.o] Erreur 1                                   

-------------------------------------------------
to solve the warning :    gcc: unrecognized option `-qnotempinc'   
and not to use  the IBM script makeC++SharedLib_r 

$ diff Makefile.incl Makefile.incl.orig                      
237d236                                                      
< ifeq (${CXX}, xlC_r)                                       
246a246                                                      
>                                                            
261,276c261                                                  
< else                                                       
< PLATFORM_COMPILE_OPTIONS = -D_THREAD_SAFE                  
<                                                            
                                                             
< ifeq (${BITSTOBUILD}, 64)                                  
                                                             
<     MAKE_SHARED = gcc -shared -Wl,-brtl -maix64            
<     MAKE_SHARED_C = gcc -shared -Wl,-brtl -maix64          
< else                                                       
                                                             
<     MAKE_SHARED = gcc -shared -Wl,-brtl                    
<     MAKE_SHARED_C = gcc -shared -Wl,-brtl                  
< endif                                                      
                                                             
< ALLLIBS= ${LIBS} -lstdc++ -lpthread                        
                                                             
< EXTRA_LINK_OPTIONS =                                       
< SHLIBSUFFIX=.so                                            
                                                             
< ## Compiler switch to embed a library name                 
                                                             
< LD_SONAME =                                                
                                                             
< endif                                                      
---                                                          
>                                                            
    
to solve the error compilation add from /usr/include/sys/types.h the two 
definitions
$ grep crid_t /usr/include/sys/types.h      
typedef int             crid_t;             
$ grep class_id_t /usr/include/sys/types.h  
typedef unsigned int class_id_t;            
------------------------------------------------------------
                                             
in ($XERCESCROOT)/src/xercesc/util/Platforms/AIX   
$ diff AIXPlatformUtils.cpp AIXPlatformUtils.cpp.orig       
65,67d64                                                    
< typedef int             crid_t;                           
< typedef unsigned int class_id_t;                          
<    

in  ($XERCESCROOT)/src/xercesc/framework             
$ diff StdOutFormatTarget.cpp  StdOutFormatTarget.cpp.orig   
82,84d81                                                     
< typedef int             crid_t;                            
< typedef unsigned int class_id_t;                           
<                                                            
        

-------------------------------
now its good whith 32 bits
to compile in 64 bits mode
I Have to 
export CXXFLAGS = -maix64 
and
export CFLAGS= -maix63
befor runing runConfigure

and i have warnings on options -q64 and -qwarn64 
this options is in hardcoded in runConfigure

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org