Open MichaelChirico opened 4 years ago
P.S.:
Missing symbols from libbz2 (in case '-lbz2' vanished):
../../lib/libR.so: undefined reference to BZ2_bzReadGetUnused' ../../lib/libR.so: undefined reference to
BZ2_bzRead'
../../lib/libR.so: undefined reference to BZ2_bzBuffToBuffCompress' ../../lib/libR.so: undefined reference to
BZ2_bzBuffToBuffDecompress'
../../lib/libR.so: undefined reference to BZ2_bzWriteClose' ../../lib/libR.so: undefined reference to
BZ2_bzWriteOpen'
../../lib/libR.so: undefined reference to BZ2_bzReadOpen' ../../lib/libR.so: undefined reference to
BZ2_bzDecompress'
../../lib/libR.so: undefined reference to BZ2_bzDecompressEnd' ../../lib/libR.so: undefined reference to
BZ2_bzDecompressInit'
../../lib/libR.so: undefined reference to BZ2_bzWrite' ../../lib/libR.so: undefined reference to
BZ2_bzlibVersion'
../../lib/libR.so: undefined reference to `BZ2_bzReadClose'
collect2: error: ld returned 1 exit status
Makefile:153: recipe for target 'R.bin' failed
Missing symbols from libz (in case '-lz' vanished):
../../lib/libR.so: undefined reference to inflateReset' ../../lib/libR.so: undefined reference to
inflateEnd'
../../lib/libR.so: undefined reference to compress' ../../lib/libR.so: undefined reference to
deflate'
../../lib/libR.so: undefined reference to inflateInit2_' ../../lib/libR.so: undefined reference to
inflate'
../../lib/libR.so: undefined reference to crc32' ../../lib/libR.so: undefined reference to
deflateEnd'
../../lib/libR.so: undefined reference to zlibVersion' ../../lib/libR.so: undefined reference to
deflateInit2_'
../../lib/libR.so: undefined reference to `uncompress'
collect2: error: ld returned 1 exit status
Makefile:153: recipe for target 'R.bin' failed
(In reply to Leif Leonhardy from comment #0)
Work-around: Configure with '--without-system-bzlib --without-system-zlib'.
Alternatively, and probably better, '--without-system-pcre' will bypass the 'configure' test that causes the trouble, still allowing to use the system's libz and/or libbz2.
Created attachment 1822 [details] Patches m4/R.m4, and, just for convenience, also configure.
When configuring R to use the system libraries of libz and/or libbz2 (the default when they're available and recent enough), 'configure' may lose '-lz' and/or '-lbz2' from LIBS on the way, which later leads to linker errors, since libR.so doesn't get linked against these. (Linking the R binary fails due to undefined symbols from these libraries, referenced from libR.so.)
Trivial patch fixing this attached. (Only restore LIBS from r_save_LIBS when they've really been saved in the same test, R_PCRE.)
Work-around: Configure with '--without-system-bzlib --without-system-zlib'.
METADATA