Skip to content

Commit

Permalink
Trac #29486: cygwin: Do not use system R
Browse files Browse the repository at this point in the history
For package `rpy2` (versions 2.8.x) there is an unresolved build failure
on cygwin when using system R (`cygwin-standard`).
This can be seen on the GitHub Actions workflow from #29403 but has also
been reproduced locally. Details below.

This ticket disables use of system R on cygwin.  This should be reverted
with the #29441 upgrade to more recent `rpy2` (python-3 only).

-------

{{{
gcc -shared -Wl,--enable-auto-image-base
-L/cygdrive/d/a/sage/sage/local/lib
-Wl,-rpath,/cygdrive/d/a/sage/sage/local/lib
build/temp.cygwin-3.1.4-x86_64-3.7/./rpy/rinterface/_rinterface.o
-L/usr/lib/R/lib -L/cygdrive/d/a/sage/sage/local/lib/python3.7/config
-L/usr/lib -Lbuild/temp.cygwin-3.1.4-x86_64-3.7 -L/usr/lib/R/lib
-lreadline -lR -lpcre -llzma -lbz2 -lz -ltirpc -lrt -ldl -lm -liconv
-licuuc -licui18n -lpython3.7m -lr_utils -o
build/lib.cygwin-3.1.4-x86_64-3.7/rpy2/rinterface/_rinterface.cpython-
37m-x86_64-cygwin.dll -fopenmp
    /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-
cygwin/bin/ld:
build/temp.cygwin-3.1.4-x86_64-3.7/libr_utils.a(r_utils.o): in function
`rpy2_findfun':
    /tmp/pip-req-build-ymc5_3kd/./rpy/rinterface/r_utils.c:58: undefined
reference to `Rf_findVarInFrame3'
    /tmp/pip-req-build-
ymc5_3kd/./rpy/rinterface/r_utils.c:58:(.text+0xda): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol
`Rf_findVarInFrame3'
    /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-
cygwin/bin/ld:
build/temp.cygwin-3.1.4-x86_64-3.7/libr_utils.a(r_utils.o): in function
`rpy2_list_attr':
    /tmp/pip-req-build-ymc5_3kd/./rpy/rinterface/r_utils.c:129:
undefined reference to `ATTRIB'
    /tmp/pip-req-build-
ymc5_3kd/./rpy/rinterface/r_utils.c:129:(.text+0x340): relocation
truncated to fit: R_X86_64_PC32 against undefined symbol `ATTRIB'
    /usr/lib/gcc/x86_64-pc-cygwin/9.3.0/../../../../x86_64-pc-
cygwin/bin/ld:
build/temp.cygwin-3.1.4-x86_64-3.7/libr_utils.a(r_utils.o): in function
`rpy2_remove':
    /tmp/pip-req-build-ymc5_3kd/./rpy/rinterface/r_utils.c:152:
undefined reference to `Rf_lang4'
}}}

Full logs can be downloaded at:
- https://github.com/mkoeppe/sage/runs/572730287

The sage-local artifact that has been built can be downloaded at
- https://github.com/mkoeppe/sage/suites/584124994/artifacts/4126694

Previous tickets: https://trac.sagemath.org/search?q=rpy2+cygwin&noquick
jump=1&branch=on&milestone=on&ticket=on&wiki=on

URL: https://trac.sagemath.org/29486
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Apr 22, 2020
2 parents b61ae68 + 032eb86 commit b30ea29
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions build/pkgs/r/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
SAGE_SPKG_CONFIGURE([r], [
m4_pushdef([SAGE_R_MINVER],["3.4.4"])
SAGE_SPKG_DEPCHECK([atlas openblas iconv readline bzip2 xz pcre curl], [
PKG_CHECK_MODULES([R], [libR >= $SAGE_R_MINVER], [
AC_PATH_PROG([R], [R])
AS_IF([test "x$R" = x], [
AC_MSG_NOTICE([R is not found])
sage_spkg_install_r=yes
], [
dnl TODO: check that versions of R and libR match
sage_spkg_install_r=no
])
], [sage_spkg_install_r=yes])
AS_CASE([$host],
[*-*-cygwin*], [
dnl #29486: rpy2 2.8.x does not build against system R on cygwin.
sage_spkg_install_r=yes
], [
PKG_CHECK_MODULES([R], [libR >= $SAGE_R_MINVER], [
AC_PATH_PROG([R], [R])
AS_IF([test "x$R" = x], [
AC_MSG_NOTICE([R is not found])
sage_spkg_install_r=yes
], [
dnl TODO: check that versions of R and libR match
sage_spkg_install_r=no
])
], [sage_spkg_install_r=yes])
])
])
m4_popdef([SAGE_R_MINVER])
])

0 comments on commit b30ea29

Please sign in to comment.