build fails in latest release

Issue #234 resolved
idella5 created an issue

Build of rpy-2.5.0 (in gentoo) yielded

./rpy/rinterface/_rinterface.c:785:20: note: gstate was declared here
   PyGILState_STATE gstate;
x86_64-pc-linux-gnu-gcc -shared -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -march=athlon64 -pipe -fomit-frame-pointer -Wall -O2 -fno-strict-aliasing /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0-python2_7/temp.linux-x86_64-2.7/./rpy/rinterface/_rinterface.o -L/usr/lib64 -lR -lpcre -llzma -lbz2 -lz -lrt -ldl -lm -lpython2.7 -o /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0-python2_7/lib/rpy2/rinterface/ -Wl,--export-dynamic -fopenmp -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lR
collect2: error: ld returned 1 exit status
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

On basic investigation we have ascertained that the previous version (rpy-2.4.4) builds fine, the is there and found by the build of rpy-2.4.4 and is not being picked up in the new release of rpy-2.5.0. It appears subsequent to the revamped

Comments (14)

  1. Laurent Gautier


    Where is "there" ? (path to

    Also, can you include more of the ouput ? (in particular the section where is printing the environment (CFLAGS, etc) used for the compilation.

  2. idella5 reporter
     * rpy2-2.5.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                             [ ok ]
     * checking ebuild checksums ;-) ...                                                                                                                                  [ ok ]
     * checking miscfile checksums ;-) ...                                                                                                                                [ ok ]
    >>> Unpacking source...
    >>> Unpacking rpy2-2.5.0.tar.gz to /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work
    >>> Source unpacked in /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work
    >>> Preparing source in /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0 ...
    >>> Source prepared.
    >>> Configuring source in /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0 ...
    >>> Source configured.
    >>> Compiling source in /mnt/gen2/TmpDir/portage/dev-python/rpy-2.5.0/work/rpy2-2.5.0 ...
     * python3_3: running distutils-r1_run_phase python_compile
     * python3_4: running distutils-r1_run_phase python_compile
     * python2_7: running distutils-r1_run_phase python_compile
    /usr/bin/python3.3 build
    /usr/bin/python3.4 build
    /usr/bin/python2.7 build
    R version 3.1.1 (2014-07-10) -- "Sock it to Me"
    /usr/lib64/R/bin/R CMD config --ldflags
    /usr/lib64/R/bin/R CMD config --cppflags
    running build
    running build_py

    says much of it I believe.

     ~/cvsPortage/gentoo-x86/dev-python/rpy $ qlist dev-lang/R | grep

    The build of the prior version finds it, the build of rpy-2.5.0 doesn't.

  3. Laurent Gautier

    I see.

    The printing of information for the compilation was also lost in the rewrite of

    Can you try the following and return the lines ~5-9 in the console output:

    pip install
  4. Laurent Gautier

    Odd that this is coming from rpy2 and not from thr way R in installed on your end.

    An immediate workaround is to have

  5. idella5 reporter

    But it is. R is just installed. It works fine in the build of 2.4.4 You've lost me. /usr/lib64/R/lib:${LD_LIBRARY_PATH} is hard coding to amd64 and therefore excludes x86. Also I presume you assume I know where and how to place this line. Sorry, I don't.

  6. Laurent Gautier

    Your linker does not know where is. I don'tbyhink rpy2 ever attempted at making an automatic resolution of this (you suggest that it did, my experience is that it did not - may be it did in your environment ?)

    Possible ways to address it are:

    • tell the linker about /usr/lib64/R/lib
    • link/copy to a place the linker knows about (presumably /usr/lib64 on one of you systems)
  7. idella5 reporter

    (you suggest that it did, my experience is that it did not -

    It works fine in the build of 2.4.4 in which the linker found in the build.

    I can paste you a log where the linker found it.

    Between the 2 releases, it can no longer be found. The above makes for an effective one off build by editing the linker in the system environment. I'm trying to bump the ebuild to the current release. It need work out of the box and build effectively for any given user.

  8. Laurent Gautier

    I think that I found the issue, and fixed it.

    Can you try again

    pip install


  9. idella5 reporter

    With patch

    testuser@archtester ~/cvsPortage/gentoo-x86/dev-python/rpy $ ebuild rpy-2.5.0.ebuild compile
    >>> Source compiled.

    C'est bon ca (add cedilla). Merci monsieur Gautier

  10. Log in to comment