[Rd] R-devel on FreeBSD: new C99 functions don't build
Rainer Hurling
rhurlin at gwdg.de
Tue May 15 19:05:44 CEST 2012
About April 25th, there had been some changes within R-devel's
src/nmath/pnbeta.c (and probably some other relevant places) and now
building R-devel on FreeBSD 10.0-CURRENT (amd64) with gcc-4.6.4 and
math/R-devel (selfmade forked port from math/R) fails like this:
[..snip..]
mkdir /usr/ports/math/R-devel/work/R-devel/bin/exec
gcc46 -std=gnu99 -I../../src/extra -I. -I../../src/include
-I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -fopenmp -fpic
-O2 -pipe -O2 -fno-strict-aliasing -pipe -msse3
-Wl,-rpath=/usr/local/lib/gcc46 -c Rmain.c -o Rmain.o
gcc46 -std=gnu99 -export-dynamic -fopenmp -L/usr/local/lib
-Wl,-rpath=/usr/local/lib/gcc46 -o R.bin Rmain.o -L../../lib -lR -lRblas
../../lib/libR.so: undefined reference to `log1pl'
collect2: ld returned 1 exit status
*** [R.bin] Error code 1
Stop in /usr/ports/math/R-devel/work/R-devel/src/main.
*** [R] Error code 1
Stop in /usr/ports/math/R-devel/work/R-devel/src/main.
*** [R] Error code 1
Stop in /usr/ports/math/R-devel/work/R-devel/src.
*** [R] Error code 1
Stop in /usr/ports/math/R-devel/work/R-devel.
*** [do-build] Error code 1
Stop in /usr/ports/math/R-devel.
*** [build] Error code 1
Stop in /usr/ports/math/R-devel.
===>>> make failed for math/R-devel
It seems, that at least one new C99 function (log1pl) is introduced in
R-devel, see
src/nmath/pnbeta.c:l95
return (double) (log_p ? log1pl(-ans) : (1 - ans));
for which there is only a declaration in FreeBSDs math.h, but no full
implementation in libm (see http://wiki.freebsd.org/MissingMathStuff).
Is there any chance to get at least rudimentary replacement functions in
R-devel for systems with missing or defective C99 math functions?
(For example, in the similar case of log1p(), see the RMATH_HAVE_LOG1P
and RMATH_HAVE_WORKING_LOG1P bits in the configure script,
src/include/Rmath.h0.in, and src/nmath/log1p.c; thanks to b.f. for
pointing me out to this).
Thanks for any help,
Rainer Hurling
CC'ed to b.f. as the maintainer of the math/R port on FreeBSD.
More information about the R-devel
mailing list