# IOAPI 3.2 installtion error: undefined reference to \`curl\_easy\_strerror'

**URL:** <https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187>\
**Category:** I/O API\
**Tags:** admin, smoke\
**Created:** [March 24, 2021, 9:48pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187 "2021-03-24T21:48:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 24, 2021, 9:48pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/1 "2021-03-24T21:48:27Z")

</div>

Hello,

I am trying to install IOAPI3.2 using netcdf4.7.4 and pgi compiler. I have successfully installed ioapi which creates libioapi.a. Attached is Makeinclude file [Makeinclude.Linux2\_x86\_64pg.txt](https://forum.cmascenter.org/uploads/short-url/9nJsvtudF4h9jcMjHKekRImF2Fm.txt) (2.0 KB) where you can see i used

FOPTFLAGS = -O2 -V -Mnosecond\_underscore  
FPPFLAGS = -DF90=1  
FSFLAGS = -Msave  
ARCHFLAGS = -DFLDMN=1 -DAUTO\_ARRAYS=1 -DF90=1 -DNDEBUG -DIOAPI\_NCF4=1

But by using same settings when I tried install ‘m3tools’, I get the following error [Makefile.txt](https://forum.cmascenter.org/uploads/short-url/9m5PEzmwXN5vq7wp2BPeA22ol2M.txt) (13.0 KB) :

[IqbalHossan@adeq m3tools]$ make

/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4hdf.o): In function `reportobject': nc4hdf.c:(.text+0x4a9e): undefined reference to `H5Iget\_name’  
nc4hdf.c:(.text+0x4b4a): undefined reference to `H5Aget_name' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libnchdf5_la-nc4hdf.o): In function `reportopenobjectsT’:  
nc4hdf.c:(.text+0x4c06): undefined reference to `H5Fget_obj_count' nc4hdf.c:(.text+0x4c68): undefined reference to `H5Fget\_obj\_ids’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4hdf.o): In function `NC4_hdf5get_libversion': nc4hdf.c:(.text+0x4e79): undefined reference to `H5get\_libversion’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4hdf.o): In function `NC4_hdf5get_superblock': nc4hdf.c:(.text+0x4ef5): undefined reference to `H5Fget\_create\_plist’  
nc4hdf.c:(.text+0x4f25): undefined reference to `H5Pget_version' nc4hdf.c:(.text+0x4f54): undefined reference to `H5Pclose’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4hdf.o): In function `NC4_strict_att_exists': nc4hdf.c:(.text+0x5001): undefined reference to `H5Aexists’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4hdf.o): In function `NC4_walk': nc4hdf.c:(.text+0x5050): undefined reference to `H5Gget\_num\_objs’  
nc4hdf.c:(.text+0x508c): undefined reference to `H5Gget_objname_by_idx' nc4hdf.c:(.text+0x50b6): undefined reference to `H5Gget\_objtype\_by\_idx’  
nc4hdf.c:(.text+0x50e1): undefined reference to `H5Gopen1' nc4hdf.c:(.text+0x5102): undefined reference to `H5Gclose’  
nc4hdf.c:(.text+0x514d): undefined reference to `H5Dopen1' nc4hdf.c:(.text+0x515a): undefined reference to `H5Aget\_num\_attrs’  
nc4hdf.c:(.text+0x5175): undefined reference to `H5Aopen_idx' nc4hdf.c:(.text+0x5194): undefined reference to `H5Aget\_name’  
nc4hdf.c:(.text+0x51de): undefined reference to `H5Aclose' nc4hdf.c:(.text+0x51f8): undefined reference to `H5Dclose’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4hdf.o): In function `NC4_hdf5_remove_filter': nc4hdf.c:(.text+0x5255): undefined reference to `H5Dget\_create\_plist’  
nc4hdf.c:(.text+0x527c): undefined reference to `H5Premove_filter' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libnchdf5_la-nc4info.o): In function `NC4\_read\_ncproperties’:  
nc4info.c:(.text+0x4d3): undefined reference to `H5Aexists' nc4info.c:(.text+0x4ed): undefined reference to `H5Aopen\_name’  
nc4info.c:(.text+0x51f): undefined reference to `H5Aget_space' nc4info.c:(.text+0x52c): undefined reference to `H5Aget\_type’  
nc4info.c:(.text+0x539): undefined reference to `H5Tget_class' nc4info.c:(.text+0x558): undefined reference to `H5Tget\_size’  
nc4info.c:(.text+0x5a2): undefined reference to `H5Tget_native_type' nc4info.c:(.text+0x5c7): undefined reference to `H5Aread’  
nc4info.c:(.text+0x61f): undefined reference to `H5Aclose' nc4info.c:(.text+0x63a): undefined reference to `H5Sclose’  
nc4info.c:(.text+0x655): undefined reference to `H5Tclose' nc4info.c:(.text+0x670): undefined reference to `H5Tclose’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4info.o): In function `NC4_write_ncproperties': nc4info.c:(.text+0x715): undefined reference to `H5Aexists’  
nc4info.c:(.text+0x733): undefined reference to `H5open' nc4info.c:(.text+0x73a): undefined reference to `H5T\_C\_S1\_g’  
nc4info.c:(.text+0x743): undefined reference to `H5Tcopy' nc4info.c:(.text+0x767): undefined reference to `H5Tset\_strpad’  
nc4info.c:(.text+0x786): undefined reference to `H5Tset_cset' nc4info.c:(.text+0x7ba): undefined reference to `H5Tset\_size’  
nc4info.c:(.text+0x7d1): undefined reference to `H5Screate' nc4info.c:(.text+0x800): undefined reference to `H5Acreate1’  
nc4info.c:(.text+0x828): undefined reference to `H5Awrite' nc4info.c:(.text+0x844): undefined reference to `H5Aclose’  
nc4info.c:(.text+0x85f): undefined reference to `H5Sclose' nc4info.c:(.text+0x87a): undefined reference to `H5Tclose’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-nc4memcb.o): In function `NC4_image_init': nc4memcb.c:(.text+0x834): undefined reference to `H5open’  
nc4memcb.c:(.text+0x83b): undefined reference to `H5P_CLS_FILE_ACCESS_ID_g' nc4memcb.c:(.text+0x844): undefined reference to `H5Pcreate’  
nc4memcb.c:(.text+0x943): undefined reference to `H5Pset_fapl_core' nc4memcb.c:(.text+0xa37): undefined reference to `H5Pset\_file\_image\_callbacks’  
nc4memcb.c:(.text+0xa5c): undefined reference to `H5Pset_file_image' nc4memcb.c:(.text+0xaae): undefined reference to `H5check\_version’  
nc4memcb.c:(.text+0xad5): undefined reference to `H5check_version' nc4memcb.c:(.text+0xaf2): undefined reference to `H5check\_version’  
nc4memcb.c:(.text+0xb18): undefined reference to `H5Fcreate' nc4memcb.c:(.text+0xb3a): undefined reference to `H5Fopen’  
nc4memcb.c:(.text+0xb76): undefined reference to `H5Eauto_is_v2' nc4memcb.c:(.text+0xb9b): undefined reference to `H5Eget\_auto2’  
nc4memcb.c:(.text+0xbaf): undefined reference to `H5Eset_auto2' nc4memcb.c:(.text+0xbca): undefined reference to `H5Eget\_auto1’  
nc4memcb.c:(.text+0xbd9): undefined reference to `H5Eset_auto1' nc4memcb.c:(.text+0xbe9): undefined reference to `H5Pclose’  
nc4memcb.c:(.text+0xc0e): undefined reference to `H5Eset_auto2' nc4memcb.c:(.text+0xc29): undefined reference to `H5Eset\_auto1’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-occurlfunctions.o): In function `ocset_curlopt': occurlfunctions.c:(.text+0x6e): undefined reference to `curl\_easy\_setopt’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-occurlfunctions.o): In function `oc_curl_protocols': occurlfunctions.c:(.text+0xa54): undefined reference to `curl\_version\_info’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ocdebug.o): In function `ocreportcurlerror': ocdebug.c:(.text+0x1e3): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ochttp.o): In function `ocfetchhttpcode': ochttp.c:(.text+0x31): undefined reference to `curl\_easy\_getinfo’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ochttp.o): In function `ocfetchurl_file': ochttp.c:(.text+0x8c): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0xb7): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0xdf): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x108): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x12f): undefined reference to `curl\_easy\_perform’  
ochttp.c:(.text+0x176): undefined reference to `curl_easy_getinfo' ochttp.c:(.text+0x190): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ochttp.o): In function `ocfetchurl': ochttp.c:(.text+0x1f8): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x223): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x24b): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x274): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x283): undefined reference to `curl\_easy\_perform’  
ochttp.c:(.text+0x296): undefined reference to `curl_easy_strerror' ochttp.c:(.text+0x2ef): undefined reference to `curl\_easy\_getinfo’  
ochttp.c:(.text+0x34a): undefined reference to `curl_easy_strerror' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(liboc_la-ochttp.o): In function `occurlopen’:  
ochttp.c:(.text+0x549): undefined reference to `curl_easy_init' ochttp.c:(.text+0x578): undefined reference to `curl\_easy\_setopt’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ochttp.o): In function `occurlclose': ochttp.c:(.text+0x5be): undefined reference to `curl\_easy\_cleanup’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ochttp.o): In function `ocfetchlastmodified': ochttp.c:(.text+0x5fc): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x625): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x643): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x661): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x67f): undefined reference to `curl\_easy\_setopt’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(liboc\_la-ochttp.o):ochttp.c:(.text+0x69d): more undefined references to `curl_easy_setopt' follow /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(liboc_la-ochttp.o): In function `ocfetchlastmodified’:  
ochttp.c:(.text+0x6ca): undefined reference to `curl_easy_perform' ochttp.c:(.text+0x6f6): undefined reference to `curl\_easy\_getinfo’  
ochttp.c:(.text+0x710): undefined reference to `curl_easy_strerror' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(liboc_la-ochttp.o): In function `ocping’:  
ochttp.c:(.text+0x792): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x7bb): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x7e4): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x80d): undefined reference to `curl\_easy\_setopt’  
ochttp.c:(.text+0x836): undefined reference to `curl_easy_setopt' ochttp.c:(.text+0x88e): undefined reference to `curl\_easy\_getinfo’  
ochttp.c:(.text+0x8da): undefined reference to `curl_easy_strerror' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libdispatch_la-ddispatch.o): In function `NCDISPATCH\_initialize’:  
ddispatch.c:(.text+0x346): undefined reference to `curl_global_init' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libdispatch_la-ddispatch.o): In function `NCDISPATCH\_finalize’:  
ddispatch.c:(.text+0x374): undefined reference to `curl_global_cleanup' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libnchdf5_la-hdf5attr.o): In function `NC4\_HDF5\_rename\_att’:  
hdf5attr.c:(.text+0x5d2): undefined reference to `H5Adelete' hdf5attr.c:(.text+0x624): undefined reference to `H5Adelete’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-hdf5attr.o): In function `NC4_HDF5_del_att': hdf5attr.c:(.text+0x89e): undefined reference to `H5Adelete’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libnchdf5\_la-hdf5create.o): In function `nc4_create_file': hdf5create.c:(.text+0x21c): undefined reference to `H5check\_version’  
hdf5create.c:(.text+0x243): undefined reference to `H5check_version' hdf5create.c:(.text+0x260): undefined reference to `H5check\_version’  
hdf5create.c:(.text+0x2c8): undefined reference to `H5open' hdf5create.c:(.text+0x2cf): undefined reference to `H5P\_CLS\_FILE\_ACCESS\_ID\_g’  
hdf5create.c:(.text+0x2d8): undefined reference to `H5Pcreate' hdf5create.c:(.text+0x2fc): undefined reference to `H5Pset\_fclose\_degree’  
hdf5create.c:(.text+0x340): undefined reference to `H5Pset_cache' hdf5create.c:(.text+0x364): undefined reference to `H5Pset\_libver\_bounds’  
hdf5create.c:(.text+0x379): undefined reference to `H5open' hdf5create.c:(.text+0x380): undefined reference to `H5P\_CLS\_FILE\_CREATE\_ID\_g’  
hdf5create.c:(.text+0x389): undefined reference to `H5Pcreate' hdf5create.c:(.text+0x3ad): undefined reference to `H5Pset\_obj\_track\_times’  
hdf5create.c:(.text+0x3cc): undefined reference to `H5Pset_link_creation_order' hdf5create.c:(.text+0x3eb): undefined reference to `H5Pset\_attr\_creation\_order’  
hdf5create.c:(.text+0x546): undefined reference to `H5Pset_fapl_core' hdf5create.c:(.text+0x56b): undefined reference to `H5Fcreate’  
hdf5create.c:(.text+0x59e): undefined reference to `H5Fcreate' hdf5create.c:(.text+0x5d3): undefined reference to `H5Gopen2’  
hdf5create.c:(.text+0x5f6): undefined reference to `H5Pclose' hdf5create.c:(.text+0x604): undefined reference to `H5Pclose’  
hdf5create.c:(.text+0x650): undefined reference to `H5Pclose' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libdap4_la-d4http.o): In function `NCD4\_fetchhttpcode’:  
d4http.c:(.text+0xc8): undefined reference to `curl_easy_getinfo' d4http.c:(.text+0xe3): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_fetchurl_file': d4http.c:(.text+0x14d): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x17f): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x1ae): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x1de): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x208): undefined reference to `curl\_easy\_perform’  
d4http.c:(.text+0x25a): undefined reference to `curl_easy_getinfo' d4http.c:(.text+0x281): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_fetchurl': d4http.c:(.text+0x2fe): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x32d): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x35d): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x384): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x3a8): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x3c2): undefined reference to `curl_easy_perform' d4http.c:(.text+0x3d5): undefined reference to `curl\_easy\_strerror’  
d4http.c:(.text+0x435): undefined reference to `curl_easy_getinfo' d4http.c:(.text+0x496): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_curlopen': d4http.c:(.text+0x693): undefined reference to `curl\_easy\_init’  
d4http.c:(.text+0x6c9): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x6fb): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_curlclose': d4http.c:(.text+0x745): undefined reference to `curl\_easy\_cleanup’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_fetchlastmodified': d4http.c:(.text+0x78a): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x7ba): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x7df): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x804): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x829): undefined reference to `curl\_easy\_setopt’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4http.o):d4http.c:(.text+0x84e): more undefined references to `curl_easy_setopt' follow /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libdap4_la-d4http.o): In function `NCD4\_fetchlastmodified’:  
d4http.c:(.text+0x882): undefined reference to `curl_easy_perform' d4http.c:(.text+0x8b5): undefined reference to `curl\_easy\_getinfo’  
d4http.c:(.text+0x8d5): undefined reference to `curl_easy_strerror' /home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2_x86_64pg/libnetcdf.a(libdap4_la-d4http.o): In function `NCD4\_ping’:  
d4http.c:(.text+0x969): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x999): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x9c9): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x9f9): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0xa58): undefined reference to `curl_easy_getinfo' d4http.c:(.text+0xaa4): undefined reference to `curl\_easy\_strerror’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4curlfunctions.o): In function `set_curlopt': d4curlfunctions.c:(.text+0x104): undefined reference to `curl\_easy\_setopt’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4curlfunctions.o): In function `NCD4_curl_protocols': d4curlfunctions.c:(.text+0xa6e): undefined reference to `curl\_version\_info’  
/home/IqbalHossan/Documents/SMOKE/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdf.a(libdap4\_la-d4curlfunctions.o): In function `NCD4_reportcurlerror': d4curlfunctions.c:(.text+0xcde): undefined reference to `curl\_easy\_strerror’  
make: \*\*\* [airs2m3] Error 2

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [March 25, 2021, 11:42am UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/2 "2021-03-25T11:42:06Z")

