Makevars cannot find libguile.h but the file exists

32 Views Asked by At

I would like to be able to use Guile from within R but I don't want RcppGuile::call_guile taking so long to initialize Guile every time. Ideally, Guile could initialize into a reusable object on the R side given a source file. I wanted to poke around to see if that could be simple to do. Unfortunately, I don't really understand how Makevars is supposed to work and so cannot even get the package to load when calling from devtools::load_all().

I think the problem is that RcppGuile Makevars are hardcoded for Debian based GNU/Linux systems. I am running GNU/Guix which works differently.

I tried modifying the Makevars to be:

PKG_CXXFLAGS = -I"/home/wdkrnls/my/system/rstats/include/guile/3.0"
PKG_LIBS = -lguile-3.0 -lgc

Then I tried to run devtools::load_all().

Unfortunately, it didn't work.

file/site-library/Rcpp/include' -I/usr/local/include  -I"/gnu/store/w8wd314qgq3r3nd73imr7amzs8cz4fnp-profile/include:/home/wdkrnls/my/system/rstats/include/guile/3.0" -fpic  -g -O2  -UNDEBUG -Wall -pedantic -g -O0 -fdiagnostics-color=always -c guile.cpp -o guile.o
   guile.cpp:4:10: fatal error: libguile.h: No such file or directory
       4 | #include <libguile.h>
         |          ^~~~~~~~~~~~
   compilation terminated.

Yet:

file.exists("/home/k/my/system/rstats/include/guile/3.0/libguile.h") # => TRUE

Then I tried to modify Makevars with instead:

PKG_CXXFLAGS = -I"../include/guile/3.0"
PKG_LIBS = -lguile-3.0 -lgc

But I got the same result with only the path changing. Can someone give me a hint as to what I am missing?

0

There are 0 best solutions below