Problem install 'sf' package in R/4.2.1

Dear HPC team and colleagues,

I’ve been trying to install the package “sf” in R/4.2.1 for the past day but keep getting an error message. All the other packages have been updated to ensure that it’s not coming from that. I’ve successfully installed other packages so my environment is apparently set up correctly.

“sf” requires GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>= 4.8.0), sqlite3 (CRAN - Package sf).

So I’m loading the following modules:

module load foss/2022a GDAL/3.5.0 GEOS/3.10.3 PROJ/9.0.0 R/4.2.1

When installing the “sf” package, the error is the following :

checking for gdal.h… yes
checking GDAL: linking with --libs only… no
checking GDAL: linking with --libs and --dep-libs… no
/opt/ebsofts/binutils/2.38-GCCcore-11.3.0/bin/ld: /opt/ebsofts/GDAL/3.5.0-foss-2022a/lib/ undefined reference to logf@GLIBC_2.27' collect2: error: ld returned 1 exit status /opt/ebsofts/binutils/2.38-GCCcore-11.3.0/bin/ld: /opt/ebsofts/GDAL/3.5.0-foss-2022a/lib/ undefined reference to logf@GLIBC_2.27’
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘sf’

  • removing ‘/home/users/r/richetta/Rpackages/sf’

Could someone please help me understand where the issue is coming from ?

All the best, Cécile.

Hi @Cecile.Richetta

are you trying to install sf on Baobab or Yggdrasil? If on Yggdrasil and before the maintenance, can you try again since we upgraded the nodes to Rocky8, this should’ve solved the issue.


Hi @Yann.Sagon

Yes it was on Yggdrasil, and it’s working now. Thanks a lot.