Ask Your Question

Revision history [back]

curl compilation error

Hi, I want to compile croco_v1.1 when I found this error, related to the curl library.

Which flag should I modify to specify its location?

/usr/lib/x86_64-linux-gnu/libcurl-gnutls.a /usr/lib/x86_64-linux-gnu/libcurl-gnutls.la /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0 /usr/lib/x86_64-linux-gnu/libcurl.a /usr/lib/x86_64-linux-gnu/libcurl.la /usr/lib/x86_64-linux-gnu/libcurl.so /usr/lib/x86_64-linux-gnu/libcurl.so.3 /usr/lib/x86_64-linux-gnu/libcurl.so.4 /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0

Here is the error

gfortran -fdefault-real-8 -fdefault-double-8 -fopenmp -o a.out par_pisces.o ocean2pisces.o trc.o sms_pisces.o p4zche.o p4zint.o p4zlys.o p4zflx.o p4zlim.o p4zsink.o p4zmicro.o p4zmeso.o p4zmort.o p4zopt.o p4zprod.o p4zrem.o p4zsed.o p4zbio.o trcwri_pisces.o trcsms_pisces.o trcini_pisces.o pisces_ini.o module_parameter_oa.o module_oa_time.o module_oa_space.o module_oa_periode.o module_oa_variables.o module_oa_type.o module_oa_stock.o module_oa_level.o module_oa_interface.o module_oa_upd.o croco_oa.o var_oa.o tooldatosec.o toolsectodat.o tooldecompdat.o main.o step.o read_inp.o timers_roms.o init_scalars.o init_arrays.o set_weights.o set_scoord.o ana_grid.o setup_grid1.o setup_grid2.o set_nudgcof.o ana_initial.o analytical.o zonavg.o step2d.o u2dbc.o v2dbc.o zetabc.o obc_volcons.o pre_step3d.o step3d_t.o step3d_uv1.o step3d_uv2.o prsgrd.o rhs3d.o set_depth.o omega.o uv3dmix.o uv3dmix_spg.o t3dmix.o t3dmix_spg.o hmix_coef.o wetdry.o u3dbc.o v3dbc.o t3dbc.o step3d_fast.o step3d_w.o rhs3d_w_nh.o initial_nbq.o grid_nbq.o unbq_bc.o vnbq_bc.o wnbq_bc.o rnbq_bc.o w3dbc.o nbq_bry_store.o rho_eos.o ab_ratio.o alfabeta.o ana_vmix.o bvf_mix.o lmd_vmix.o gls_mixing.o lmd_skpp.o lmd_bkpp.o lmd_swfrac.o lmd_wscale.o diag.o wvlcty.o checkdims.o grid_stiffness.o bio_diag.o setup_kwds.o check_kwds.o check_srcs.o check_switches1.o check_switches2.o debug.o param.o ncscrum.o scalars.o output.o put_global_atts.o nf_fread.o nf_fread_x.o nf_fread_y.o nf_read_bry.o get_date.o lenstr.o closecdf.o insert_node.o fillvalue.o nf_add_attribute.o set_cycle.o def_grid_2d.o def_grid_3d.o def_his.o def_rst.o def_diags.o def_diagsM.o def_bio_diags.o wrt_grid.o wrt_his.o wrt_avg.o wrt_rst.o wrt_diags.o wrt_diags_avg.o wrt_diagsM.o wrt_diagsM_avg.o wrt_bio_diags.o wrt_bio_diags_avg.o set_avg.o set_diags_avg.o set_diagsM_avg.o set_bio_diags_avg.o def_diags_vrt.o wrt_diags_vrt.o set_diags_vrt.o set_diags_vrt_avg.o wrt_diags_vrt_avg.o def_diags_ek.o wrt_diags_ek.o set_diags_ek.o set_diags_ek_avg.o wrt_diags_ek_avg.o def_diags_pv.o wrt_diags_pv.o set_diags_pv.o set_diags_pv_avg.o wrt_diags_pv_avg.o def_diags_eddy.o set_diags_eddy_avg.o wrt_diags_eddy_avg.o def_surf.o wrt_surf.o set_surf_avg.o wrt_surf_avg.o get_grid.o get_initial.o get_vbc.o get_wwave.o get_tclima.o get_uclima.o get_ssh.o get_sss.o get_smflux.o get_stflux.o get_srflux.o get_sst.o mod_tides_mas.o tidedata.o mas.o get_tides.o clm_tides.o get_bulk.o bulk_flux.o get_bry.o get_bry_bio.o sstskin.o get_psource.o get_psource_ts.o cfb_stress.o mrl_wci.o wkb_wwave.o wkbbc.o get_bry_wkb.o online_bulk_var.o online_get_bulk.o online_interp.o online_interpolate_bulk.o online_set_bulk.o init_floats.o wrt_floats.o step_floats.o rhs_floats.o interp_rho.o def_floats.o init_arrays_floats.o random_walk.o get_initial_floats.o init_sta.o wrt_sta.o step_sta.o interp_sta.o def_sta.o init_arrays_sta.o biology.o o2sato.o sediment.o bbl.o MPI_Setup.o MessPass2D.o MessPass3D.o exchange.o autotiling.o zoom.o update2D.o set_nudgcof_fine.o zoombc_2D.o zoombc_3D.o uv3dpremix.o t3dpremix.o update3D.o zoombc_3Dfast.o Agrif2Model.o send_xios_diags.o cpl_prism_define.o cpl_prism_put.o cpl_prism_init.o cpl_prism_get.o cpl_prism_getvar.o cpl_prism_grid.o -L/data/home/mao/netcdf/lib -lnetcdff -lnetcdf /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-ocinternal.o): In function ocinternalinitialize': /data/home/mao/netcdf-4.1.3/oc/ocinternal.c:142: undefined reference tocurl_version_info' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-curlfunctions.o): In function ocset_curl_flags': /data/home/mao/netcdf-4.1.3/oc/curlfunctions.c:36: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/curlfunctions.c:41: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/curlfunctions.c:46: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/curlfunctions.c:63: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/curlfunctions.c:65: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-curlfunctions.o):/data/home/mao/netcdf-4.1.3/oc/curlfunctions.c:57: more undefined references to curl_easy_setopt' follow /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In functionocfetchhttpcode': /data/home/mao/netcdf-4.1.3/oc/http.c:27: undefined reference to curl_easy_getinfo' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In functionocfetchurl_file': /data/home/mao/netcdf-4.1.3/oc/http.c:41: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:46: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:79: undefined reference to curl_easy_strerror' /data/home/mao/netcdf-4.1.3/oc/http.c:51: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:56: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:60: undefined reference tocurl_easy_perform' /data/home/mao/netcdf-4.1.3/oc/http.c:74: undefined reference to curl_easy_getinfo' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In functionocfetchurl': /data/home/mao/netcdf-4.1.3/oc/http.c:91: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:96: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:133: undefined reference to curl_easy_strerror' /data/home/mao/netcdf-4.1.3/oc/http.c:101: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:106: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:108: undefined reference tocurl_easy_perform' /data/home/mao/netcdf-4.1.3/oc/http.c:119: undefined reference to curl_easy_getinfo' /data/home/mao/netcdf-4.1.3/oc/http.c:111: undefined reference tocurl_easy_strerror' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In function occurlopen': /data/home/mao/netcdf-4.1.3/oc/http.c:230: undefined reference tocurl_easy_init' /data/home/mao/netcdf-4.1.3/oc/http.c:234: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:238: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In function ocfetchlastmodified': /data/home/mao/netcdf-4.1.3/oc/http.c:261: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:266: undefined reference to curl_easy_setopt' /data/home/mao/netcdf-4.1.3/oc/http.c:267: undefined reference tocurl_easy_setopt' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o):/data/home/mao/netcdf-4.1.3/oc/http.c:268: more undefined references to curl_easy_setopt' follow /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In functionocfetchlastmodified': /data/home/mao/netcdf-4.1.3/oc/http.c:273: undefined reference to curl_easy_perform' /data/home/mao/netcdf-4.1.3/oc/http.c:282: undefined reference tocurl_easy_strerror' /data/home/mao/netcdf-4.1.3/oc/http.c:276: undefined reference to curl_easy_getinfo' /data/home/mao/netcdf/lib/libnetcdf.a(liboc_la-http.o): In functionoccurlclose': /data/home/mao/netcdf-4.1.3/oc/http.c:251: undefined reference to `curl_easy_cleanup' collect2: error: ld returned 1 exit status Makefile:173: recipe for target 'croco' failed make: * [croco] Error 1