a.deierling@psilogistics.com (Andreas Deierling) wrote in message news:<b71b4f42.0402171023.626f65ea@posting.google.com>...
> Failed to build ACE 5.4 on AIX 5.2 with gcc3.3.2
> Used config-aix5.1.h and platform_aix_g++.GNU
> I failed with ACE5.1, 5.3 too, so I tried 5.4.
>
> Does anybody know IF it works ?
> Could it help to build my own AIX5.2 gcc ?
> (my gcc 3.3.2 is binary AIX 5.1 but it worked fine for Non-ACE-
> applications)
> Do I have to use IBM Visual C++ Compiler ?
>
> Any suggestions would be helpful.
>
> ACE VERSION: 5.4
>
> HOST MACHINE and OPERATING SYSTEM:
> RS/6000, 32-bit-kernel mode, AIX5.2
>
> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> gcc 3.3.2 (binary distribution)
>
> CONTENTS OF $ACE_ROOT/ace/config.h:
> // config-aix5.1.h,v 1.5 2003/12/16 17:49:48 elliott_c Exp
> //
> // Config file for AIX 5.1
>
> // This define is needed for building with Visual Age C++ 5 in incremental
> // mode. In the batch mode build, platform_aix_ibm.GNU sets it. The incremental
> // mode compiler won't be supported after ACE 5.3, so this will also go away
> // in that timeframe, so don't worry about future AIX versions.
> #if !defined (ACE_AIX_VERS)
> # define ACE_AIX_VERS 501
> #endif
>
> #include "ace/config-aix-4.x.h"
>
> // AIX 5.1 has AIO, but it doesn't have the same API as other POSIX
> // systems, and the semantics of operations are a bit different. Will take
> // some real work to get this going.
> //#define ACE_HAS_AIO_CALLS
>
> // I think this is correct, but needs to be verified... -Steve Huston
> #define ACE_HAS_SIGTIMEDWAIT
>
> // AIX 5.1 has netinet/tcp.h
> #undef ACE_LACKS_NETINET_TCP_H
>
> CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless
> this isn't used in this case, e.g., with Microsoft Visual C++):
>
> # platform_aix_g++.GNU,v 4.7 2004/01/06 22:54:53 shuston Exp
> #
> # Platform macros for building on AIX with g++. This has been tested on
> # AIX 4.3 with gcc 3. Earlier versions of gcc may compile, but are known to
> # have serious problems on AIX.
> #
> # Contributed by Ian Wright <I.Wright@elsevier.co.uk>
> # Updated for AIX 4.3 and gcc 3 by Steve Huston <shuston@riverace.com>
>
> ifeq (,$(debug))
> debug = 1
> endif
> ifeq (,$(distrib))
> distrib = 0
> endif
> ifeq (,$(exceptions))
> exceptions = 1
> endif
> ifeq (,$(optimize))
> optimize = 1
> endif
> ifeq (,$(rtti))
> rtti = 0
> endif
> ifeq (,$(threads))
> threads = 1
> endif
> ifeq (,$(buildbits))
> buildbits = native
> endif
> ifeq (,$(with_ld))
> with_ld = aix
> endif
>
> # Yes, believe it or not...
> # The way to make a shared lib on AIX is to make a shared object file and
> # then put that in an archive.
> # Non-shared archives are named lib<x>ns.a - ns = non-shared.
> SOEXT = a
> # aix_build turns on the funky shared library building code in
> # rules.lib.GNU
> aix_build = 1
>
> ifeq (1,$(threads))
> CFLAGS += -pthread
> endif
>
> # In case anything here or in the config depends on OS version number,
> # grab it here and pass it all to the compiler as well.
> AIX_MAJOR_VERS := $(shell uname -v)
> AIX_MINOR_VERS := $(shell uname -r)
> AIX_VERS := $(AIX_MAJOR_VERS)0$(AIX_MINOR_VERS)
>
> CC = gcc
> CXX = g++
>
> CFLAGS += -W -Wall -mcpu=common -DACE_AIX_VERS=$(AIX_VERS)
> ifeq ($(buildbits),32)
> CFLAGS += -m32
> endif
> ifeq ($(buildbits),64)
> CFLAGS += -m64
> endif
> DCFLAGS += -g
> DLD = $(CXX)
> LD = $(CXX)
> # Linking TAO_IDL runs out of TOC space unless -bbigtoc is given to ld.
> # Don't do it for everything because it decreases run-time performance.
> ifeq ($(notdir $(shell pwd)), TAO_IDL)
> LDFLAGS += -Wl,-bbigtoc
> endif
>
> OCFLAGS = -O2
> OCCFLAGS = $(OCFLAGS)
> ifeq ($(threads),1)
> SOFLAGS += -pthread
> endif
> SOFLAGS += -shared -Wl,-bexpall # -Wl,-bloadmap:lib.map
> LIBS += -lxti -ldl
> ARFLAGS = cruv
> RANLIB = ranlib
>
> # Test for template instantiation, add to SOFLAGS if versioned_so set,
> # add -E to LDFLAGS if using GNU ld
> #
> include $(ACE_ROOT)/include/makeinclude/platform_g++_common.GNU
>
> CCFLAGS += $(CFLAGS) $(TEMPLATES_FLAG)
>
>
> AREA/CLASS/EXAMPLE AFFECTED:
> [What example failed? What module failed to compile?]
> Just the first module : ARGV.cpp
>
> DOES THE PROBLEM AFFECT:
> COMPILATION? Yes
> LINKING?
> On Unix systems, did you run make realclean first?
> EXECUTION?
> OTHER (please specify)?
> ACE and my application
>
> SYNOPSIS:
> Compilation stops
>
> DESCRIPTION:
> make[1]: Entering directory `/PSIlog/ace5.4/ACE_wrappers/ace'
>
> Makefile: /PSIlog/ace5.4/ACE_wrappers/ace/Makefile.ace
>
> g++ -pthread -W -Wall -mcpu=common -DACE_AIX_VERS=502 -O2 -g -O2 -I/PSIlog/a
> ce/ACE_wrappers -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -DACE_BUILD_DLL -DACE_OS_B
> UILD_DLL -c -o .shobj/ARGV.o ARGV.cpp
> In file included from /usr/local/include/c++/3.3.2/powerpc-ibm-aix5.1.0.0/bits/g
> thr-posix.h:37,
> from /usr/local/include/c++/3.3.2/powerpc-ibm-aix5.1.0.0/bits/g
> thr-default.h:33,
> from /usr/local/include/c++/3.3.2/powerpc-ibm-aix5.1.0.0/bits/g
> thr.h:98,
> from /usr/local/include/c++/3.3.2/powerpc-ibm-aix5.1.0.0/bits/c
> ++io.h:37,
> from /usr/local/include/c++/3.3.2/bits/fpos.h:44,
> from /usr/local/include/c++/3.3.2/iosfwd:49,
> from /PSIlog/ace/ACE_wrappers/ace/iosfwd.h:46,
> from /PSIlog/ace/ACE_wrappers/ace/OS_Log_Msg_Attributes.h:25,
> from /PSIlog/ace/ACE_wrappers/ace/Log_Msg.h:97,
> from /PSIlog/ace/ACE_wrappers/ace/Unbounded_Queue.cpp:17,
> from /PSIlog/ace/ACE_wrappers/ace/Unbounded_Queue.h:286,
> from /PSIlog/ace/ACE_wrappers/ace/ARGV.h:24,
> from ARGV.cpp:6:
> /usr/include/pthread.h:554: error: `pthread_rwlock_t' was not declared in this
> scope
> /usr/include/pthread.h:554: error: parse error before `)' token
> /usr/include/pthread.h:557: error: `pthread_rwlock_t' was not declared in this
> scope
>
> REPEAT BY:
>
> SAMPLE FIX/WORKAROUND:
Hi Andreas,
we are using TAO1.4 on AIX5.2 with gcc 3.3.1 and don't have
your problem.
Our configuration:
config-aix5.1.h
platform_aix_g++.GNU
We are using
inline = 0
and removed
# define ACE_HAS_AIO_CALLS
in config-posix.h, because there are still differences in Posix AIO
and AIX AIO implementation :-(
But I think, this don't solve your problem. We have used
many versions of TAO and I've never seen your problem.
Some inconsistencies with compiler-AIX-version?
Are you using binaries of gcc or do you compile the sources
of gcc?
I you are using binaries, then the pthread.h of AIX don't fit
to gcc, which seems to be compiled for AIX5.1 !
Our system adiministrator is using something like the
attached file fix.cmd
Best regards,
Werner Buchert.
fix.cmd:
#!/bin/ksh
#
cd /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/install-tools
fixproto /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/include
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/include
/usr/include
fixproto /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/include
/usr/include
export TARGET_MACHINE=powerpc-ibm-aix5.1.0.0
fixinc.sh /usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.1/include
Hi Werner,
this really made the things work !!!
I just thought it was something with AIX 5.1 and 5.2 because I am
using the
AIX 5.1 binary gcc but did not know how to work around.
1. I changed "3.3.1" to "3.3.2" and run the script
2. ACE Makefile works fine then with some warnings left...
3. ...and "sigval_t not declared" !
4. So i tried adding "typedef union sigval sigval_t;" in config.h
(so did the freeBSD people) and I got it !
Best regards,
:-) Andreas