ecr2 icon indicating copy to clipboard operation
ecr2 copied to clipboard

rt::rmake will crash when trying to install the package

Open kerschke opened this issue 4 years ago • 0 comments

I am quite sure this issue is not really an issue of ecr2 but rather of some other functionalities of R, but as this is so far the only package, where I ran into this issue, I will post it here. Maybe you have some clue on what's going (wr)on(g).

So, here's the problem: if I clone the repository and install it using devtools::install_local(".", force = TRUE) or remotes::install_local(".", force = TRUE) everything works just as expected. However, usually I am not using devtools or remotes but rt to maintain my R-packages. Unfortunately, when running rt::rmake("."), the installation will fail. In fact, if I run it from R-studio, it will even crash!

In an attempt to localize the error, I executed all the code lines of rmake (and in the functions called within this function) step-by-step until I got to the point where it crashed. So, here's the order of commands to where I got: Starting within rmake(".") the line rt:::updatePackageAttributes(path = pkgdir) was producing the error. Therein, the error has been produced by pkgload::load_all(path) and therein out$dll <- pkgload:::load_dll(path). This function contains a for-loop and within that for-loop, it is tested whether the dll-file "src/ecr.so" exists (which is TRUE) and afterwards, R tries to load it dllinfo <- dyn.load(dllfile) -- and crashes. So, apparently the problem is that dyn.load("src/ecr.so") is not working properly.

Of course, I also tried to remove the problematic file and then run the code lines again, but until rmake reached the problematic code lines, the so-file had already been re-produced again. Another thing I tried was running first one of the two working alternatives (devtools::install_local(".", force = TRUE) or remotes::install_local(".", force = TRUE)) and re-running rmake afterwards (as we now should have a valid so-file), but this didn't help either..

Long story short: I have no clue, why R is crashing when trying to load the dynamic-file "src/ecr.so"...

kerschke avatar May 01 '20 21:05 kerschke