</div>

Where did you get your netCDF libraries? And why did you not follow the I/O API Build Instructions? [https://cjcoats.github.io/ioapi/AVAIL.html#build](https://cjcoats.github.io/ioapi/AVAIL.html#build)

> Acquire and build the netCDF library, libnetcdf.a (and libnetcdff.a for netCDF-4.1 or later), for each configuration. …See NOTES on netCDF-4 for configuring netCDF-4.

and [https://cjcoats.github.io/ioapi/AVAIL.html#ncf4](https://cjcoats.github.io/ioapi/AVAIL.html#ncf4)

> NetCDF Version 4.x have lots of additional build options, that will require a complex set of additional libraries in your Makefiles and all other model-building systems. It is recommended that you disable these options by adding the command-line flags below to your netCDF configure command:
> 
> –disable-netcdf4 --disable-dap
> 
> …If you don’t build netCDF as indicated above, you will need additional libraries that may be discovered by running the netCDF commands
> 
> nc-config --libs  
> nf-config --libs

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 25, 2021, 1:46pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/3 "2021-03-25T13:46:10Z")

</div>

Hello @cjcoats,

Thank you for your response. since I did not add  
–disable-netcdf4 --disable-dap in my NetCDF building, I added [[[according to [Availability/Download of the BAMS/Models-3 I/O&nbsp;API](https://cjcoats.github.io/ioapi/AVAIL.html#ncf4) **If you build netCDF-4 without the `--disable-netcdf4` , you will also need to add `-DIOAPI_NCF4=1` either to the `ARCHFLAGS` in your Makeinclude.${BIN} or to the `DEFINEFLAGS` in your Makefile** ]]]

-DIOAPI\_NCF4=1 to the ARCHFLAGS in the Makeinclude.Linux2\_x86\_64pg file.

I am not sure If I understand the above mention line regarding DIOAPI\_NCF4=1 option.

I greatly appreciate your help. Thanks in advance

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [March 25, 2021, 2:20pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/4 "2021-03-25T14:20:23Z")

</div>

netCDF4-with-HDF has `INTEGER*8` operations; without HDF, it does not. `-DIOAPI_NCF4=1` handles that situation – the I/O API needs to be able to work (i.e., compile and link) both with and without the `INTEGER*8` ops…

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 25, 2021, 3:01pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/5 "2021-03-25T15:01:56Z")

</div>

Okay, One more question:

From the link: [Availability/Download of the BAMS/Models-3 I/O&nbsp;API](https://cjcoats.github.io/ioapi/AVAIL.html#ncf4)  
It says " If you don’t build netCDF as indicated above, you will need additional libraries that may be discovered by running the netCDF commands

```
nc-config --libs
nf-config --libs 

```

"

My nc-config --libs and nf-config --libs are below:

**[IqbalHossan@adeq soft]$ nc-config --libs**  
**-L/usr/local/netcdf-4.7.4/lib -lnetcdf**

**[IqbalHossan@adeq soft]$ nf-config --libs**  
**unknown option: --libs**  
**Usage: nf-config [OPTION]**

Available values for OPTION include:

–help display this help message and exit  
–all display all options  
–cc C compiler  
–fc Fortran compiler  
–cflags pre-processor and compiler flags  
–fflags flags needed to compile a Fortran program  
–has-dap whether OPeNDAP is enabled in this build  
–has-nc2 whether NetCDF-2 API is enabled  
–has-nc4 whether NetCDF-4/HDF-5 is enabled in this build  
–has-f90 whether Fortran 90 API is enabled in this build  
–has-f03 whether Fortran 2003 API is enabled in this build  
–flibs libraries needed to link a Fortran program  
–prefix Install prefix  
–includedir Include directory  
–version Library version

For the nf-config --libs, it is giving me ‘unknown option’ error. What does that mean?

Thank you

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 25, 2021, 3:08pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/6 "2021-03-25T15:08:04Z")

</div>

So, as your suggestion I have tried to built netcdf4.7.4 with --disable-dap option

./configure --disable-netcdf4 --disable-dap --prefix=/home/IqbalHossan/Documents/soft/netcdf-4.7.4

After that, the built was successful but when I do  
nf-config --libs

It’s giving me same error as mentioned in previous comment

[IqbalHossan@adeq soft] nc-config --libs -L/home/IqbalHossan/Documents/soft/netcdf-4.7.4/lib -lnetcdf [IqbalHossan@adeq soft] nf-config --libs  
unknown option: --libs  
Usage: nf-config [OPTION]

Available values for OPTION include:

–help display this help message and exit  
–all display all options  
–cc C compiler  
–fc Fortran compiler  
–cflags pre-processor and compiler flags  
–fflags flags needed to compile a Fortran program  
–has-dap whether OPeNDAP is enabled in this build  
–has-nc2 whether NetCDF-2 API is enabled  
–has-nc4 whether NetCDF-4/HDF-5 is enabled in this build  
–has-f90 whether Fortran 90 API is enabled in this build  
–has-f03 whether Fortran 2003 API is enabled in this build  
–flibs libraries needed to link a Fortran program  
–prefix Install prefix  
–includedir Include directory  
–version Library version

Here is the list file generated for netcdf4.7.4

[IqbalHossan@adeq soft] cd netcdf-4.7.4/ [IqbalHossan@adeq netcdf-4.7.4] ls  
bin include lib share  
[IqbalHossan@adeq netcdf-4.7.4] cd lib/ [IqbalHossan@adeq lib] ls  
libnetcdf.a libnetcdff.so libnetcdf.settings pkgconfig  
libnetcdff.a libnetcdff.so.7 libnetcdf.so  
libnetcdff.la libnetcdff.so.7.0.0 libnetcdf.so.18  
libnetcdff.settings libnetcdf.la libnetcdf.so.18.0.0

Then I tried to build IOAPI 3.2 , I was able to compile ioapi but when I try to compile m3tools, I get this error:

cd /home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg; pgf90 airs2m3.o -L/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg -lioapi -lnetcdff -lnetcdf -o airs2m3  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_var1io.o): In function `nf_get_var1_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_var1io.F90:784: multiple definition of `nf\_get\_var1\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19686: first defined here  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_var1io.o): In function `nf_put_var1_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_var1io.F90:354: multiple definition of `nf\_put\_var1\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19677: first defined here  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_varaio.o): In function `nf_get_vara_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_varaio.F90:955: multiple definition of `nf\_get\_vara\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19704: first defined here  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_varaio.o): In function `nf_put_vara_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_varaio.F90:440: multiple definition of `nf\_put\_vara\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19695: first defined here  
make: \*\*\* [airs2m3] Error 2

