I'm trying to compile R-3.4.1
on a server I have access to (but not root access). The script compilation fails because of zlib
version. I follow the instruction here, and I compile zilb
and it is available in the path /storage/users/<uname>/trm/zlib/lib
I tried to add this path to both $LD_LIBRARY_PATH
and to $LIBRARY_PATH$ and it doesn't work. I also tried, as per the link above to run the configure
as following:
$ ./configure --prefix=/storage/users/<uname>/trm/R LDFLAGS="-L/storage/users/<uname>/trm/zlib/lib"
but the error remains. The configure script itself doesn't have the bug mentioned in the link above. Sadly, I don't know what is the distro on the server. Clearly, I'm missing something, but I don't know what.
edit 1
These are the final lines of the ./configure
command
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking if zlib version >= 1.2.5... no
checking whether zlib support suffices... configure: error: zlib library and headers are required
(I tried this with @PSkocik suggestion)
also, to confirm, I copy paste the path I used for the configure
command into ls
:
libz.a libz.so libz.so.1 libz.so.1.2.11 pkgconfig
Edit 2
Following @AmeyaVS instructions, I post here the content of zlib.pc
prefix=/storage/users/<uname>/trm/zlib
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
sharedlibdir=${libdir}
includedir=${prefix}/include
Name: zlib
Description: zlib compression library
Version: 1.2.11
Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz
Cflags: -I${includedir}
CFLAGS
), not only the library path. BTW did you meanR-3.4.1
? – steeldriver Jul 23 '17 at 21:25LDFLAGS="-L/storage/users/<uname>/trm/zlib/lib" ./configure --prefix=/storage/users/<uname>/trm/R
, that'll definitely set the environment variable. Your version will only do that if the configure script will cooperate. – Petr Skocik Jul 23 '17 at 21:48configure
command. You are are right about the version number, I fixed that. – Yotam Jul 24 '17 at 05:51