Ticket #55 (closed defect: fixed)

Opened 4 years ago

Last modified 22 months ago

pj_mutex build problem on AIX

Reported by: neteler Owned by: warmerdam
Priority: major Milestone: 4.8.0
Component: Core Version: 4.7.0
Keywords: AIX core_lock Cc:

Description

I am unable to build proj-4.7.0 on powerpc-ibm-aix5.3.0.0. Using gcc version 4.2.0:

configure
checking for a BSD-compatible install... /opt/freeware/bin/install -c  
checking whether build environment is sane... yes  
checking for a thread-safe mkdir -p... /opt/freeware/bin/mkdir -p  
checking for gawk... gawk  
checking whether make sets $(MAKE)... yes  
checking whether to enable maintainer-specific portions of Makefiles... no   
checking for gcc... xlc_r  
checking for C compiler default output file name... a.out  
checking whether the C compiler works... yes 
checking whether we are cross compiling... no  
checking for suffix of executables...  
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no 
checking whether xlc_r accepts -g... yes
checking for xlc_r option to accept ISO C89... none needed   
checking for style of include used by make... GNU  
checking dependency style of xlc_r... none   
checking for a BSD-compatible install... /opt/freeware/bin/install -c  
checking whether ln -s works... yes  
checking whether make sets $(MAKE)... (cached) yes   
checking build system type... powerpc-ibm-aix5.3.0.0 
checking host system type... powerpc-ibm-aix5.3.0.0  
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /opt/freeware/bin/grep   
checking for egrep... /opt/freeware/bin/grep -E
checking for non-GNU ld... /usr/bin/ld 
checking if the linker (/usr/bin/ld) is GNU ld... no 
checking for /usr/bin/ld option to reload object files... -r 
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognize dependent libraries... pass_all  
checking how to run the C preprocessor... xlc_r -E   
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes 
checking for stdlib.h... yes 
checking for string.h... w |yes
checking for memory.h...  hyes 
checking for strings.h... eadyes
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking dlfcn.h usability... yes  
checking dlfcn.h presence... yes
checking for dlfcn.h... yes  
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes  
checking whether g++ accepts -g... yes 
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E   
checking for g77... no 
checking for xlf... xlf
checking whether we are using the GNU Fortran 77 compiler... no
checking whether xlf accepts -g... yes 
checking the maximum length of command line arguments... 245760
checking command to parse /usr/bin/nm -B output from xlc_r object... ok
checking for objdir... .libs 
checking for ar... ar  
checking for ranlib... ranlib  
checking for strip... strip  
checking for xlc_r option to produce PIC...  
checking if xlc_r static flag -bnso -bI:/lib/syscalls.exp works... no  
checking if xlc_r supports -c -o file.o... yes 
checking whether the xlc_r linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... aix5.3.0.0 ld.so  
checking how to hardcode library paths into programs... immediate  
checking whether stripping libraries is possible... no 
checking if libtool supports shared libraries... yes 
checking whether to build shared libraries... yes  
checking whether to build static libraries... no
configure: creating libtool  
appending configuration tag "CXX" to libtool 
checking for ld used by g++... /usr/bin/ld   
checking if the linker (/usr/bin/ld) is GNU ld... no 
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes 
checking for g++ option to produce PIC...  
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes 
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes 
checking dynamic linker characteristics... aix5.3.0.0 ld.so  
checking how to hardcode library paths into programs... immediate  
appending configuration tag "F77" to libtool 
checking if libtool supports shared libraries... yes 
checking whether to build shared libraries... yes  
checking whether to build static libraries... no
checking for xlf option to produce PIC...  
checking if xlf static flag -bnso -bI:/lib/syscalls.exp works... no  
checking if xlf supports -c -o file.o... yes 
checking whether the xlf linker (/usr/bin/ld) supports shared libraries... yes 
checking dynamic linker characteristics... aix5.3.0.0 ld.so  
checking how to hardcode library paths into programs... immediate  
checking for exp in -lm... yes 
checking for ANSI C header files... (cached) yes
checking jni.h usability... no 
checking jni.h presence... no  
checking for jni.h... no
checking whether to enable Java/JNI support... disabled
checking for mutexes... enabled, pthread
configure: creating ./config.status  
config.status: creating Makefile
config.status: creating src/Makefile 
config.status: creating man/Makefile 
config.status: creating man/man1/Makefile  
config.status: creating man/man3/Makefile  
config.status: creating nad/Makefile 
config.status: creating jniwrap/Makefile
config.status: creating jniwrap/org/Makefile 
config.status: creating jniwrap/org/proj4/Makefile   
config.status: creating src/proj_config.h  
config.status: executing depfiles commands   

make
...
/bin/sh ../libtool --tag=CC   --mode=compile xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread     -O2 -c -o pj_gridinfo.lo pj_gridinfo.c           
 xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread -O2 -c pj_gridinfo.c  -DPIC -o .libs/pj_gridinfo.o                                               
source='pj_gridlist.c' object='pj_gridlist.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/sh ../depcomp \
/bin/sh ../libtool --tag=CC   --mode=compile xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread     -O2 -c -o pj_gridlist.lo pj_gridlist.c
 xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread -O2 -c pj_gridlist.c  -DPIC -o .libs/pj_gridlist.o
source='jniproj.c' object='jniproj.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/sh ../depcomp \
/bin/sh ../libtool --tag=CC   --mode=compile xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread     -O2 -c -o jniproj.lo jniproj.c
 xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread -O2 -c jniproj.c  -DPIC -o .libs/jniproj.o
"jniproj.c", line 197.7: 1506-356 (W) Compilation unit is empty.
source='pj_mutex.c' object='pj_mutex.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/sh ../depcomp \
/bin/sh ../libtool --tag=CC   --mode=compile xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread     -O2 -c -o pj_mutex.lo pj_mutex.c
 xlc_r -DHAVE_CONFIG_H -I. -DPROJ_LIB=\"/afs/user/private/bin/share/proj\" -DMUTEX_pthread -O2 -c pj_mutex.c  -DPIC -o .libs/pj_mutex.o
"pj_mutex.c", line 106.24: 1506-343 (S) Redeclaration of core_lock differs from previous declaration on line 917 of "/usr/include/sys/proc.h".
"pj_mutex.c", line 106.24: 1506-382 (I) The type "struct {...}" of identifier core_lock differs from previous type "union _complex_lock".
make[2]: *** [pj_mutex.lo] Error 1
make[2]: Leaving directory `/afs/user/private/software/proj-4.7.0/src'

In /usr/include/sys/proc.h I see:

grep core_lock /usr/include/sys/proc.h
extern Complex_lock core_lock;

Perhaps a name space collision?

Change History

Changed 4 years ago by neteler

  • version changed from unspecified to 4.7.0

Correction: not the installed gcc was selected but xlc_r (IBM XL C compiler)

Changed 3 years ago by warmerdam

  • status changed from new to assigned

I do not have access to an aix system to establish how to adjust the mutex implementation to work their.

Do things build on aix if you configure --without-mutex?

Changed 3 years ago by neteler

I don't really remember: I think yes. Eventually I changed to a Linux cluster since AIX is too hard to work with. Feel free to close as "wontfix".

Changed 3 years ago by beppe

Do things build on aix if you configure --without-mutex?

Yes it does, but testvarious fails (see Ticket 85  http://trac.osgeo.org/proj/ticket/85).

Changed 22 months ago by warmerdam

  • keywords AIX core_lock added
  • resolution set to fixed
  • status changed from assigned to closed
  • component changed from default to Core
  • milestone set to 4.8.0

As noted in #85 the test failure on AIX was unrelated to the mutex issue.

On more careful review of the error message I believe the problem is that a system include file is declaring "core_lock" and this conflicts with my use of the name in pj_mutex.c. While I think proc.h is evil to use that name, it is easy enough for me to use a more proj.4 specific name in place of core_lock. I have done so in trunk (r2082). Please let me know if this does not correct the problem.

Note: See TracTickets for help on using tickets.