[Rd] prefixed zlib and bzip2 headers

Jones, Michael itguy at chevron.com
Fri Apr 28 15:20:30 CEST 2017

Thank you Martyn!  I'm happy to say I finally did read that section and did just that with the CFLAGS and LDFLAGS so that things built correctly.   One thing that was a bit interesting, for the curl lib I tried to use the latest we had built which was 7.50.3 and it would complain about the version until I stepped down to 7.32.0.  I'm not sure if this is something in the way we built that library or something in the check itself, but nevertheless I was able to get a successful build yesterday! :)

Unfortunately, the environment I'm in resides heavily on an isofs like environment for machines, so epel packages are not as easily usable for multi-use machines I work on, but for opportunities where that is not the case I will certainly keep that in mind!  I appreciate that information.

Thanks very much

-----Original Message-----
From: Martyn Plummer [mailto:plummerm at iarc.fr] 
Sent: Friday, April 28, 2017 5:58 AM
To: r-devel at r-project.org; Jones, Michael <itguy at chevron.com>
Subject: [**EXTERNAL**] Re: [Rd] prefixed zlib and bzip2 headers

If you are having any trouble compiling R on RHEL or its derivatives,
it is worth recalling that a binary distribution of R is provided
through the EPEL (Extra Packages for Enterprise Linux) repository:


Install the appropriate epel-release RPM to enable the repository. Then
you can install R via dnf as you would any other software package.

Tom Callaway from Red Hat maintains the R rpms and he ensures that they
still build and install on RHEL 5 and 6. Specifically, for zlib and
other system libraries that are too old on these platforms, up-to-date
versions are built and statically linked into R during the RPM build

Having said that, if you need to install R from source on RHEL 5 or 6
then you need to specify the locations of the locally-installed
libraries and headers. This is done at configure time via CFLAGS and
LDFLAGS (See the R-admin manual, section B3.3), e.g.

CFLAGS="-g -O2 -I/path/to/my/headers" \
LDFLAGS="-L/path/to/my/libs" \

If you do this then you do not need to set LD_LIBRARY_PATH at runtime.
Library locations specified via LDFLAGS are collated and automatically
added to LD_LIBRARY_PATH (See R-admin, section B7).


On Thu, 2017-04-27 at 14:41 +0000, Jones, Michael wrote:
> Hello,
> I'm trying to compile R-3.3.3 or R-3.4.0 on a RHEL6 system that I've
> prefixed the latest headers down a shared utility path, I've sourced
> this path in LD_LIBRARY_LATH, R_LD_LIBRARY_PATH,  and dropping the
> headers down /src/include which appears to be the default
> R_include_dir but it will not accept these any other place than
> /usr/include.  Is there a way to properly define a prefixed
> includedir and libdir for R that I'm missing?  I was able to do this
> in 3.2.4-revised successfully.  I see the comments that -with-system-
> zlib is now default, but I see no options to override that.  Can you
> please point me in the correct direction?
> Many thanks!
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list