Skip to content

-lcurl included in libraries, even when remote access disabled #3016

@edwardhartnett

Description

@edwardhartnett

I got this email from a NOAA programmer:

I am trying to run the model on a new system and I compiled all libraries on login node, but when I run the regression tests on compute nodes, where we also run the build steps, compilation fails with the error about missing libcurl library.

ld: cannot find -lcurl

Compute nodes are probably configured slightly differently than login nodes.

I found that the -lcurl linker flag comes from the netcdf library, specifically:

[Dusan.Jovic@nfe04 install]$ grep -r lcurl netcdf
netcdf/lib/libnetcdf.settings:Extra libraries: -lm -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm
netcdf/lib/libnetcdf.la:dependency_libs=' -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/hdf5/lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zstd/lib
-L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zlib/lib -lstdc++ -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm'
netcdf/lib/pkgconfig/netcdf.pc:Libs: -L${libdir} -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/hdf5/lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/z
std/lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zlib/lib -lnetcdf -lm -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm
netcdf/lib/pkgconfig/netcdf.pc:Libs.private: -lm -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm
netcdf/lib/libnetcdff.la:dependency_libs=' -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/hdf5/lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/netcdf/
lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zstd/lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zlib/lib /collab1/data/Dusan.Jovic/sufs/simple
-ufs/libs/ufslibs/install/netcdf/lib/libnetcdf.la -lstdc++ -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm'
netcdf/bin/nc-config:libs="-L${libdir} -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/hdf5/lib -L/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zstd/lib -L
/collab1/data/Dusan.Jovic/sufs/simple-ufs/libs/ufslibs/install/zlib/lib -lnetcdf -lm -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm"
netcdf/bin/nc-config:libsprivate="-lm -lcurl -lhdf5_hl -lhdf5 -lzstd -lz -lm"

I do not see '-ldisable-curl' or '-disable-libcurl' option. I am using '-disable-dap' among other options, like '-enable-netcdf-4' etc and i thought that disabling dap will disable libcurl. Is there any other option I need to specify to remove dependency on libcurl.

So we need a way to build without lcurl, even if curl is present.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions