The substitution in R package recipe
https://github.com/spack/spack-packages/blob/develop/repos/spack_repo/builtin/packages/r/package.py#L211
@run_after("install")
def copy_makeconf(self):
# Ensure full library flags are included in Makeconf
for _lib, _pkg in [
("lzma", "xz"),
("bz2", "bzip2"),
("z", "zlib-api"),
("tirpc", "libtirpc"),
("icuuc", "icu4c"),
]:
filter_file(
f"-l{_lib}",
f"-L{self.spec[_pkg].libs.directories[0]} -l{_lib}",
join_path(self.etcdir, "Makeconf"),
)
# Make a copy of Makeconf because it will be needed to properly build R
# dependencies in Spack.
src_makeconf = join_path(self.etcdir, "Makeconf")
dst_makeconf = join_path(self.etcdir, "Makeconf.spack")
install(src_makeconf, dst_makeconf)
replaces paths like this
r-4.6.1-lz2tzkvuubnqxzawnlbms2dt434elf3n
with malformed
r-4.6.1-L[...]spack/opt/spack/linux-skylake/zlib-ng-2.3.3-azwva5hzyxy2m4j2at2evdnaklj6sflh/lib -lz2tzkvuubnqxzawnlbms2dt434elf3n
All linking attempts against this installation fail afterwards
LDFLAGS = -Wl,-rpath,[...]spack/opt/spack/linux-skylake/r-4.6.1-L[...]spack/opt/spack/linux-skylake/zlib-ng-2.3.3-azwva5hzyxy2m4j2at2evdnaklj6sflh/lib -lz2tzkvuubnqxzawnlbms2dt434elf3n/rlib/R/lib
The substitution in R package recipe
https://github.com/spack/spack-packages/blob/develop/repos/spack_repo/builtin/packages/r/package.py#L211
replaces paths like this
with malformed
All linking attempts against this installation fail afterwards