[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #QBX-695002]: netcdf-fortran 4.4.1 check fails in Mac OS X 10.9.5 with gfortran
- Subject: [netCDF #QBX-695002]: netcdf-fortran 4.4.1 check fails in Mac OS X 10.9.5 with gfortran
- Date: Mon, 29 Sep 2014 14:36:03 -0600
Li,
> Thank you for help! The following is the configure command line:
>
> . /opt/packman/zlib/1.2.8/1/bashrc && . /opt/packman/curl/7.37.1/1/bashrc &&
> . /opt/packman/szip/2.1/1/bashrc && . /opt/packman/mpich/3.1.2/1/bashrc && .
> /opt/packman/hdf5/1.8.13/1/bashrc && .
> /opt/packman/parallel_netcdf/1.5.0/1/bashrc && .
> /opt/packman/netcdf_c/4.3.2/1/bashrc && . /opt/packman/gcc/4.9.1/bashrc &&
> LD_RUN_PATH='/opt/packman/zlib/1.2.8/1/lib:/opt/packman/curl/7.37.1/1/lib:/opt/packman/szip/2.1/1/lib:/opt/packman/mpich/3.1.2/1/lib:/opt/packman/hdf5/1.8.13/1/lib:/opt/packman/parallel_netcdf/1.5.0/1/lib:/opt/packman/netcdf_c/4.3.2/1/lib:/opt/packman/gcc/4.9.1/lib'
> CC=/opt/packman/mpich/3.1.2/1/bin/mpicc
> MPICC=/opt/packman/mpich/3.1.2/1/bin/mpicc
> CXX=/opt/packman/mpich/3.1.2/1/bin/mpic++
> MPICXX=/opt/packman/mpich/3.1.2/1/bin/mpic++
> F77=/opt/packman/mpich/3.1.2/1/bin/mpif77
> MPIF77=/opt/packman/mpich/3.1.2/1/bin/mpif77
> FC=/opt/packman/mpich/3.1.2/1/bin/mpif90
> MPIF90=/opt/packman/mpich/3.1.2/1/bin/mpif90
> PATH=/opt/packman/netcdf_c/4.3.2/1/bin:$PATH CPPFLAGS='-I/opt
/packman/netcdf_c/4.3.2/1/include'
LDFLAGS='-L/opt/packman/netcdf_c/4.3.2/1/lib’ ./configure
--prefix=/opt/packman/netcdf_fortran/4.4.1/1 --disable-dependency-tracking
--disable-dap-remote-tests --enable-static --enable-shared
--enable-parallel-tests
>
> So the shared and static libraries are both built. The config.log and build
> out are attached.
Unfortunately, I didn't see any attachments on your email. Please send the
config.log and
output from again, if you can. Thanks.
--Russ
> I have saw the instructions. To my understanding, if the static libraries are
> built, we also need to specify the locations of HDF5, ZLIB and CURL. I only
> specify the location of NetCDF-Fortran, but why the building is ok in CentOS?
> After I specify them, NetCDF-Fortran with parallel option enabled is built
> successfully in Mac.
>
> Best regards,
>
> Li
>
>
> On 2014?9?29?, at ??3:51, Unidata netCDF Support <address@hidden> wrote:
>
> > Hi Li,
> >
> > I'm not sure whether you're trying to build shared or static libraries, but
> > the
> > instructions are different in the two cases. In any case, the instructions
> > are
> > here for both kinds of libraries:
> >
> >
> > http://www.unidata.ucar.edu/netcdf/docs/building_netcdf_fortran.html#building_fortran_shared_libraries
> >
> > For OSX, be sure to use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH to
> > indicate where the C library is installed. Please let us know if following
> > the
> > instructions above doesn't work. It works for us on OSX.
> >
> > --Russ
> >
> >> I am developing a package manager (https://github.com/dongli/packman),
> >> which will install packages (i.e. netcdf) by just one command. It should
> >> support multiple Linux distributions and Mac OS X. Currently, I am
> >> testing netcdf-fortran with parallel option enabled. The compiler set is
> >> from GCC 4.9.1.
> >>
> >> The hdf5, netcdf-c and mpich (or openmpi) have been installed correctly
> >> on CentOS and Mac OS X. Then I tried to build netcdf-fortran 4.4.1, the
> >> one on CentOS was built successfully, but the one on Mac OS X failed
> >> with the following errors when checking:
> >>
> >> libtool: link: /opt/packman/mpich/3.1.2/1/bin/mpif77 -I../fortran
> >> -I../fortran -g -O2 -o .libs/nf_test f03lib_f_interfaces.o test_get.o
> >> test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o
> >> -L/opt/packman/netcdf_c/4.3.2/1/lib ../fortran/.libs/libnetcdff.dylib
> >> Undefined symbols for architecture x86_64:
> >> "_nc__create", referenced from:
> >> import-atom in libnetcdff.dylib
> >> "_nc__create_mp", referenced from:
> >> import-atom in libnetcdff.dylib
> >> "_nc__enddef", referenced from:
> >> import-atom in libnetcdff.dylib
> >> …
> >>
> >> I have checked the same compile command on CentOS:
> >>
> >> libtool: link: /home/dongli/tools/mpich/3.1.2/1/bin/mpif77 -I../fortran
> >> -I../fortran -g -O2 -o .libs/nf_test f03lib_f_interfaces.o test_get.o
> >> test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o
> >> -L/home/dongli/tools/netcdf_c/4.3.2/1/lib ../fortran/.libs/libnetcdff.so
> >> -L/home/dongli/tools/curl/7.37.1/1/lib
> >> -L/home/dongli/tools/zlib/1.2.8/1/lib -L/home/dongli/tools/szip/2.1/1/lib
> >> -L/home/dongli/tools/hdf5/1.8.13/1/lib
> >> -L/home/dongli/tools/parallel_netcdf/1.5.0/1/lib
> >> /home/dongli/tools/netcdf_c/4.3.2/1/lib/libnetcdf.so -lpnetcdf
> >> /home/dongli/tools/hdf5/1.8.13/1/lib/libhdf5_hl.so
> >> /home/dongli/tools/hdf5/1.8.13/1/lib/libhdf5.so
> >> /home/dongli/tools/szip/2.1/1/lib/libsz.so -ldl -lm
> >> /home/dongli/tools/curl/7.37.1/1/lib/libcurl.so -lidn -lssl -lcrypto
> >> -lldap -lz -lrt -Wl,-rpath
> >> -Wl,/home/dongli/tools/netcdf_fortran/4.4.1/1/lib -Wl,-rpath
> >> -Wl,/home/dongli/tools/netcdf_c/4.3.2/1/lib -Wl,-rpath
> >> -Wl,/home/dongli/tools/hdf5/1.8.13/1/lib -Wl,-rpath -Wl,/home/dongli/t
ool
> > s/
> >> szip/2.1/1/lib -Wl,-rpath -Wl,/home/dongli/tools/curl/7.37.1/1/lib
> >>
> >> As you can see, on CentOS more options have been appended, so the '_nc_*'
> >> symbols have been resolved.
> >>
> >> So I would like to know what are the differences of building procedures
> >> on the two systems, and how could I solve this problem on Mac OS X?
> >>
> >> Best regards,
> >>
> >> Li
> >>
> >> -----------------------------------------
> >> Dr. Li Dong (??)
> >> LASG, Institute of Atmospheric Physics
> >> Chinese Academy of Sciences
> >> P.O. Box 9804
> >> Beijing 100029, China
> >> Phone: 8610-8299 5143
> >> Website: http://dongli.github.io/dongli
> >>
> >>
> >>
> > Russ Rew UCAR Unidata Program
> > address@hidden http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: QBX-695002
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
>
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: QBX-695002
Department: Support netCDF
Priority: Normal
Status: Closed