Please help

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [March 25, 2021, 4:30pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/7 "2021-03-25T16:30:03Z")

</div>

OK, it looks like they’ve changed the `--libs` to -`-flibs`. Don’t you love software-compatibility? ;-(

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 25, 2021, 4:40pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/8 "2021-03-25T16:40:20Z")

</div>

Okay,  
Here is the output ![Screenshot from 2021-03-25 11-37-05](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/b/ba6094990af94132618f5ab196da7437fc904b19.png)

But when I tried to use this libnetcdf.a libnetcdff.a in the IOAPI3.2 for m3tools compilation, (makefile for the m3tools [Makefile.txt](https://forum.cmascenter.org/uploads/short-url/7Snzysy5xT7wLCGH9vSAeRKum6x.txt) (13.0 KB)  
I get the following errors:  
cd /home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg; pgf90 airs2m3.o -L/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg -lioapi -lnetcdff -lnetcdf -o airs2m3  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_var1io.o): In function `nf_get_var1_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_var1io.F90:784: multiple definition of `nf\_get\_var1\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19686: first defined here  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_var1io.o): In function `nf_put_var1_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_var1io.F90:354: multiple definition of `nf\_put\_var1\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19677: first defined here  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_varaio.o): In function `nf_get_vara_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_varaio.F90:955: multiple definition of `nf\_get\_vara\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19704: first defined here  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libnetcdff.a(nf\_varaio.o): In function `nf_put_vara_int64_': /home/IqbalHossan/Documents/software/netcdf-fortran-4.5.3/fortran/nf_varaio.F90:440: multiple definition of `nf\_put\_vara\_int64\_’  
/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/Linux2\_x86\_64pg/libioapi.a(modncfio.o):/home/IqbalHossan/Documents/soft/ioapi-3.2-20200828/ioapi/modncfio.F90:19695: first defined here  
make: \*\*\* [airs2m3] Error 2

Would you please help me with that?  
Thanks

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [March 25, 2021, 5:04pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/9 "2021-03-25T17:04:01Z")

</div>

Your _libnetcdff.a_ seems to have `nf_put_vara_int64_`, so you do not need the “dummy” placeholder-definition of that routine in `MODULE MODNCFIO`.

Add `-DIOAPI_NCF4=1` to the compile flags, then _make clean; make_ for the I/O API so that the dummy placeholder will not be enabled…

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 25, 2021, 8:15pm UTC](https://forum.cmascenter.org/t/ioapi-3-2-installtion-error-undefined-reference-to-curl-easy-strerror/2187/10 "2021-03-25T20:15:35Z")

</div>

Thank you so much @cjcoats , it works
