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

[netCDF #ZVE-924213]: cannot configure



Hi,

I think this may be another case of a problem we have seen with building
netCDF on OSX Mavericks.  Here are two suggested solutions.  The first 
is easy, if it works, but the second is probably required.

  Solution 1:  Run "make clean" in your netcdf build directory, then try 
  again without changing anything else about how you built netCDF from 
  source.

  Solution 2, from Ward):

  The problem appears to be related to the shell scripts used to run some 
  of the tests. They rely on a 'srcdir' environmental variable being set; 
  this variable is not being set properly for OSX, and there is no easy 
  way to set it as it changes related to the particular test being run.

  A work around for this would be to go into those directories with tests 
  that fail and run a subset of the tests manually. For example:

  $ netcdf-4.1.3/ncdump> ./run_tests.sh

  fails, but

  $ netcdf-4.1.3/ncdump> srcdir=`pwd` ./run_tests.sh

  passes.

  I'm sorry I don't have a better fix for you, but at least I believe it's 
  safe to assume the main problem is with the shell scripts, and not the 
  netcdf libraries you've compiled.

  It is worth noting that netcdf-4.1.3 is a fairly old version and is 
  currently unsupported. NetCDF provides backwards compatibility with 
  previous versions, however, so any application using netcdf-4.1.3 should 
  also work with 4.3.1.1 (the latest release). The 4.3.1.1 release may be 
  found here:

  http://github.com/Unidata/netcdf-c/releases

I'm not sure why the above earlier response to a similar problem didn't 
get archived in our searchable support responses, but it should have been.

--Russ

