The API mode fails with R thinking it cannot load libraries.

Issue #583 resolved
Laurent Gautier created an issue

# Install both ABI and API
export RPY2_CFFI_MODE=BOTH
python setup.py install

export RPY2_CFFI_MODE=API
# rpy2 in API mode does not work

# export RPY2_CFFI_MODE=ABI
# rpy2 in ABI mode works

Tracing dynamic loading of libraries shows the following as the possible root of the problem.

      7236: 
      7236: calling init: /usr/local/packages/R/3.6/lib/R/library/methods/libs/methods.so
      7236: 

R version 3.6.1 Patched (2019-09-06 r77160) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

      7236: 
      7236: calling init: /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so
      7236: 
      7236: /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so: error: symbol lookup error: undefined symbol: gconv_end (fatal)
  Natural language support but running in an English locale

Comments (5)

  1. Laurent Gautier reporter

    The error

     /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so: error: symbol lookup error: undefined symbol: gconv_end (fatal)
      Natural language support but running in an English locale
    

    can also be seen when R is started from the command line, so may be this is not the root of the issue…

  2. Laurent Gautier reporter

    Initializing the embedded R while turning --quiet into --verbose gives:

    'verbose' and 'quietly' are both true; being verbose then ..
    now dyn.load("/usr/local/packages/R/3.6/lib/R/library/methods/libs/methods.so") ...
    
    R version 3.6.1 Patched (2019-09-06 r77160) -- "Action of the Toes"
    Copyright (C) 2019 The R Foundation for Statistical Computing
    Platform: x86_64-pc-linux-gnu (64-bit)
    
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.
    
      Natural language support but running in an English locale
    
    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.
    
    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.
    
    'verbose' and 'quietly' are both true; being verbose then ..
    'verbose' and 'quietly' are both true; being verbose then ..
    Error: package or namespace load failed for ‘utils’ in if (.identC(class1, class2) || .identC(class2, "ANY")) TRUE else {:
     missing value where TRUE/FALSE needed
    'verbose' and 'quietly' are both true; being verbose then ..
    Error: package or namespace load failed for ‘grDevices’ in if (.identC(class1, class2) || .identC(class2, "ANY")) TRUE else {:
     missing value where TRUE/FALSE needed
    'verbose' and 'quietly' are both true; being verbose then ..
    Garbage collection 1 = 0+0+1 (level 2) ... 
    11.8 Mbytes of cons cells used (35%)
    3.0 Mbytes of vectors used (5%)
    Error: package or namespace load failed for ‘graphics’ in if (.identC(class1, class2) || .identC(class2, "ANY")) TRUE else {:
     missing value where TRUE/FALSE needed
    'verbose' and 'quietly' are both true; being verbose then ..
    Error: package or namespace load failed for ‘stats’ in if (.identC(class1, class2) || .identC(class2, "ANY")) TRUE else {:
     missing value where TRUE/FALSE needed
    During startup - Warning messages:
    1: package ‘utils’ in options("defaultPackages") was not found 
    2: package ‘grDevices’ in options("defaultPackages") was not found 
    3: package ‘graphics’ in options("defaultPackages") was not found 
    4: package ‘stats’ in options("defaultPackages") was not found 
     ending setup_Rmainloop(): R_Interactive = 1 {main.c}
    

  3. Log in to comment