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

[netCDF #EPQ-640599]: make check failed



> New Staff Reply: make check failed
> 
> Greetings Ben,
> 
> Try adding a linking flag to your second gfortran command, like this:
> 
> gfortran -g -O2 -L/lib/lib -o simple_xy_wr simple_xy_wr.o

He'll also need -lnetcdf:

  gfortran -g -O2 -L/lib/lib -o simple_xy_wr simple_xy_wr.o -lnetcdf

and depending on which version he's compiling (if shared libraries were
not the default) he'll need more, such as

  gfortran -g -O2 -L/lib/lib -o simple_xy_wr simple_xy_wr.o -lnetcdff \
           -lnetcdf -lhdf5 -lz ...

whatever the "nc-config --flibs" shows.

--Russ

> Then,try running simple_xy_wr. If you get an error like this,
> 
> "cannot open shared object file: No such file or directory"
> 
> then do the following and run again:
> 
> export LD_LIBRARY_PATH=/lib/lib
> ./simple_xy_wr
> 
> Cheers!
> 
> Sean
> 
> > Hi Sean,
> > 
> > Thanks again for all your help. I'm still getting the same error message.
> > 
> > To give a precise description of what I'm doing, I started from square one
> > using these commands (and attached the new .out files to this email):
> > 
> > sudo make distclean
> > export CFLAGS="-arch x86_64"
> > export FFLAGS=-m64
> > sudo ./configure --prefix=/lib --disable-netcdf-4 --enable-shared
> > sudo make &> make.out
> > sudo make check &> make_check.out
> > gfortran -c -g -O2 -I/lib/include simple_xy_wr.f
> > gfortran -g -O2 -I/lib/include -o simple_xy_wr simple_xy_wr.o
> > Undefined symbols for architecture x86_64:
> > "_nf_strerror_", referenced from:
> > _handle_err_ in simple_xy_wr.o
> > "_nf_create_", referenced from:
> > _MAIN__ in simple_xy_wr.o
> > "_nf_def_dim_", referenced from:
> > _MAIN__ in simple_xy_wr.o
> > "_nf_def_var_", referenced from:
> > _MAIN__ in simple_xy_wr.o
> > "_nf_enddef_", referenced from:
> > _MAIN__ in simple_xy_wr.o
> > "_nf_put_var_int_", referenced from:
> > _MAIN__ in simple_xy_wr.o
> > "_nf_close_", referenced from:
> > _MAIN__ in simple_xy_wr.o
> > ld: symbol(s) not found for architecture x86_64
> > collect2: ld returned 1 exit status
> > 
> > Sorry again for all this trouble.
> > 
> > Ben
> > 
> > address@hidden> wrote:
> > 
> > > Hi Ben,
> > >
> > > It looks like you used the wrong compile variables:
> > >
> > > export CFLAG=-m64
> > > export FFLAG=-m64
> > >
> > > It should be CFLAGS and FFLAGS. For the CFLAGS, use -arch x86_64. Try
> > > rebuilding, but this time use this:
> > >
> > > export CFLAGS="-arch x86_64"
> > > export FFLAGS=-m64
> > >
> > > Let me know how that works.
> > >
> > > Sean
> > >
> > > > Hi Sean,
> > > >
> > > > Thanks again for your prompt response. I'm not sure if I'm using the
> > > > gfortran compiler correctly. When I downloaded one of the simple test
> > > codes
> > > > from the website and attempted to run it, I got this response (here I
> > > link
> > > > the directory that contains the libraries, just in case):
> > > >
> > > > gfortran -I /usr/bin/include -o simple_xy_wr.exe simple_xy_wr.f
> > > > Undefined symbols for architecture x86_64:
> > > > "_nf_create_", referenced from:
> > > > _MAIN__ in ccVJvzkh.o
> > > > "_nf_def_dim_", referenced from:
> > > > _MAIN__ in ccVJvzkh.o
> > > > "_nf_def_var_", referenced from:
> > > > _MAIN__ in ccVJvzkh.o
> > > > "_nf_enddef_", referenced from:
> > > > _MAIN__ in ccVJvzkh.o
> > > > "_nf_put_var_int_", referenced from:
> > > > _MAIN__ in ccVJvzkh.o
> > > > "_nf_close_", referenced from:
> > > > _MAIN__ in ccVJvzkh.o
> > > > "_nf_strerror_", referenced from:
> > > > _handle_err_ in ccVJvzkh.o
> > > > ld: symbol(s) not found for architecture x86_64
> > > > collect2: ld returned 1 exit statu
> > > >
> > > > Is this related to the same error?
> > > >
> > > > Hope you're well,
> > > >
> > > > Ben
> > > >
> > > > address@hidden> wrote:
> > > >
> > > > > Hi Ben,
> > > > >
> > > > > From the looks of you make_check.out file, everything compiled
> > > correctly
> > > > > and is good. Now I see what happened. So you did a make check install
> > > first,
> > > > > which will compile netCDF, check it for errors, and install it. When
> > > you ran
> > > > > make check the second time, the code behind make check could not find
> > > the
> > > > > compiled libraries under your source directories because they had
> > > already
> > > > > been moved out of there to some other location on your disk (make che
> ck
> > > > > specifically looks in some temporary folders for the compiled librari
> es
> > > -
> > > > > once you make install, those libraries are taken out of the temp
> > > folders,
> > > > > and so make check cannot find them).
> > > > >
> > > > > Things look good to me!
> > > > >
> > > > > Sean
> > > > >
> > > > > > Hi Sean,
> > > > > >
> > > > > > Thank you for your help with this. Here are the make.out and
> > > > > make_check.out
> > > > > > files.
> > > > > >
> > > > > > Hope you're well,
> > > > > >
> > > > > > Ben
> > > > > >
> > > > > > address@hidden> wrote:
> > > > > >
> > > > > > > Greetings Benjamin,
> > > > > > >
> > > > > > > Would you kindly send the full output from make and make check?
> > > First,
> > > > > do
> > > > > > >
> > > > > > > make clean
> > > > > > >
> > > > > > > Then, re-run the configure script as you did previously. Next, do
> > > > > > >
> > > > > > > make &> make.out
> > > > > > >
> > > > > > > and after that, do
> > > > > > >
> > > > > > > make check &> make_check.out
> > > > > > >
> > > > > > > Then, would you mind sending the make.out and make_check.out file
> s?
> > > > > They
> > > > > > > will be of much help. I looks like the apple gcc-4 is having issu
> es
> > > > > finding
> > > > > > > the standard c libraries and header files, but the make and make
> > > check
> > > > > logs
> > > > > > > will tell us for sure.
> > > > > > >
> > > > > > > Thanks so much!
> > > > > > >
> > > > > > > Sean
> > > > > > >
> > > > > > > > Full Name: Benjamin Johnson
> > > > > > > > Email Address: address@hidden
> > > > > > > > Organization: University of Maryland-College Park
> > > > > > > > Package Version: netcdf 4.1.3
> > > > > > > > Operating System: Mac OS X Lion
> > > > > > > > Hardware: Intel processor
> > > > > > > > Description of problem: I am trying to configure netcdf to run 
> on
> > > Mac
> > > > > OS
> > > > > > > X Lion's x86_64 architecture (my config.log is attached). Before
> > > > > installing
> > > > > > > I set my environment variables:
> > > > > > > >
> > > > > > > > export CFLAG=-m64
> > > > > > > > export FFLAG=-m64
> > > > > > > >
> > > > > > > > Then ran:
> > > > > > > >
> > > > > > > > sudo ./configure --prefix=/lib --disable-netcdf-4 --enable-shar
> ed
> > > > > > > > sudo make check install
> > > > > > > > sudo make check
> > > > > > > >
> > > > > > > > Running the last command produced the following:
> > > > > > > >
> > > > > > > > make check
> > > > > > > > Making check in include
> > > > > > > > make[1]: Nothing to be done for `check'.
> > > > > > > > Making check in libdispatch
> > > > > > > > make[1]: Nothing to be done for `check'.
> > > > > > > > Making check in oc
> > > > > > > > make[1]: Nothing to be done for `check'.
> > > > > > > > Making check in libsrc
> > > > > > > > make[1]: Nothing to be done for `check'.
> > > > > > > > Making check in libdap2
> > > > > > > > make[1]: Nothing to be done for `check'.
> > > > > > > > Making check in liblib
> > > > > > > > make[1]: Nothing to be done for `check'.
> > > > > > > > Making check in nctest
> > > > > > > > make  nctest tst_rename
> > > > > > > > make[2]: `nctest' is up to date.
> > > > > > > > make[2]: `tst_rename' is up to date.
> > > > > > > > make  check-TESTS
> > > > > > > > Testing V2 API with 2 different netCDF formats.
> > > > > > > >
> > > > > > > >
> > > > > > > > Switching to netCDF classic format.
> > > > > > > > *** Testing nccreate ...        *** test_nccreate: nccreate
> > > failed to
> > > > > > > NC_CLOBBER
> > > > > > > > *** Testing ncopen ...          *** could not create temp file
> > > > > > > > *** Testing ncredef ...         *** test_ncredef: ncopen failed
> > > > > > > > *** Testing ncendef ...         *** test_ncendef: ncopen failed
> > > > > > > > *** Testing ncclose ...         *** test_ncclose: ncopen failed
> > > > > > > > *** Testing ncinquire ...       *** test_ncinquire: ncopen fail
> ed
> > > > > > > > *** Testing ncsync ...          *** test_ncsync: ncopen in
> > > NC_WRITE
> > > > > mode
> > > > > > > failed
> > > > > > > > *** Testing ncabort ...         *** test_ncabort: ncopen failed
> > > > > > > > *** Testing ncdimdef ...        *** test_ncdimdef: ncopen faile
> d
> > > > > > > > *** Testing ncdimid ...         *** test_ncdimid: ncopen failed
> > > > > > > > *** Testing ncdiminq ...        *** test_ncdiminq: ncopen faile
> d
> > > > > > > > *** Testing ncdimrename ...     *** test_ncdimrename: ncopen
> > > failed
> > > > > > > > *** Testing ncvardef ...        *** test_ncvardef: ncopen faile
> d
> > > > > > > > *** Testing ncvarid ...         *** test_ncvarid: ncopen failed
> > > > > > > > *** Testing ncvarinq ...        *** test_ncvarinq: ncopen faile
> d
> > > > > > > > *** Testing ncvarput1 ...       *** test_ncvarput1: ncopen fail
> ed
> > > > > > > > *** Testing ncvarget1 ...       *** test_ncvarget1: ncopen fail
> ed
> > > > > > > > *** Testing ncvarput ...        *** test_ncvarput: ncopen faile
> d
> > > > > > > > *** Testing ncvarget ...        *** test_ncvarget: ncopen faile
> d
> > > > > > > > *** Testing ncvarputg ...       *** test_ncvarputg: ncopen fail
> ed
> > > > > > > > *** Testing ncvargetg ...       *** test_ncvargetg: ncopen fail
> ed
> > > > > > > > *** Testing ncrecinq ...        *** test_ncrecinq: ncopen faile
> d
> > > > > > > > *** Testing ncrecput ...        *** test_ncrecput: ncopen faile
> d
> > > > > > > > *** Testing ncattput ...        *** test_ncattput: ncopen faile
> d
> > > > > > > > *** Testing ncattinq ...        *** test_ncattinq: ncopen faile
> d
> > > > > > > > *** Testing ncattget ...        *** test_ncattget: ncopen faile
> d
> > > > > > > > *** Testing ncattcopy ...       *** test_ncattcopy: ncopen fail
> ed
> > > > > > > > *** Testing ncattname ...       *** test_ncattname: ncopen fail
> ed
> > > > > > > > *** Testing ncattrename ...     *** test_ncattrename: ncopen
> > > failed
> > > > > > > > *** Testing ncattdel ...        *** test_ncattdel: ncopen faile
> d
> > > > > > > > *** Testing nctypelen ...       ok ***
> > > > > > > >
> > > > > > > >
> > > > > > > > Switching to 64-bit offset format.
> > > > > > > > *** Testing nccreate ...        *** test_nccreate: nccreate
> > > failed to
> > > > > > > NC_CLOBBER
> > > > > > > > *** Testing ncopen ...          *** could not create temp file
> > > > > > > > *** Testing ncredef ...         *** test_ncredef: ncopen failed
> > > > > > > > *** Testing ncendef ...         *** test_ncendef: ncopen failed
> > > > > > > > *** Testing ncclose ...         *** test_ncclose: ncopen failed
> > > > > > > > *** Testing ncinquire ...       *** test_ncinquire: ncopen fail
> ed
> > > > > > > > *** Testing ncsync ...          *** test_ncsync: ncopen in
> > > NC_WRITE
> > > > > mode
> > > > > > > failed
> > > > > > > > *** Testing ncabort ...         *** test_ncabort: ncopen failed
> > > > > > > > *** Testing ncdimdef ...        *** test_ncdimdef: ncopen faile
> d
> > > > > > > > *** Testing ncdimid ...         *** test_ncdimid: ncopen failed
> > > > > > > > *** Testing ncdiminq ...        *** test_ncdiminq: ncopen faile
> d
> > > > > > > > *** Testing ncdimrename ...     *** test_ncdimrename: ncopen
> > > failed
> > > > > > > > *** Testing ncvardef ...        *** test_ncvardef: ncopen faile
> d
> > > > > > > > *** Testing ncvarid ...         *** test_ncvarid: ncopen failed
> > > > > > > > *** Testing ncvarinq ...        *** test_ncvarinq: ncopen faile
> d
> > > > > > > > *** Testing ncvarput1 ...       *** test_ncvarput1: ncopen fail
> ed
> > > > > > > > *** Testing ncvarget1 ...       *** test_ncvarget1: ncopen fail
> ed
> > > > > > > > *** Testing ncvarput ...        *** test_ncvarput: ncopen faile
> d
> > > > > > > > *** Testing ncvarget ...        *** test_ncvarget: ncopen faile
> d
> > > > > > > > *** Testing ncvarputg ...       *** test_ncvarputg: ncopen fail
> ed
> > > > > > > > *** Testing ncvargetg ...       *** test_ncvargetg: ncopen fail
> ed
> > > > > > > > *** Testing ncrecinq ...        *** test_ncrecinq: ncopen faile
> d
> > > > > > > > *** Testing ncrecput ...        *** test_ncrecput: ncopen faile
> d
> > > > > > > > *** Testing ncrecget ...        *** test_ncrecget: ncopen faile
> d
> > > > > > > > *** Testing ncvarrename ...     *** test_ncvarrename: ncopen
> > > failed
> > > > > > > > *** Testing ncattput ...        *** test_ncattput: ncopen faile
> d
> > > > > > > > *** Testing ncattinq ...        *** test_ncattinq: ncopen faile
> d
> > > > > > > > *** Testing ncattget ...        *** test_ncattget: ncopen faile
> d
> > > > > > > > *** Testing ncattcopy ...       *** test_ncattcopy: ncopen fail
> ed
> > > > > > > > *** Testing ncattname ...       *** test_ncattname: ncopen fail
> ed
> > > > > > > > *** Testing ncattrename ...     *** test_ncattrename: ncopen
> > > failed
> > > > > > > > *** Testing ncattdel ...        *** test_ncattdel: ncopen faile
> d
> > > > > > > > *** Testing nctypelen ...       ok ***
> > > > > > > >
> > > > > > > > Total number of failures: 64
> > > > > > > > nctest FAILURE!!!
> > > > > > > > FAIL: nctest
> > > > > > > >
> > > > > > > > *** Testing v3/v4 API versions of some v2 tests.
> > > > > > > > *** testing simple dim rename...Sorry! Unexpected result,
> > > > > tst_rename.c,
> > > > > > > line: 219
> > > > > > > > FAIL: tst_rename
> > > > > > > > PASS: compare_test_files.sh
> > > > > > > > ================================================
> > > > > > > > 2 of 3 tests failed
> > > > > > > > Please report to address@hidden
> > > > > > > > ================================================
> > > > > > > > make[2]: *** [check-TESTS] Error 1
> > > > > > > > make[1]: *** [check-am] Error 2
> > > > > > > > make: *** [check-recursive] Error 1
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Ticket Details
> > > > > > > ===================
> > > > > > > Ticket ID: EPQ-640599
> > > > > > > Department: Support netCDF
> > > > > > > Priority: Normal
> > > > > > > Status: Open
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > Ticket Details
> > > > > ===================
> > > > > Ticket ID: EPQ-640599
> > > > > Department: Support netCDF
> > > > > Priority: Normal
> > > > > Status: Open
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: EPQ-640599
> > > Department: Support netCDF
> > > Priority: Normal
> > > Status: Open
> > >
> > >
> > 
> > 
> 
> 
> Ticket Details
> ===================
> Ticket ID: EPQ-640599
> Department: Support netCDF
> Priority: Normal
> Status: Open
> Link:  https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=vi
> ewticket&ticketid=18641



Ticket Details
===================
Ticket ID: EPQ-640599
Department: Support netCDF
Priority: Normal
Status: Open


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.