RuntimeError: found a situation in which we try to build a type recursively.

Issue #591 resolved
Valeriy Soloviov created an issue

Hello,

I am provisioning R & rpy2 on EMR emr-5.23.0 with python 3.6.8

7 days ago it worked but now I am getting the following error. I downgraded version to 2.9.5 and it’s working (while none of 3.x )

[root@ip-10-207-108-195 ~]# python3.6

Python 3.6.8 (default, Aug 2 2019, 17:42:44)

[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import rpy2.robjects.packages as rpackages

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/usr/local/lib64/python3.6/site-packages/rpy2/robjects/__init__.py", line 14, in <module>

import rpy2.rinterface as rinterface

File "/usr/local/lib64/python3.6/site-packages/rpy2/rinterface.py", line 6, in <module>

from rpy2.rinterface_lib import openrlib

File "/usr/local/lib64/python3.6/site-packages/rpy2/rinterface_lib/openrlib.py", line 72, in <module>

LOGICAL = rlib.LOGICAL

RuntimeError: found a situation in which we try to build a type recursively. This is known to occur e.g. in ``struct s { void(*callable)(struct s); }''. Please report if you get this error and really need support for your case.

>>>

>>>

My installation scripts:

  - "yum -y install R unixODBC-devel"
  - "yum groupinstall \"Development Tools\" -y"
  - "yum install -y readline-devel cairo-devel libpng-devel libjpeg-devel libtiff-devel"
  - "gpg --armor --export 3F32EE77E331692F|grep -q KEY || { gpg --keyserver keys.gnupg.net --recv-keys 3F32EE77E331692F; }"
  - "[[ ! -e /tmp/rstudio-server-rhel-1.2.1335-x86_64.rpm ]] && wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=20 https://download2.rstudio.org/server/centos6/x86_64/rstudio-server-rhel-1.2.1335-x86_64.rpm -O /tmp/rstudio-server-rhel-1.2.1335-x86_64.rpm"
  - "[[ -e /tmp/rstudio-server-rhel-1.2.1335-x86_64.rpm ]] && yum install -y /tmp/rstudio-server-rhel-1.2.1335-x86_64.rpm"
  - "yum -y install R-RODBC R-base R-core-devel R-devel R-Rcpp R-car R-core R-DBI R-RInside libquadmath --enablerepo=\"epel\" "
  - "[[ ! -e /mnt/var/lib/hadoop/tmp/.fixed ]] && { chmod 777 -R /mnt/var/lib/hadoop/tmp/ && touch /mnt/var/lib/hadoop/tmp/.fixed ; }"
  - "[[ ! -e /tmp/r_javareconf ]] && { R CMD javareconf && touch /tmp/r_javareconf; } "
  - "ldconfig -p | grep -E 'quad|gfort'|cut -d '>' -f2|tr -d ' '|xargs -I % bash -c 'ln -s % /usr/lib64/R/lib/$(basename %|sed \"s,.so.*,.so,g\")'"
  - "[ ! -e /usr/lib64/libgomp.spec ] && ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgomp.spec /usr/lib64/libgomp.spec"
  - "[ ! -e /usr/lib64/libgomp.a ] && ln -s /usr/lib/gcc/x86_64-amazon-linux/6.4.1/libgomp.a /usr/lib64/libgomp.a"
  - "for p in statmod;do [[ ! -e /usr/lib/gcc/x86_64-amazon-linux/6.4.1/${p} ]] &&  R -q -e \"install.packages('${p}', repos='http://cran.rstudio.com/')\"; done"
  - "python3.6 -c 'import rpy2' || { yum -y install libffi libffi-devel; pip-3.6 install rpy2; }"

Comments (8)

  1. Christina Bogdan

    I am seeing the same issue with rpy2 3.1.0. importing rpy2.robjects gives me this error today. i used the same environment definition yesterday and was not having this issue.

  2. Laurent Gautier
    • changed status to open

    I just saw that Travis builds broke, seemingly because of this, yesterday. I cannot reproduce locally (on my laptop) though.

  3. Laurent Gautier

    I downgraded version to 2.9.5 and it’s working (while none of 3.x )

    Downgrading cffi to <1.13.0, or use the API mode as mentioned above, would seem like much better workarounds. rpy2-2.9.x is no longer under development and the latest (3.2.x benefits from better compatibility with latest releases of R and packages, as well as bug fixes).

  4. Log in to comment