# A problem with making MCIP

**URL:** <https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620>\
**Category:** MCIP\
**Created:** [February 26, 2025, 8:00am UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620 "2025-02-26T08:00:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![liuchang](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@liuchang](https://forum.cmascenter.org/u/liuchang)\
**Post date:** [February 26, 2025, 8:00am UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/1 "2025-02-26T08:00:09Z")

</div>

When I use intel compiler to compile MCIP, I get the following error, I have looked up a lot of information and I can’t determine whether it is a problem with my netcdf or ioapi, please help me, how can I solve it. Here is my error message and my makefile  
MAKEFILE  
#…Intel Fortran  
FC = ifort  
NETCDF = /public/home/ecichm/liuc/tools/netcdf4.5  
IOAPI\_ROOT = /public/source/ioapi-3.2  
###FFLAGS = -g -O0 -check all -C -traceback -FR -I$(NETCDF)/include \

### -I$(IOAPI\_ROOT)/Linux2\_x86\_64ifort

FFLAGS = -FR -O3 -traceback -I$(NETCDF)/include -I$(IOAPI\_ROOT)/Linux2\_x86\_64ifort  
LIBS = -L$(IOAPI\_ROOT)/Linux2\_x86\_64ifort -lioapi   
-L$(NETCDF)/lib -lnetcdff -lnetcdf

DEFS =

ERROR:  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_fetchurl_file': d4http.c:(.text+0x73): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x91): undefined reference to `curl_easy_setopt' d4http.c:(.text+0xaa): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0xc4): undefined reference to `curl_easy_setopt' d4http.c:(.text+0xdf): undefined reference to `curl\_easy\_perform’  
d4http.c:(.text+0x10a): undefined reference to `curl_easy_getinfo' d4http.c:(.text+0x117): undefined reference to `curl\_easy\_strerror’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_fetchurl': d4http.c:(.text+0x186): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x1a4): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x1c4): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x1d8): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x1ea): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x1fa): undefined reference to `curl_easy_perform' d4http.c:(.text+0x221): undefined reference to `curl\_easy\_getinfo’  
d4http.c:(.text+0x245): undefined reference to `curl_easy_getinfo' d4http.c:(.text+0x255): undefined reference to `curl\_easy\_strerror’  
d4http.c:(.text+0x2cc): undefined reference to `curl_easy_strerror' d4http.c:(.text+0x2ef): undefined reference to `curl\_easy\_strerror’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_curlopen': d4http.c:(.text+0x3fe): undefined reference to `curl\_easy\_init’  
d4http.c:(.text+0x41e): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x433): undefined reference to `curl\_easy\_strerror’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_curlclose': d4http.c:(.text+0x4d6): undefined reference to `curl\_easy\_cleanup’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o): In function `NCD4_fetchlastmodified': d4http.c:(.text+0x4f5): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x513): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x527): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x53b): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x54f): undefined reference to `curl\_easy\_setopt’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o):d4http.c:(.text+0x563): more undefined references to `curl_easy_setopt' follow /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4http.o): In function `NCD4\_fetchlastmodified’:  
d4http.c:(.text+0x57f): undefined reference to `curl_easy_perform' d4http.c:(.text+0x59c): undefined reference to `curl\_easy\_getinfo’  
d4http.c:(.text+0x5a9): undefined reference to `curl_easy_strerror' /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4http.o): In function `NCD4\_ping’:  
d4http.c:(.text+0x5f6): undefined reference to `curl_easy_init' d4http.c:(.text+0x616): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x623): undefined reference to `curl_easy_strerror' d4http.c:(.text+0x6a5): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x6c3): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x6e1): undefined reference to `curl\_easy\_setopt’  
d4http.c:(.text+0x6ff): undefined reference to `curl_easy_setopt' d4http.c:(.text+0x725): undefined reference to `curl\_easy\_setopt’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4http.o):d4http.c:(.text+0x743): more undefined references to `curl_easy_setopt' follow /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4http.o): In function `NCD4\_ping’:  
d4http.c:(.text+0x795): undefined reference to `curl_easy_perform' d4http.c:(.text+0x7bc): undefined reference to `curl\_easy\_getinfo’  
d4http.c:(.text+0x7d1): undefined reference to `curl_easy_strerror' d4http.c:(.text+0x843): undefined reference to `curl\_easy\_getinfo’  
d4http.c:(.text+0x86f): undefined reference to `curl_easy_cleanup' d4http.c:(.text+0x88f): undefined reference to `curl\_easy\_strerror’  
d4http.c:(.text+0x8be): undefined reference to `curl_easy_strerror' d4http.c:(.text+0x8e1): undefined reference to `curl\_easy\_strerror’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libnetcdf4\_la-nc4attr.o): In function `NC4_rename_att': nc4attr.c:(.text+0x98c): undefined reference to `H5Adelete’  
nc4attr.c:(.text+0xa4d): undefined reference to `H5Adelete' /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libnetcdf4_la-nc4attr.o): In function `NC4\_del\_att’:  
nc4attr.c:(.text+0xc57): undefined reference to `H5Adelete' /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4curlfunctions.o): In function `NCD4\_set\_flags\_perlink’:  
d4curlfunctions.c:(.text+0x237): undefined reference to `curl_easy_setopt' /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4curlfunctions.o): In function `set\_curlflag’:  
d4curlfunctions.c:(.text+0x2e8): undefined reference to `curl_easy_setopt' d4curlfunctions.c:(.text+0x30b): undefined reference to `curl\_easy\_setopt’  
d4curlfunctions.c:(.text+0x33d): undefined reference to `curl_easy_setopt' d4curlfunctions.c:(.text+0x37b): undefined reference to `curl\_easy\_setopt’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdf.a(libdap4\_la-d4curlfunctions.o):d4curlfunctions.c:(.text+0x3c9): more undefined references to `curl_easy_setopt' follow /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4curlfunctions.o): In function `NCD4\_curl\_protocols’:  
d4curlfunctions.c:(.text+0x86a): undefined reference to `curl_version_info' /public/source/ioapi-3.2/Linux2_x86_64ifort/libnetcdf.a(libdap4_la-d4curlfunctions.o): In function `NCD4\_reportcurlerror’:  
d4curlfunctions.c:(.text+0x8ea): undefined reference to `curl_easy_strerror' make[1]: *** [mcip.exe] Error 1 make[1]: Leaving directory `/public/home/ecichm/liuc/tools/CMAQ-5.3/PREP/mcip/src’  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [February 26, 2025, 12:40pm UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/2 "2025-02-26T12:40:02Z")

