[Rd] status of the FreeBSD port/package and some questions

Joseph Mingrone jrm at ftfl.ca
Sun Jul 24 01:33:33 CEST 2016


Hello,

Over time, the FreeBSD R port/package [1] has accumulated some cruft.  We've
begun an overhaul and the process has generally been positive since most of the
local patches and workarounds are no longer necessary.

However, we still require a few workarounds.

1. Libjpeg

The autotools check for libjpeg >=6b fails even when libjpeg is present
(e.g. /usr/local/lib/libjpeg.so.8 exists).  To work around this, when the user
selects the JPEG option from a list of configuration choices,
graphics/jpeg-turbo (currently version 1.4.2) is installed as a dependency and
the variable r_cv_header_jpeglib_h is set to yes.

2. ARMv6 Build Issues

We used to have a local patch similar to the change applied for
https://stat.ethz.ch/pipermail/r-devel/2015-October/071902.html.  Now that these
checks are included in src/extra/tre/tre-internal.h, we only need, I believe, an
#include <stdint.h> in tre-internal.h for the definitions of UINT32_MAX and
INT32_MAX.  This fixes one build error, but the build still fails on ARMv6
(http://pkg.awarnach.mathstat.dal.ca/data/10armv6-default/2016-07-23_13h52m17s/logs/errors/R-3.3.1_2.log).

3. BLAS

Users can choose from four options for BLAS: ATLAS, OpenBLAS, Netlib, and RBLAS
(bundled BLAS).  I've noticed some segmentation faults with OpenBLAS.  They
occur when quitting R, but for some reason, only through Emacs/ESS.  A core file
is dumped, but I haven't looked into it yet.  I also haven't tested ATLAS or
NetLib's BLAS extensively.  Based on what I've read in the "R Installation and
Administration" manual, I will likely switch the default to R's bundled BLAS.

4. PDF Manuals and TeX Dependencies

Since the TeX dependencies to build the PDF manuals is quite heavy, we give
users the option to turn this off.  I don't see an autoconf option to do this,
so here is our workaround when the user chooses not to install the PDF
manuals:

.for i in KPSEWHICH MAKEINDEX PDFLATEX PDFTEX TEX TEXI2DVI
     CONFIGURE_ENV+=ac_cv_path_${i}=""
.endfor

5. Miscellaneous

We changed a few default locations.

@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\
	${WRKSRC}/src/nmath/standalone/Makefile.in \
	${WRKSRC}/src/unix/Makefile.in
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \
	${WRKSRC}/configure

We created versions for shared libraries.

.for L in R Rblas Rlapack
	@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \
	cd ${STAGEDIR}${PREFIX}/lib/R/lib; if [ -f lib${L}.so ] ; then \
	${LN} -sf lib${L}.so lib${L}.so.${${L:tu}_SOVERSION} ; fi; fi
.endfor

We've also created a separate, simple port/package for libRMath.  It basically
turns off all configuration options

--without-cairo --without-ICU --disable-java --without-jpeglib
  --without-libintl-prefix --without-libpng --disable-nls --without-readline
  --without-tcltk --without-libtiff --without-x

and installs

include/Rmath.h lib/libRmath.a lib/libRmath.so
lib/libRmath.so.%%RMATH_SOVERSION%%

Here are my proposed Makefiles for math/R and math/libRmath

http://ftfl.ca/misc/Makefile_R
http://ftfl.ca/misc/Makefile_libRMath

They are built for the FreeBSD ports system, but I guess most of what's going on
will be clear.  If you have any comments or suggestions for improvements, please
share.

Regards,

Joseph

[1] A port is what we call the "blueprint" system for package building.  Most
users will probably just install the pre-built binary package, but if they want
a package with customized options, they can use the port to build a package
themselves.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20160723/186d0289/attachment.bin>


More information about the R-devel mailing list