Problem installing rpy2 with R version 3.1.0

Issue #183 resolved
Andrew Shinohara created an issue

When I try to install rpy2 in Ubuntu with R 3.1.0 installed, I encounter the following error:

"/usr/lib/R/bin/R" CMD config --ldflags
Invalid substring
-fopenmp
in string
-Wl,--export-dynamic -fopenmp  -L/usr/lib/R/lib -lR -lpcre -llzma -lbz2 -lrt -ldl -lm
Problem while running `"/usr/lib/R/bin/R" CMD config --ldflags`

Comments (9)

  1. Kevin Jacobs

    I have a patch for this issue almost ready. The OpenMP directive is confusing the setup.py logic.

  2. Kevin Jacobs
    --- rpy2-2.3.9/setup.py 2014-01-26 21:21:42.000000000 +0000
    +++ rpy2-2.3.9-fixed/setup.py   2014-04-03 21:34:36.466572282 +0000
    @@ -271,14 +271,15 @@
                                  '^-I(?P<include_dirs>[^ ]+)$',
                                  '^(?P<framework_dirs>-F[^ ]+?)$',
                                  '^(?P<frameworks>-framework [^ ]+)$',
    -                             '^(?P<extra_link_args>-Wl[^ ]+)$')
    +                             '^(?P<extra_link_args>-Wl[^ ]+)$',
    +                             '^(?P<extra_link_args>-f[^ ]+)$')
             pp = [re.compile(x) for x in possible_patterns]
             # sanity check of what is returned into rconfig
             rconfig_m = None
             span = (0, 0)
             rc = RConfig()
    
    -        for substring in re.split('(?<!-framework) ', string):
    +        for substring in re.split('(?<!-framework) +', string):
                 ok = False
                 for pattern in pp:
                     rconfig_m = pattern.match(substring)
    
  3. Laurent Gautier

    @bioinformed Super. Can you fork-and-make-a-pull-request ? (saves me the trouble of copy pasting diff output and enshrines your contribution in the code history).

  4. matthjw

    Thanks for sorting this -- any chance of a release? It's a bit of a showstopper as it prevents install as of 2.3.9

  5. Laurent Gautier

    The branch version_2.4.x is now also fixed (the parsing of config option should be able to better handle extra arguments for the linker).

  6. Log in to comment