</div>

Hi @liuchang!

This appears to be an error with your netCDF library. There were some errors with netCDF and the curl functions in earlier versions of netCDF. The excerpt from your Makefile shows that you are using netCDF 4.5. Please install a newer version of netCDF. Then you will need to also rebuild I/O API with the newer netCDF. Then change your Makefile to point to the newer version of netCDF and the updated build of I/O API with that code.

Hope this helps!  
–Tanya

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [February 26, 2025, 2:29pm UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/3 "2025-02-26T14:29:34Z")

</div>

You could try to add -lcurl after -lnetcdf, but you also may need to add the path to the curl library using -L{CURL}/lib -lcurl, where CURL is the path to the curl library.

---

<div class="post-metadata">

**Author:** ![liuchang](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@liuchang](https://forum.cmascenter.org/u/liuchang)\
**Post date:** [February 27, 2025, 9:20am UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/5 "2025-02-27T09:20:52Z")

</div>

Thank you for your reply. However, I tried to modify it as you suggested, and the following problem appeared after adding the paths to curl and hdf5, do you have a good solution?  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_put_var1_int64_': /public/source/netcdf-fortran-4.4.4/fortran/nf_nc4.f90:2082: multiple definition of `nf\_put\_var1\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71360): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_put_vara_int64_': nf_nc4.f90:(.text+0x95df): multiple definition of `nf\_put\_vara\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x713a0): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_put_vars_int64_': nf_nc4.f90:(.text+0x9ef7): multiple definition of `nf\_put\_vars\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x713e0): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_put_varm_int64_': nf_nc4.f90:(.text+0xac46): multiple definition of `nf\_put\_varm\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71420): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_put_var_int64_': nf_nc4.f90:(.text+0xbde7): multiple definition of `nf\_put\_var\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71320): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_get_var1_int64_': nf_nc4.f90:(.text+0xbe3c): multiple definition of `nf\_get\_var1\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71380): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_get_vara_int64_': nf_nc4.f90:(.text+0xc325): multiple definition of `nf\_get\_vara\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x713c0): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_get_vars_int64_': nf_nc4.f90:(.text+0xcc3d): multiple definition of `nf\_get\_vars\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71400): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_get_varm_int64_': nf_nc4.f90:(.text+0xd98c): multiple definition of `nf\_get\_varm\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71440): first defined here  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libnetcdff.a(nf\_nc4.o): In function `nf_get_var_int64_': nf_nc4.f90:(.text+0xeb2d): multiple definition of `nf\_get\_var\_int64\_’  
/public/source/ioapi-3.2/Linux2\_x86\_64ifort/libioapi.a(modncfio.o):modncfio.F90:(.text+0x71340): first defined here  
ld: /public/home/ecichm/liuc/tools/curl/lib/libcurl.so: undefined reference to symbol ‘inflate’  
/usr/lib64/libz.so.1: error adding symbols: DSO missing from command line  
make[1]: \*\*\* [mcip.exe] Error 1  
make[1]: Leaving directory `/public/home/ecichm/liuc/tools/CMAQ-5.3/PREP/mcip/src’  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [February 27, 2025, 12:27pm UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/6 "2025-02-27T12:27:17Z")

</div>

@liuchang –

If you rebuild netCDF with a new option, then you also need to rebuild I/O API afterward with that new netCDF library. It is not clear from your reply if you have already done that.

–Tanya

---

<div class="post-metadata">

**Author:** ![3adalah](https://avatars.discourse-cdn.com/v4/letter/3/e56c9b/32.png) [@3adalah](https://forum.cmascenter.org/u/3adalah)\
**Post date:** [March 4, 2025, 11:20am UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/7 "2025-03-04T11:20:09Z")

</div>

Add -qopenmp to the LIBS. Like the following:

LIBS = -L$(IOAPI\_ROOT)/Linux2\_x86\_64ifort -lioapi   
-L$(NETCDF)/lib -lnetcdff -lnetcdf -qopenmp

---

<div class="post-metadata">

**Author:** ![liuchang](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@liuchang](https://forum.cmascenter.org/u/liuchang)\
**Post date:** [March 7, 2025, 7:25am UTC](https://forum.cmascenter.org/t/a-problem-with-making-mcip/5620/8 "2025-03-07T07:25:19Z")

</div>

Thanks for the suggestion, I have successfully solved it after recompiling netcdf as well as ioapi and adding -qopenmp to the makefile!
