Hi Jannson, I've just gotten back from vacation myself and will jump in on this one, as I think I see what's going wrong. You have set LIBS='-lz -ldl -lhdf5 -lhdf5_hl -lnetcdf' but I think you need the libraries in a different order, as there are dependecies, for example hdf5_hl functions call hdf5 functions. Try instead LIBS='-lnetcdf -lhdf5_hl -lhdf5 -lz -ldl' --Russ > Actually, the vacation was quite exhausting (moving from the house in Sweden > to Northern Norway...), nut now we're settling nicely here. > > I added "-lhdf5_hl" to the LIBS, and now get a new error (see attached > error_messages.txt). > I also checked whether the high-level commands were included, by checking the > libhdf5.settings file, that I found in /usr/lib/x86_64-linux-gnu folder, and > as far as I can tell they are included. (line 54 in the attached > libhdf5.settings). Again I include the "config.log" and the error messages > (this time in the "error_messages.txt"). > The configure options; > > export CPPFLAGS="-I/usr/include" > export LDFLAGS="-L/usr/lib" > export LIBS="-lz -ldl -lhdf5 -lhdf5_hl -lnetcdf" > export CC=mpicc > export F90=mpif90 > export FC=mpif90 > ./configure --enable-parallel-tests --disable-shared > > Thank so much for your patience with this! > /PÃr > > > > ________________________________________ > From: Unidata netCDF Support <address@hidden> > Sent: 20 August 2014 18:13 > To: Jansson PÃr > Cc: Jansson PÃr > Subject: [netCDF #TRL-392354]: netcdf-4 build fails > > Hi, > > I hope it was a restful vacation! The errors themselves seem > straightforward; libraries providing H5DSis_scale, H5DSset_scale, etc, are > not being linked against. Checking on my system, these are provided by the > hdf5 high-level library. So, I would adjust your LIBS to include > '-lhdf5_hl'. This assumes that libhdf5_hl is installed by libhdf5-openmpi-7; > I'm not sure if that's the case but hopefully! If it's not, or if adding > -lhdf5_hl doesn't solve this issue, let me know and we'll go from there. > > I hope this helps, have a great day, > > -Ward > > > Hi! > > Returning to the failing netcdf-fortran build on my Ubuntu workstation, > > after a short vacation. > > I'm trying to install netcdf-fortran with parallel support. > > I successfully installed hdf5 (apt-get install libhdf5-openmpi-7) > > Then installed necdf-4.3.2 > > When I try to install netcdf-fortran I get the following error, which I > > don't understand... > > Including my config.log file and some of our old conversation. > > All the best! > > /PÃr > > > > > > This is how I configured; > > export CPPFLAGS="-I/usr/include" > > export LDFLAGS="-L/usr/lib" > > export LIBS="-lnetcdf -lhdf5 -ldl" > > export CC=mpicc > > export FC=mpif90 > > ./configure --enable-parallel-tests --disable-shared > > make check > > > > And the new error message; > > address@hidden:~/software/netcdf-fortran-4.4.0$<mailto:address@hidden:~/software/netcdf-fortran-4.4.0$> > > make check > > Making check in fortran > > make[1]: Entering directory > > `/home/per/software/netcdf-fortran-4.4.0/fortran' > > make check-am > > make[2]: Entering directory > > `/home/per/software/netcdf-fortran-4.4.0/fortran' > > make[2]: Nothing to be done for `check-am'. > > make[2]: Leaving directory `/home/per/software/netcdf-fortran-4.4.0/fortran' > > make[1]: Leaving directory `/home/per/software/netcdf-fortran-4.4.0/fortran' > > Making check in nf_test > > make[1]: Entering directory > > `/home/per/software/netcdf-fortran-4.4.0/nf_test' > > make nf_test ftst_vars ftst_vars2 ftst_vars3 ftst_vars4 ftst_vars5 > > ftst_vars6 ftst_types ftst_types2 ftst_types3 ftst_groups ftst_path > > ftst_rengrps f90tst_vars tst_types tst_types2 f90tst_vars_vlen tst_f90_nc4 > > f90tst_grps f90tst_fill f90tst_fill2 f90tst_vars3 f90tst_vars4 f90tst_vars2 > > f90tst_path f90tst_rengrps tst_f90 > > make[2]: Entering directory > > `/home/per/software/netcdf-fortran-4.4.0/nf_test' > > /bin/bash ../libtool --tag=F77 --mode=link mpif90 -I../fortran > > -I../fortran -g -O2 -L/usr/lib -o 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 > > ../fortran/libnetcdff.la -lnetcdf -lhdf5 -ldl > > libtool: link: mpif90 -I../fortran -I../fortran -g -O2 -o 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/usr/lib > > ../fortran/.libs/libnetcdff.a -lz -lnetcdf -lhdf5 -ldl > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): In function > > `read_var': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4file.c:1645: undefined reference > > to `H5DSget_num_scales' > > /home/per/software/netcdf-4.3.2/libsrc4/nc4file.c:1662: undefined reference > > to `H5DSiterate_scales' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): In function > > `read_dataset': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4file.c:1843: undefined reference > > to `H5DSis_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): In function > > `read_scale': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4file.c:568: undefined reference > > to `H5DSget_scale_name' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function > > `write_dim': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4hdf.c:2304: undefined reference > > to `H5DSset_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function > > `rec_reattach_scales': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4hdf.c:66: undefined reference to > > `H5DSattach_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function > > `rec_detach_scales': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4hdf.c:107: undefined reference > > to `H5DSdetach_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function > > `var_create_dataset': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4hdf.c:1526: undefined reference > > to `H5DSset_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function > > `write_var': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4hdf.c:2187: undefined reference > > to `H5DSdetach_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4hdf.o): In function > > `attach_dimscales': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4hdf.c:2018: undefined reference > > to `H5DSattach_scale' > > //usr/local/lib/libnetcdf.a(libnetcdf4_la-nc4internal.o): In function > > `nc4_reform_coord_var': > > /home/per/software/netcdf-4.3.2/libsrc4/nc4internal.c:1312: undefined > > reference to `H5DSdetach_scale' > > collect2: error: ld returned 1 exit status > > make[2]: *** [nf_test] Error 1 > > make[2]: Leaving directory `/home/per/software/netcdf-fortran-4.4.0/nf_test' > > make[1]: *** [check-am] Error 2 > > make[1]: Leaving directory `/home/per/software/netcdf-fortran-4.4.0/nf_test' > > make: *** [check-recursive] Error 1 > > > > > > > > ________________________________________ > > From: Unidata netCDF Support <address@hidden<mailto:address@hidden>> > > Sent: 06 August 2014 17:34 > > To: Jansson PÃr > > Subject: [netCDF #TRL-392354]: netcdf-4 build fails > > > > Hello, > > > > > Hi again! > > > I ended up reinstalling Ubuntu, just to make sure everything was fresh, > > > since I tried so many times, often changing something in the > > > environment... > > > Then I took a shortcut and did "sudo apt-get install libhdf5-openmpi-7", > > > which seems to work because finally the netcdf-4.3.2 code installed > > > without errors, like this; > > > > > > > I am glad that worked! I have mixed results on Ubuntu when using the > > pre-built hdf5 packages. Sometimes it works, sometimes it doesn't. So I am > > glad that this worked for you. > > > > (...) > > > > > > > > > > > export CPPFLAGS="-I/usr/include" > > > > export LDFLAGS="-L/usr/lib" > > > > export LIBS="-lz -ldl -lhdf5" > > > > > > For some reason, it appears that netcdf-fortran is not automatically trying > > to link against libnetcdf.a. You can see this at line 729 in your > > config.log where it is looking for a library with 'nc_open', which we would > > expect to find in libnetcdf. I would change your `LIBS` line as follows: > > > > export LIBS="-lz -ldl -lhdf5 -lnetcdf" > > > > And then reconfigure and compile. I expect that this will solve your > > problem, or at least move us to a new one! Please let me know if this > > helps. > > > > -Ward > > > > > > export CC=mpicc > > > > export FC=mpif90 > > > > ./configure --enable-parallel-tests --disable-shared > > > > make check > > > > > > Which produced an early error; > > > Making check in fortran > > > make[1]: Entering directory > > > `/home/per/software/netcdf-fortran-4.4.0/fortran' > > > mpif90 -g -O2 -c -o netcdf.o netcdf.f90 > > > netcdf_overloads.f90:13.52: > > > Included at netcdf.f90:48: > > > > > > nf90_def_var_fill_FourByteReal, & > > > 1 > > > Error: Procedure 'nf90_def_var_fill_eightbytereal' in generic interface > > > 'nf90_def_var_fill' at (1) is neither function nor subroutine > > > netcdf_overloads.f90:22.52: > > > Included at netcdf.f90:48: > > > > > > nf90_inq_var_fill_FourByteReal, & > > > 1 > > > Error: Procedure 'nf90_inq_var_fill_eightbytereal' in generic interface > > > 'nf90_inq_var_fill' at (1) is neither function nor subroutine > > > netcdf_text_variables.f90:60.93: > > > Included at netcdf.f90:56: > > > > > > numDims ) = (/ 1, (product(localCount(:counter)), counter = 1, numDims - > > > 1) /) > > > 1 > > > Warning: DO loop at (1) will be executed zero times > > > make[1]: *** [netcdf.o] Error 1 > > > make[1]: Leaving directory > > > `/home/per/software/netcdf-fortran-4.4.0/fortran' > > > make: *** [check-recursive] Error 1 > > > Any ideas what happened this time? (sorry for my incompetence...) > > > I searched for netcfd.o but it doesn't exist... > > > > > > Including my config.log file > > > > > > Best regards! > > > Per > > > > > > > > > ________________________________________ > > > From: Unidata netCDF Support <address@hidden<mailto:address@hidden>> > > > Sent: 05 August 2014 17:59 > > > To: Jansson PÃr > > > Subject: [netCDF #TRL-392354]: netcdf-4 build fails > > > > > > Hi, > > > > > > Glad to hear you're making some progress; I hope you're able to get the > > > hdf5 libraries configured and installed the way you want. Hopefully that > > > will fix netcdf issue! > > > > > > Have a great day, > > > > > > -Ward > > > > > > > > > On Tue, Aug 5, 2014 at 1:38 AM, Jansson PÃr <address@hidden > > <mailto:address@hidden>> > wrote: > > > > > > > New Client Reply: netcdf-4 build fails > > > > > > > > Hi! > > > > Thanks for your reply. > > > > So it seems I made a couple of typo's, which doesn't help. (the extra > > > > "S" > > > > (twice) in the LD_LIBARARY_PATH and the missing "-". > > > > Furthermore, It seems that hdf5 is NOT built with parallel, even when I > > > > specify it correctly. > > > > Next, I will contact the HDF-support to get this right. > > > > Thanks for now! > > > > /PÃr > > > > > > > > ________________________________________ > > > > From: Unidata netCDF Support <address@hidden<mailto:address@hidden>> > > > > Sent: 04 August 2014 17:51 > > > > To: Jansson PÃr > > > > Cc: address@hidden<mailto:address@hidden> > > > > Subject: [netCDF #TRL-392354]: netcdf-4 build fails > > > > > > > > Hello, > > > > > > > > > Hi! > > > > > > > > > > Per Jansson, PhD student, physical oceanography at UiT, Norway, here. > > > > > > > > > > (On a brand new workstation with ubuntu 14.04 LTS.) > > > > > > > > > > I'm trying to build netcdf-4.3.2 C-libraries with support for parallel > > > > and netcdf-4, but ran into problems; > > > > > > > > > > I have successfully installed hdf5 (1.8.13) (make check install-->ok) > > > > > . > > > > like this; > > > > > export LD_LIBRARYS_PATH="/home/per/local/lib /usr/local/lib" > > > > > export CPPFLAGS="-I/home/per/local/include" > > > > > > > > I don't know if it is relevant, but LD_LIBRARYS_PATH should, I believe, > > > > be: > > > > > > > > LD_LIBRARY_PATH="/home/per/local/lib:/usr/local/lib" > > > > > > > > I have not seen 'LD_LIBRARYS_PATH' before, and a google search is not > > > > showing me any information about it. Section 3.3.1 of the following > > > > document describes how to use LD_LIBRARY_PATH. > > > > > > > > http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html > > > > > > > > > export LDFLAGS="-L/home/per/local/lib" > > > > > export LIBS="-lz -ldl" > > > > > export CC=mpicc > > > > > ./configure --prefix=/home/per/local/ -with-zlib=/home/per/local > > > > -enable-parallel > > > > > > > > Unless this is a typo in the email, I believe you should use > > > > '--enable-parallel', with two dashes, not '-enable-parallel', as you > > > > have > > > > above. What is happening is that configure is not finding parallel > > > > symbols > > > > in libhdf5, and so 'USE_PARALLEL' is not being defined. As a result, > > > > MPI_Comm is being defined in ncdispatch.h; this is guarded by an > > > > "#ifndef > > > > USE_PARALLEL" block. Looking at the config.log file you provided, it > > > > confirms that no parallel symbols are found. > > > > > > > > Can you confirm that libhdf5 actually built with parallel functionality? > > > > > > > > Thanks, > > > > > > > > -Ward > > > > > > > > > make check > > > > > make install > > > > > > > > > > Then I try to build the netcdf-4.3.2 C-libraries like this; > > > > > export LD_LIBRARYS_PATH="/home/per/local/lib /usr/local/lib" > > > > > > > > Again, I'm not sure if it is relevant, but this should be changed as > > > > described above. > > > > > > > > > export CPPFLAGS="-I/home/per/local/include" > > > > > export LDFLAGS="-L/home/per/local/lib" > > > > > export LIBS="-lz -ldl" > > > > > export CC=mpicc > > > > > ./configure --prefix=/home/per/local --enable-netcdf-4 > > > > --enable-parallel-tests --disable-shared --disable-dap > > > > > > > > > > > > > so far ok > > > > > make check > > > > > produces; (this is end-bit of the output...) > > > > > > > > > ============================================================================ > > > > > Testsuite summary for netCDF 4.3.2 > > > > > > > > > ============================================================================ > > > > > # TOTAL: 26 > > > > > # PASS: 26 > > > > > # SKIP: 0 > > > > > # XFAIL: 0 > > > > > # FAIL: 0 > > > > > # XPASS: 0 > > > > > # ERROR: 0 > > > > > > > > > ============================================================================ > > > > > make[3]: Leaving directory `/home/per/software/netcdf-4.3.2/h5_test' > > > > > make[2]: Leaving directory `/home/per/software/netcdf-4.3.2/h5_test' > > > > > make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/h5_test' > > > > > Making check in libdispatch > > > > > make[1]: Entering directory > > > > > `/home/per/software/netcdf-4.3.2/libdispatch' > > > > > make[1]: Nothing to be done for `check'. > > > > > make[1]: Leaving directory > > > > > `/home/per/software/netcdf-4.3.2/libdispatch' > > > > > Making check in libsrc > > > > > make[1]: Entering directory `/home/per/software/netcdf-4.3.2/libsrc' > > > > > make[1]: Nothing to be done for `check'. > > > > > make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/libsrc' > > > > > Making check in libsrc4 > > > > > make[1]: Entering directory `/home/per/software/netcdf-4.3.2/libsrc4' > > > > > /bin/bash ../libtool --tag=CC --mode=compile mpicc -DHAVE_CONFIG_H > > > > -I. -I.. -I../include -I/home/per/local/include -g -O2 -MT > > > > libnetcdf4_la-nc4attr.lo -MD -MP -MF .deps/libnetcdf4_la-nc4attr.Tpo -c > > > > -o > > > > libnetcdf4_la-nc4attr.lo `test -f 'nc4attr.c' || echo './'`nc4attr.c > > > > > libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I../include > > > > -I/home/per/local/include -g -O2 -MT libnetcdf4_la-nc4attr.lo -MD -MP > > > > -MF > > > > .deps/libnetcdf4_la-nc4attr.Tpo -c nc4attr.c -o libnetcdf4_la-nc4attr.o > > > > > In file included from nc4dispatch.h:15:0, > > > > > from nc4attr.c:17: > > > > > ../include/ncdispatch.h:90:13: error: conflicting types for 'MPI_Comm' > > > > > typedef int MPI_Comm; > > > > > ^ > > > > > In file included from /home/per/local/include/H5public.h:61:0, > > > > > from /home/per/local/include/hdf5.h:24, > > > > > from ../include/nc4internal.h:18, > > > > > from nc4attr.c:15: > > > > > /home/per/local/include/mpi.h:324:37: note: previous declaration of > > > > 'MPI_Comm' was here > > > > > typedef struct ompi_communicator_t *MPI_Comm; > > > > > ^ > > > > > In file included from nc4dispatch.h:15:0, > > > > > from nc4attr.c:17: > > > > > ../include/ncdispatch.h:91:13: error: conflicting types for 'MPI_Info' > > > > > typedef int MPI_Info; > > > > > ^ > > > > > In file included from /home/per/local/include/H5public.h:61:0, > > > > > from /home/per/local/include/hdf5.h:24, > > > > > from ../include/nc4internal.h:18, > > > > > from nc4attr.c:15: > > > > > /home/per/local/include/mpi.h:331:29: note: previous declaration of > > > > 'MPI_Info' was here > > > > > typedef struct ompi_info_t *MPI_Info; > > > > > ^ > > > > > In file included from nc4dispatch.h:15:0, > > > > > from nc4attr.c:17: > > > > > ../include/ncdispatch.h:92:0: warning: "MPI_COMM_WORLD" redefined > > > > [enabled by default] > > > > > #define MPI_COMM_WORLD 0 > > > > > ^ > > > > > In file included from /home/per/local/include/H5public.h:61:0, > > > > > from /home/per/local/include/hdf5.h:24, > > > > > from ../include/nc4internal.h:18, > > > > > from nc4attr.c:15: > > > > > /home/per/local/include/mpi.h:1016:0: note: this is the location of > > > > > the > > > > previous definition > > > > > #define MPI_COMM_WORLD OMPI_PREDEFINED_GLOBAL( MPI_Comm, > > > > ompi_mpi_comm_world) > > > > > ^ > > > > > In file included from nc4dispatch.h:15:0, > > > > > from nc4attr.c:17: > > > > > ../include/ncdispatch.h:93:0: warning: "MPI_INFO_NULL" redefined > > > > [enabled by default] > > > > > #define MPI_INFO_NULL 0 > > > > > ^ > > > > > In file included from /home/per/local/include/H5public.h:61:0, > > > > > from /home/per/local/include/hdf5.h:24, > > > > > from ../include/nc4internal.h:18, > > > > > from nc4attr.c:15: > > > > > /home/per/local/include/mpi.h:743:0: note: this is the location of the > > > > previous definition > > > > > #define MPI_INFO_NULL OMPI_PREDEFINED_GLOBAL(MPI_Info, > > > > ompi_mpi_info_null) > > > > > ^ > > > > > make[1]: *** [libnetcdf4_la-nc4attr.lo] Error 1 > > > > > make[1]: Leaving directory `/home/per/software/netcdf-4.3.2/libsrc4' > > > > > make: *** [check-recursive] Error 1 > > > > > address@hidden:~/software/netcdf-4.3.2$<mailto:address@hidden:~/software/netcdf-4.3.2$> > > > > > > > > > > What is happening? If it's any help, I have attached the config.log > > > > file... > > > > > I need the netcdf-4 to be able to install netcdf-fortran-4.4.0, which > > > > > I > > > > need to install ROMS (regional Ocean Model System). > > > > > > > > > > > > > > > Best regards! > > > > > Per > > > > > > > > > > > > > > > > > > Ticket Details > > > > =================== > > > > Ticket ID: TRL-392354 > > > > Department: Support netCDF > > > > Priority: Normal > > > > Status: Closed > > > > > > > > > > > > > > > > > > > > Ticket Details > > > > =================== > > > > Ticket ID: TRL-392354 > > > > Department: Support netCDF > > > > Priority: Normal > > > > Status: Open > > > > Link: > > > > https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=24256 > > > > > > > > > > > > > > > > > > > > Ticket Details > > > =================== > > > Ticket ID: TRL-392354 > > > Department: Support netCDF > > > Priority: Normal > > > Status: Open > > > > > > > > > > > > > > > Ticket Details > > =================== > > Ticket ID: TRL-392354 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > > Ticket Details > =================== > Ticket ID: TRL-392354 > Department: Support netCDF > Priority: Urgent > Status: Closed > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: TRL-392354 Department: Support netCDF Priority: Urgent Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.