Hi, SpatialCellChat is a great tool for spatial cell-cell communication analysis. We are excited to use it in our spatial transcriptomics projects. Thank you for developing and sharing this excellent package with the community.
Installation fails on R 4.5.3 due to sf / s2 compilation errors
Environment
- OS: Ubuntu 24.04 (Linux HPC cluster)
- R version: 4.5.3 (2026-03-11)
- Installation method:
devtools::install_github("jinworks/SpatialCellChat")
- Package manager: conda (miniforge3)
Problem
Installing SpatialCellChat on R 4.5.3 fails due to a chain of dependency compilation errors:
s2 package fails to compile — linker cannot find multiple abseil-cpp shared libraries:
ld: cannot find -labsl_log_internal_check_op: No such file or directory
ld: cannot find -labsl_log_internal_conditions: No such file or directory
ld: cannot find -labsl_string_view: No such file or directory
... (17 missing libraries total)
collect2: error: ld returned 1 exit status
ERROR: compilation failed for package 's2'
sf fails because it depends on s2:
ERROR: dependency 's2' is not available for package 'sf'
- SpatialCellChat fails because it depends on
sf:
ERROR: dependency 'sf' is not available for package 'SpatialCellChat'
Additional issues
systemfonts also fails to compile due to missing ft2build.h (freetype2 header not on default include path). This blocks ggforce → scatterpie → spacexr installation chain.
- Bioconductor dependencies (
ALRA, MERINGUE, ComplexHeatmap, BiocNeighbors) are not available via install.packages() and require separate installation from GitHub/Bioconductor.
Attempted workarounds
- Installing
abseil-cpp and openssl via conda — did not resolve the s2 linker errors.
install.packages("sf", configure.args = c(sf = "--without-s2")) — did not take effect; s2 was still attempted.
- Installing
r-sf via conda — this silently downgraded R from 4.5.3 to 4.4.3 (since conda-forge r-sf only has R 4.4 builds), breaking all previously compiled R 4.5 packages.
Questions
- Is
sf (and therefore s2) strictly required for SpatialCellChat, or can it work without spatial geometry operations from sf?
- Could
sf be made an optional dependency (moved to Suggests instead of Imports)?
- Are there any known working installation instructions for R 4.5.x?
Suggested improvement
Consider documenting the full list of system-level dependencies required for compilation (e.g., freetype-dev, abseil-cpp, gdal, proj, geos, udunits2) and providing a conda/apt install command in the README to help users set up their environment before installing from R.
Hi, SpatialCellChat is a great tool for spatial cell-cell communication analysis. We are excited to use it in our spatial transcriptomics projects. Thank you for developing and sharing this excellent package with the community.
Installation fails on R 4.5.3 due to
sf/s2compilation errorsEnvironment
devtools::install_github("jinworks/SpatialCellChat")Problem
Installing SpatialCellChat on R 4.5.3 fails due to a chain of dependency compilation errors:
s2package fails to compile — linker cannot find multipleabseil-cppshared libraries:sffails because it depends ons2:sf:Additional issues
systemfontsalso fails to compile due to missingft2build.h(freetype2 header not on default include path). This blocksggforce→scatterpie→spacexrinstallation chain.ALRA,MERINGUE,ComplexHeatmap,BiocNeighbors) are not available viainstall.packages()and require separate installation from GitHub/Bioconductor.Attempted workarounds
abseil-cppandopensslvia conda — did not resolve thes2linker errors.install.packages("sf", configure.args = c(sf = "--without-s2"))— did not take effect;s2was still attempted.r-sfvia conda — this silently downgraded R from 4.5.3 to 4.4.3 (since conda-forger-sfonly has R 4.4 builds), breaking all previously compiled R 4.5 packages.Questions
sf(and therefores2) strictly required for SpatialCellChat, or can it work without spatial geometry operations fromsf?sfbe made an optional dependency (moved toSuggestsinstead ofImports)?Suggested improvement
Consider documenting the full list of system-level dependencies required for compilation (e.g.,
freetype-dev,abseil-cpp,gdal,proj,geos,udunits2) and providing a conda/apt install command in the README to help users set up their environment before installing from R.