Compiler error in Upwelling test case

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
lmcmanus47
Posts: 2
Joined: Wed Jul 10, 2013 3:00 pm
Location: Princeton University

Compiler error in Upwelling test case

#1 Unread post by lmcmanus47 »

Hi all,

I'm a new user and have been receiving the following error when I attempt to compile the Upwelling test case:

Undefined symbols for architecture x86_64:
"_curl_easy_cleanup", referenced from:
_occurlclose in libnetcdf.a(liboc_la-http.o)
"_curl_easy_getinfo", referenced from:
_ocfetchhttpcode in libnetcdf.a(liboc_la-http.o)
_ocfetchlastmodified in libnetcdf.a(liboc_la-http.o)
_ocfetchurl_file in libnetcdf.a(liboc_la-http.o)
_ocfetchurl in libnetcdf.a(liboc_la-http.o)
"_curl_easy_init", referenced from:
_occurlopen in libnetcdf.a(liboc_la-http.o)
"_curl_easy_perform", referenced from:
_ocfetchlastmodified in libnetcdf.a(liboc_la-http.o)
_ocfetchurl_file in libnetcdf.a(liboc_la-http.o)
_ocfetchurl in libnetcdf.a(liboc_la-http.o)
"_curl_easy_setopt", referenced from:
_ocfetchlastmodified in libnetcdf.a(liboc_la-http.o)
_ocfetchurl_file in libnetcdf.a(liboc_la-http.o)
_occurlopen in libnetcdf.a(liboc_la-http.o)
_ocfetchurl in libnetcdf.a(liboc_la-http.o)
_set_compression in libnetcdf.a(liboc_la-curlfunctions.o)
_set_verify in libnetcdf.a(liboc_la-curlfunctions.o)
_set_cookies in libnetcdf.a(liboc_la-curlfunctions.o)
...
"_curl_easy_strerror", referenced from:
_ocsetcurlproperties in libnetcdf.a(liboc_la-http.o)
_ocfetchlastmodified in libnetcdf.a(liboc_la-http.o)
_ocfetchurl_file in libnetcdf.a(liboc_la-http.o)
_ocfetchurl in libnetcdf.a(liboc_la-http.o)
"_curl_version_info", referenced from:
_ocinitialize in libnetcdf.a(liboc_la-ocinternal.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [/Users/Lisa/ROMS/Projects/Upwelling/oceanG] Error 1

I've looked through the forum before posting but I apologize if this has been answered before.
I'm using Mac OS 10.8.4 and gfortran (I was following this tutorial: https://www.myroms.org/wiki/index.php/R ... ow_Leopard)

Thank you!
-Lisa

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Compiler error in Upwelling test case

#2 Unread post by kate »

Can you show us the full link command? Are you using USE_NETCDF4? For me, I use USE_NETCDF4, which invokes "nc-config --flibs". On one system this gives:

Code: Select all

delta.arsc.edu 360% nc-config --flibs
-L/usr/local/pkg/netcdf/netcdf-4.1.pgi/lib -lnetcdff -lnetcdf -L/usr/local/pkg/hdf5/hdf5-1.8.4.pgi/lib -lhdf5_hl -lhdf5 -lz -lm -L/usr/kerberos/lib64 -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz
and on another, it gives:

Code: Select all

pacman6 396% nc-config --flibs
-L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib -lnetcdff -L/usr/local/pkg/hdf5/hdf5-1.8.10-p1.gnu-4.7.3/lib -L/usr/local/pkg/szip/szip-2.1.gnu/lib -L/usr/local/pkg/udunits/udunits-2.1.24.gnu-4.7.3/lib -L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib -lnetcdf -lnetcdf
One of these links to a curl library, the other does not. What do you get from "nc-config --flibs"?

Did you compile the netcdf library and run its self-checks?

lmcmanus47
Posts: 2
Joined: Wed Jul 10, 2013 3:00 pm
Location: Princeton University

Re: Compiler error in Upwelling test case

#3 Unread post by lmcmanus47 »

Kate,

Thank you for pointing me in the right direction. I had some errors in the netcdf pathways, it's working now! :D

Lisa

rbani
Posts: 12
Joined: Thu Feb 27, 2014 1:14 am
Location: Mcgill University

Re: Compiler error in Upwelling test case

#4 Unread post by rbani »

kate wrote:Can you show us the full link command? Are you using USE_NETCDF4? For me, I use USE_NETCDF4, which invokes "nc-config --flibs". On one system this gives:

Code: Select all

delta.arsc.edu 360% nc-config --flibs
-L/usr/local/pkg/netcdf/netcdf-4.1.pgi/lib -lnetcdff -lnetcdf -L/usr/local/pkg/hdf5/hdf5-1.8.4.pgi/lib -lhdf5_hl -lhdf5 -lz -lm -L/usr/kerberos/lib64 -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz
and on another, it gives:

Code: Select all

pacman6 396% nc-config --flibs
-L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib -lnetcdff -L/usr/local/pkg/hdf5/hdf5-1.8.10-p1.gnu-4.7.3/lib -L/usr/local/pkg/szip/szip-2.1.gnu/lib -L/usr/local/pkg/udunits/udunits-2.1.24.gnu-4.7.3/lib -L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib -lnetcdf -lnetcdf
One of these links to a curl library, the other does not. What do you get from "nc-config --flibs"?

Did you compile the netcdf library and run its self-checks?

rbani
Posts: 12
Joined: Thu Feb 27, 2014 1:14 am
Location: Mcgill University

Re: Compiler error in Upwelling test case

#5 Unread post by rbani »

Helllo
i got the same error and when i type :
./nc-config --flibs
-L/opt/gfortransoft/serial/netcdf-4.1.1/lib -lnetcdf -lcurl

what should i do to fix it

thanks

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Compiler error in Upwelling test case

#6 Unread post by kate »

You're getting exactly the same errors with missing routines from the curl library? Is it really finding your curl library?

Did you install Netcdf and did it pass its self-checks?

rbani
Posts: 12
Joined: Thu Feb 27, 2014 1:14 am
Location: Mcgill University

Re: Compiler error in Upwelling test case

#7 Unread post by rbani »

hello

yes i did self check and it s working

rbani
Posts: 12
Joined: Thu Feb 27, 2014 1:14 am
Location: Mcgill University

Re: Compiler error in Upwelling test case

#8 Unread post by rbani »

and i m using netcdf 3 not 4

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Compiler error in Upwelling test case

#9 Unread post by kate »

When you ran the tests it must have linked to the curl library. Do you know where that library is? If so, you can view the symbols in it with the nm command. Do they match the symbols you are missing, including the same number of underscores?

xinpianyu72
Posts: 5
Joined: Thu Jan 08, 2015 11:16 pm
Location: Institute of Atmospheric Physics, Chinese Academy

Re: Compiler error in Upwelling test case

#10 Unread post by xinpianyu72 »

YES.in the build.bash, you should set the HDF AND NETCDF path righ when you open USE_NETCDF.

Post Reply