> Following your suggestions with CPPFLAGS and LDFLAGS, I was able to
> compile the netcdf-c libraries:
> 
> [birch:local/netcdf-c-4.3.1.1/lib] laura% file libnetcdf.dylib
> libnetcdf.dylib: Mach-O 64-bit dynamically linked shared library x86_64
> 
> However, make check failed to reach the end. So I am not sure if it was
> compiled correctly or if the test failed because I used 64-bit. I am
> attaching a file check.out which is the output of "make check".
> 
> I am going to try to compile the netcdf-fortran librairies next.
> 
> Thanks for all your help with this.
> Laura
> 
> 
> On 3/17/14 2:51 PM, Laura Fowler wrote:
> > Hi Ward:
> > Here is an answer to your first question about the hdf5 libraries. The
> > content of /birch/laura/local/hdf5-1.8.12/lib looks like this:
> >
> > drwxr-xr-x  2 laura  15      510 Mar 17 12:04 ./
> > drwxr-xr-x  6 laura  15      204 Mar 17 12:04 ../
> > -rwxr-xr-x  1 laura  15  6151932 Mar 17 12:04 libhdf5.8.dylib*
> > -rw-r--r--  1 laura  15  7919992 Mar 17 12:04 libhdf5.a
> > lrwxr-xr-x  1 laura  15       15 Mar 17 12:04 libhdf5.dylib@ ->
> > libhdf5.8.dylib
> > -rwxr-xr-x  1 laura  15     1054 Mar 17 12:04 libhdf5.la*
> > -rw-r--r--  1 laura  15     3328 Mar 17 12:04 libhdf5.settings
> > -rw-r--r--  1 laura  15  1210296 Mar 17 12:04 libhdf5_fortran.a
> > -rwxr-xr-x  1 laura  15     1080 Mar 17 12:04 libhdf5_fortran.la*
> > -rwxr-xr-x  1 laura  15   172304 Mar 17 12:04 libhdf5_hl.8.dylib*
> > -rw-r--r--  1 laura  15   209608 Mar 17 12:04 libhdf5_hl.a
> > lrwxr-xr-x  1 laura  15       18 Mar 17 12:04 libhdf5_hl.dylib@ ->
> > libhdf5_hl.8.dylib
> > -rwxr-xr-x  1 laura  15     1118 Mar 17 12:04 libhdf5_hl.la*
> > -rw-r--r--  1 laura  15   485864 Mar 17 12:04 libhdf5hl_fortran.a
> > -rwxr-xr-x  1 laura  15     1189 Mar 17 12:04 libhdf5hl_fortran.la*
> >
> > and doing "file" on the 2 libraries below indicate to me that both
> > *.dylib libraries have been compiled with 64-bit. Doing "file" on the
> > other libraries (like libhdf5.a) do not provide information on single
> > versus double precision (not sure why. I also used ar t to try to get
> > that information):
> >
> > [birch:local/hdf5-1.8.12/lib] laura% file libhdf5.8.dylib
> > libhdf5.8.dylib: Mach-O 64-bit dynamically linked shared library x86_64
> >
> > [birch:local/hdf5-1.8.12/lib] laura% file libhdf5_hl.dylib
> > libhdf5_hl.dylib: Mach-O 64-bit dynamically linked shared library x86_64
> >
> > [birch:local/hdf5-1.8.12/lib] laura% file libhdf5.a
> > libhdf5.a: current ar archive random library
> >
> > so it seems to me that I correctly compiled the hdf5 libraries as
> > 64-bit libraries. I will work on your other suggestions next.
> >
> > Thanks,
> > Laura
> >
> >
> >
> >
> >
> >
> > On 3/17/14 2:17 PM, Unidata netCDF Support wrote:
> >> Hi Laura,
> >>
> >> Thank you for sending your config.log!  I've taken a look, and the
> >> relevant error appears to be this:
> >>
> >>       configure:4330: checking whether the C compiler works
> >>       configure:4352: gcc /birch/laura/local/hdf5-1.8.12/include
> >> /birch/laura/local/hdf5-1.8.12/lib conftest.c  >&5
> >>       ld: in /birch/laura/local/hdf5-1.8.12/include, can't map file,
> >> errno=22 for architecture x86_64
> >>       collect2: ld returned 1 exit status
> >>
> >> So, your compiler is attempting to build a 64-bit netcdf library, and is
> >> failing to link against the hdf5 library. From the terminal, can you cd
> >> to /birch/laura/local/hdf5-1.8.12/lib and run 'file  [hdf5 library
> >> name]' ? The 'file' command should tell us about the hdf5 library it
> >> found and what architecture it was compiled for.  I would *expect* it to
> >> be compiled as a 64-bit library, but this error indicates otherwise.
> >>
> >> Although having typed that, I wonder if we need to tweak your CPPFLAGS
> >> and LDFLAGS environmental variables.  For example, under a bash shell, I
> >> would expect them to be defined as follows:
> >>
> >> CPPFLAGS="-I/birch/laura/local/hdf5-1.8.12/include"
> >> LDFLAGS="-L/birch/laura/local/hdf5-1.8.12/lib"
> >>
> >> You have omitted the '-I' and '-L', which also may be causing a
> >> problem.  What happens if you add them and run configure again?
> >>
> >> -Ward
> >>
> >> On 3/17/14, 2:08 PM, Laura Fowler wrote:
> >>> New Client Reply: cannot configure
> >>>
> >>> Hi Ward:
> >>> Thanks for your help with this. Yep, I cannot build the netcdf-c
> >>> library
> >>> either using the following setting:
> >>>
> >>> setenv CC 'gcc -m64'     (I used -m64 to build the hdf5 libraries
> >>> first)
> >>> setenv FC pgf90
> >>> setenv CPPFLAGS /birch/laura/local/hdf5-1.8.12/include (location of the
> >>> hdf5 include directory)
> >>> setenv LDFLAGS /birch/laura/local/hdf5-1.8.12/lib (location of the hdf5
> >>> lib directory)
> >>>
> >>> and using the following configure
> >>>
> >>> ./configure --prefix=/birch/laura/local/netcdf-c-4.3.1.1
> >>> --enable-netcdf4 --disable-dap
> >>>
> >>> [birch:local/src/netcdf-c-4.3.1.1] laura% ./configure
> >>> --prefix=/birch/laura/local/netcdf-c-4.3.1.1 --enable-netcdf4
> >>> --disable-dap
> >>> configure: netCDF 4.3.1.1
> >>> checking build system type... x86_64-apple-darwin11.4.2
> >>> checking host system type... x86_64-apple-darwin11.4.2
> >>> checking target system type... x86_64-apple-darwin11.4.2
> >>> checking for a BSD-compatible install... /usr/bin/install -c
> >>> checking whether build environment is sane... yes
> >>> checking for a thread-safe mkdir -p... ./install-sh -c -d
> >>> checking for gawk... no
> >>> checking for mawk... no
> >>> checking for nawk... no
> >>> checking for awk... awk
> >>> checking whether make sets $(MAKE)... yes
> >>> checking whether make supports nested variables... yes
> >>> checking whether to enable maintainer-specific portions of
> >>> Makefiles... no
> >>> configure: checking user options
> >>> checking whether a win32 DLL is desired... no
> >>> checking whether a NCIO_MINBLOCKSIZE was specified... 256
> >>> checking if fsync support is enabled... no
> >>> checking whether extra valgrind tests should be run... no
> >>> checking whether we should try to build netCDF-4... yes
> >>> checking do we require hdf5 dynamic-loading support... xno
> >>> checking whether reading of HDF4 SD files is to be enabled... no
> >>> checking whether to fetch some sample HDF4 files from Unidata ftp site
> >>> to test HDF4 reading (requires wget)... no
> >>> checking whether parallel I/O for classic and 64-bit offset files using
> >>> parallel-netcdf is to be enabled... no
> >>> checking whether extra example tests should be run... no
> >>> checking whether parallel IO tests should be run... no
> >>> checking whether a default chunk size in bytes was specified... 4194304
> >>> checking whether a maximum per-variable cache size for HDF5 was
> >>> specified... 67108864
> >>> checking whether a number of chunks for the default per-variable cache
> >>> was specified... 10
> >>> checking whether a default file cache size for HDF5 was specified...
> >>> 4194304
> >>> checking whether a default file cache maximum number of elements for
> >>> HDF5 was specified... 1009
> >>> checking whether a default cache preemption for HDF5 was
> >>> specified... 0.75
> >>> checking whether netCDF-4 logging is enabled... no
> >>> checking whether cdmremote client is to be built... no
> >>> checking whether DAP client is to be built... no
> >>> checking for style of include used by make... GNU
> >>> checking for gcc... gcc -m64
> >>> checking whether the C compiler works... no
> >>> configure: error: in `/birch/laura/local/src/netcdf-c-4.3.1.1':
> >>> configure: error: C compiler cannot create executables
> >>>
> >>> I am also attaching the log file.
> >>>
> >>> Thanks,
> >>> Laura
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On 3/17/14 1:34 PM, Unidata netCDF Support wrote:
> >>>> Hi Laura,
> >>>>
> >>>> The netcdf-fortran libraries rely on the netcdf-c libraries.
> >>>> netcdf.h is
> >>>> part of the netcdf-c libraries.  You can download our latest release,
> >>>> 4.3.1.1 here:
> >>>>
> >>>> http://github.com/Unidata/netcdf-c/releases
> >>>>
> >>>> With instructions for building it found here:
> >>>>
> >>>> http://www.unidata.ucar.edu/software/netcdf/docs/building.html
> >>>>
> >>>> If you have any questions about installing netcdf-c, please let us
> >>>> know.  Once installed, you should be able to build the fortran
> >>>> libraries
> >>>> without any problem.
> >>>>
> >>>> Have a great day,
> >>>>
> >>>> -Ward
> >>>>
> >>>> On 3/17/14, 1:29 PM, address@hidden wrote:
> >>>>> New Ticket: cannot configure
> >>>>>
> >>>>> Full Name: Laura D Fowler
> >>>>> Email Address: address@hidden
> >>>>> Organization: NCAR/NESL/MMM
> >>>>> Package Version: netcdf-fortran-4.2
> >>>>> Operating System: OSX 10.7.5
> >>>>> Hardware:
> >>>>> Description of problem: Hello:
> >>>>>
> >>>>> I would like to compile netcdf-fortran-4.2 on my local machine,
> >>>>> but get the error message:
> >>>>>
> >>>>> checking for netcdf.h... no
> >>>>> configure: error: netcdf.h could not be found. Please set CPPFLAGS.
> >>>>>
> >>>>> after simply doing the following
> >>>>> setenv CC gcc
> >>>>> setenv FC pgf90
> >>>>>
> >>>>> I cannot see the file netcdf.h anywhere in the sourcecode so I am
> >>>>> not sure how to set CPPFLAGS. I read that setting that option
> >>>>> would help, but it did not and I do not know what to do next. Any
> >>>>> other option that I need to add.
> >>>>>
> >>>>> Thanks,
> >>>>> Laura
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Ticket Details
> >>>>> ===================
> >>>>> Ticket ID: ZVE-924213
> >>>>> Department: Support netCDF
> >>>>> Priority: Normal
> >>>>> Status: Open
> >>>>> Link:
> >>>>> https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=23627
> >>>> Ticket Details
> >>>> ===================
> >>>> Ticket ID: ZVE-924213
> >>>> Department: Support netCDF
> >>>> Priority: Normal
> >>>> Status: Open
> >>>>
> >>
> >>
> >> Ticket Details
> >> ===================
> >> Ticket ID: ZVE-924213
> >> Department: Support netCDF
> >> Priority: Normal
> >> Status: Open
> >>
> >
> >
> 
> 
> --
> !----------------------------------------------------
> Laura D. Fowler
> Mesoscale and Microscale Meteorology Division (MMM)
> National Center for Atmospheric Research
> P.O. Box 3000, Boulder CO 80307-3000
> 
> e-mail: address@hidden
> phone : 303-497-1628
> 
> !----------------------------------------------------
> 
> 
> 
Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: ZVE-924213
Department: Support netCDF
Priority: Normal
Status: Closed