0

Software info:

  • Linux Kernel: 4.14.83-1-MANJARO
  • R: 3.5.1
  • Rcpp: 1.0.0
  • g++ g++ (GCC) 8.2.1 20180831

I'm trying to install the later package from CRAN, but it fails due to a compilation error and I can't figure out whether there is something wrong with my own configuration or the package. The installation stops after the call

g++ -I"/usr/include/R/" -DNDEBUG -pthread -DTHREADS_H_SUPPORT=1 -I"/home/karpfen/R-libs/Rcpp/include" -I"/usr/lib/R/library/BH/include" -D_FORTIFY_SOURCE=2 -fopenmp -fpic -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -c timestamp_win32.cpp -o timestamp_win32.o

with the error message

make: *** No rule to make target '-fopenmp', needed by 'later.so'. Stop.

Rcpp and other packages depending on it work as expected. Is there anything that I could be doing wrong here? I tried reinstalling R + packages already, but no changes here.

Edit:

The first few lines of the installation output are

* installing *source* package ‘later’ ...
** package ‘later’ successfully unpacked and MD5 sums checked
Running configure script
Using CC=gcc
Using CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt
Using CPPFLAGS=-D_FORTIFY_SOURCE=2
C11-style threads.h support detected.

Edit2:

System information (from /etc/lsb-release)

DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=18.0.0
DISTRIB_CODENAME=Illyria
DISTRIB_DESCRIPTION="Manjaro Linux"
karpfen
  • 489
  • 8
  • 19
  • 1
    When installing the package, before it started compilation, it should have also should have had output like `Using CC=... Using CFLAGS=... Using CPPFLAGS=...`. What did that part say? – duckmayr Nov 30 '18 at 13:06
  • Thanks for the hint, I added it to the question. – karpfen Nov 30 '18 at 13:10
  • 1
    Well, something on _your system_ (that you told us little about: what distro is it?) and the assumption of the `later` author do not mesh. But `-fopenmp` is never a `make` target, it is typically something filled in by R itself based on its compile-time settings -- your can grep R's own `Makeconf` for it. – Dirk Eddelbuettel Nov 30 '18 at 13:11
  • 1
    @DirkEddelbuettel is right, you should put what system you're using; I happened to catch that it's Manjaro, but you should make that explicit (and mention which edition you've got). It might be related to [this Stack Overflow post](https://stackoverflow.com/questions/32233074/no-rule-to-make-target-openmp) – duckmayr Nov 30 '18 at 13:16
  • 1
    Nice catch by @duckmayr. Looks like the flags get built the wrong way. You may get by editing either `configure` or `src/Makevars.in`, and you may to raise an issue [here](https://github.com/r-lib/later). – Dirk Eddelbuettel Nov 30 '18 at 13:21
  • Thanks for the pointers, I'll try and see if I can get it to run now. I added the distribution info as well. – karpfen Nov 30 '18 at 13:33
  • Oddly my Ubuntu box gets `C11-style threads.h support not detected. Using tinycthread library.` but it all builds and installs (and `-DBOOST_NO_AUTO_PTR` in `~/.R/Makevars` helps quieten it). – Dirk Eddelbuettel Nov 30 '18 at 14:50
  • 1
    Nice, disabling the line `$(SHLIB): @libs@` in `Makevars.in` worked for me. Although I hope this won't break anything further down the line. Thanks so much! – karpfen Nov 30 '18 at 15:38
  • 1
    @DirkEddelbuettel Same on m Debian testing machine. According to https://stackoverflow.com/questions/22875545/c11-gcc-threads-h-not-found C11 style threading is only available with glibc 2.28, which is only in Debian unstable. I wonder why threading from *C11* instead of *C++11* is used. – Ralf Stubner Dec 01 '18 at 08:13
  • @karpfem If I were you I'd spend the extra ten minutes trying to make it work, and then see what causes it: _either_ you distro R build brings a bad value from its `Makeconf`, or `later` does something bad. But the `configure` script in `later` is so minimal that I can basically rule that out. In short, try to make a working version "by hand", infer where the system failed. None of us seem to have the C11 threads library so we cannot replicate. – Dirk Eddelbuettel Dec 01 '18 at 14:23
  • Oh, you didn't tell us you already filed it: https://github.com/r-lib/later/issues/71 See also https://github.com/r-lib/later/issues/77 there -- it is being contemplated to make the build simpler. I think it is becoming clearer that your error comes from your distro. Examine your `Makeconf` for its flags. – Dirk Eddelbuettel Dec 01 '18 at 14:48

0 Answers0