Skip to content

Make changes needed for netcdf-c 4.9.3 #285

@mathomp4

Description

@mathomp4

In testing building a Baselibs with #279 and #284 an issue was found.

It looks like in netcdf-c there was a change to how nc-config --libs work (see Unidata/netcdf-c#3037 by @WardF). Old output:

> /discover/swdev/gmao_SIteam/Baselibs/ESMA-Baselibs-8.13.0/x86_64-pc-linux-gnu/ifort_2021.13.0-intelmpi_2021.13.0-SLES15/Linux/bin/nc-config --libs
-L/discover/swdev/gmao_SIteam/Baselibs/ESMA-Baselibs-8.13.0/x86_64-pc-linux-gnu/ifort_2021.13.0-intelmpi_2021.13.0-SLES15/Linux/lib -lnetcdf -ljpeg -lmfhdf -ldf -ljpeg -lhdf5_hl -lhdf5 -lm -lbz2 -lxml2 -L/discover/swdev/gmao_SIteam/Baselibs/ESMA-Baselibs-8.13.0/x86_64-pc-linux-gnu/ifort_2021.13.0-intelmpi_2021.13.0-SLES15/Linux/lib -lsz -ljpeg -lgpfs -L/discover/swdev/gmao_SIteam/Baselibs/ESMA-Baselibs-8.13.0/x86_64-pc-linux-gnu/ifort_2021.13.0-intelmpi_2021.13.0-SLES15/Linux/lib -lcurl -lssl -lcrypto -lssl -lcrypto -lzstd -lbrotlidec -lz -lm -pthread -ldl -lm -ltirpc

new output:

> /discover/nobackup/projects/gmao/SIteam/Baselibs/TmpBaselibs/ESMA-Baselibs-8.14.0-ESMF8.8.1-UpdateNetCDF/x86_64-pc-linux-gnu/ifort_2021.13.0-intelmpi_2021.13.0/Linux/bin/nc-config --libs
-L/discover/nobackup/projects/gmao/SIteam/Baselibs/TmpBaselibs/ESMA-Baselibs-8.14.0-ESMF8.8.1-UpdateNetCDF/x86_64-pc-linux-gnu/ifort_2021.13.0-intelmpi_2021.13.0/Linux/lib -lnetcdf

For Baselibs (and GEOS) we'll need to use:

nc-config --libs --static

anywhere we use it as we sort of have assumed static linking. See:

https://github.com/search?q=org%3AGEOS-ESM%20nc-config&type=code

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions