[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #GUQ-513140]: netcdf-4.1.1 on AIX 5.3 - qextname



Hi Christian,

Sorry it's taken so long to rtespond to your question ...
> I am trying to compile netcdf-4.1.1 on our AIX 5.3 platform.
> Unfortunately I am facing a problem with the creation of the fortran
> libraries. By default we compile with -qextname to create underscores at
> the end of all function names.
> 
> I configure:
> 
> F77=xlf FC=xlf90 CC=xlc CXX=xlC CPPFLAGS='-DIBMR2Fortran -D_LARGE_FILES
> -Dextname' FFLAGS='-O3 -qstrict -qarch=auto -qtune=auto -qextname'
> FCFLAGS='-O3 -qstrict -qarch=auto -qtune=auto -qextname'
> FCFLAGS_f90='-O3 -qstrict -qarch=auto -qtune=auto -qextname' CFLAGS='-O3
> -qstrict -qarch=auto -qtune=auto' CXXFLAGS='-O3 -qstrict -qarch=auto
> -qtune=auto' ./configure --prefix=/usr/local/apps/netCDF/4.1.1/ILP32
> --disable-shared --with-hdf5=/usr/local/apps/hdf5/1.8.4p1/ILP32
> --with-szlib=/usr/local/apps/szip/2.1/ILP32
> -with-zlib=/usr/local/apps/zlib/1.2.3/ILP32 --enable-netcdf-4
> 
> then "make" which runs fine.

I think you don't want to set FCFLAGS_f90.  netCDF uses FFLAGS for the
f77 API and FCFLAGS for the f90 API.  FCFLAGS_f90 is an internal
variable used by the configure script, not intended for configuring
the build.  Have you tried just setting FCFLAGS and FFLAGS?

Also, have you tried setting F77=xlf90 as well as FC=xlf90?  It seems
the undefined externals are occurring when xlf is used for the link
step instead of xlf90.

Unfortunately, we can't duplicate the problem you are seeing here,
because we don't have an up-to-date AIX platform on which we can
conveniently test the netCDF distribution.  We are still on AIX-5.1
using older versions of xlc, xlf, and xlf90, where a different error
occurs in "make", before we get to the problem you see with "make
check".

> But when I run "make check" after a while I get the following error:
> 
> =====snip======
> 1501-510 Compilation successful for file util.F.
> source='fortlib.c' object='fortlib.o' libtool=no DEPDIR=.deps
> depmode=aix /bin/sh ../depcomp xlc -DHAVE_CONFIG_H -I. -I..
> -I../fortran -DIBMR2Fortran -D_LARGE_FILES -Dextname -O3 -qstrict
> -qarch=auto -qtune=auto -Dextname -c -o fortlib.o fortlib.c
> /bin/sh ../libtool --tag=F77 --mode=link xlf -I../fortran
> -I/usr/local/apps/hdf5/1.8.4p1/ILP32/include
> -I/usr/local/apps/zlib/1.2.3/ILP32/include
> -I/usr/local/apps/szip/2.1/ILP32/include -I../libsrc4 -I../f90 -O3
> -qstrict -qarch=auto -qtune=auto -qextname
> -L/usr/local/apps/hdf5/1.8.4p1/ILP32/lib
> -L/usr/local/apps/zlib/1.2.3/ILP32/lib
> -L/usr/local/apps/szip/2.1/ILP32/lib -o nf_test test_get.o
> test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o
> fortlib.o ../libsrc4/libnetcdf.la ../libsrc4/libnetcdf.la
> -lhdf5_hl -lhdf5 -lz
> libtool: link: xlf -I../fortran
> -I/usr/local/apps/hdf5/1.8.4p1/ILP32/include
> -I/usr/local/apps/zlib/1.2.3/ILP32/include
> -I/usr/local/apps/szip/2.1/ILP32/include -I../libsrc4 -I../f90 -O3
> -qstrict -qarch=auto -qtune=auto -qextname -o nf_test test_get.o
> test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o
> fortlib.o -L/usr/local/apps/hdf5/1.8.4p1/ILP32/lib
> -L/usr/local/apps/zlib/1.2.3/ILP32/lib
> -L/usr/local/apps/szip/2.1/ILP32/lib ../libsrc4/.libs/libnetcdf.a
> /usr/local/apps/hdf5/1.8.4p1/ILP32/lib/libhdf5_hl.a
> /usr/local/apps/hdf5/1.8.4p1/ILP32/lib/libhdf5.a -lsz -lm -lz
> -Wl,-blibpath:/usr/local/apps/szip/2.1/ILP32/lib:/usr/lpp/xlf/lib:/usr/lib:/lib
> ld: 0711-317 ERROR: Undefined symbol: .ignorefpe_
> ld: 0711-317 ERROR: Undefined symbol: .nf_inq_libvers_
> ld: 0711-317 ERROR: Undefined symbol: .nf_create_
> ld: 0711-317 ERROR: Undefined symbol: .nf_def_dim_
> ld: 0711-317 ERROR: Undefined symbol: .nf_strerror_
> ld: 0711-317 ERROR: Undefined symbol: .nf_def_var_
> ld: 0711-317 ERROR: Undefined symbol: .udabort_
> ld: 0711-317 ERROR: Undefined symbol: .nf_put_att_text_
> ld: 0711-317 ERROR: Undefined symbol: .nf_put_att_double_
> ld: 0711-317 ERROR: Undefined symbol: .nf_enddef_
> ld: 0711-317 ERROR: Undefined symbol: .nf_put_vara_text_
> ld: 0711-317 ERROR: Undefined symbol: .nf_put_vara_double_
> ld: 0711-317 ERROR: Undefined symbol: .nf_close_
> =====snip======
> 
> The problem seems to be that in fortran/.libs/libnetcdff.a function
> names are only defined without underscores:
> 
> nm 4.1.1/fortran/.libs/libnetcdff.a | grep nf_create
> .nf_create T 320
> nf_create D 4072 12
> nf_create d 4000 4
> .nf_create_par T 320
> nf_create_par D 16612 12
> nf_create_par d 16320 4
> .nf_create_ U -
> .nf_create_par_ U -
> 
> However I have used the same configure for netcdf-4.0.1 were it seems to
> work:
> 
> nm 4.0.1/fortran/.libs/libnetcdff.a | grep nf_create
> .nf_create_ T 320
> nf_create_ D 4072 12
> nf_create_ d 4000 4
> .nf_create_par_ T 320
> nf_create_par_ D 15820 12
> nf_create_par_ d 15552 4
> .nf_create_ U -
> .nf_create_par_ U -
> 
> Does autoconf automatically remove/ignore -qextname?

No, not as far as I know.

> You can find the config.log and the configure/compile/test output attached.
> 
> My compilers are:
> xlc -qversion
> IBM XL C/C++ for AIX, V10.1
> Version: 10.01.0000.0003
> xlf -qversion
> IBM XL Fortran for AIX, V12.1
> Version: 12.01.0000.0005

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: GUQ-513140
Department: Support netCDF
Priority: Normal
Status: Closed