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"...
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)orremotes::install_local(".", force = TRUE)everything works just as expected. However, usually I am not usingdevtoolsorremotesbutrtto maintain my R-packages. Unfortunately, when runningrt::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 linert:::updatePackageAttributes(path = pkgdir)was producing the error. Therein, the error has been produced bypkgload::load_all(path)and thereinout$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 isTRUE) and afterwards, R tries to load itdllinfo <- dyn.load(dllfile)-- and crashes. So, apparently the problem is thatdyn.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
rmakereached 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)orremotes::install_local(".", force = TRUE)) and re-runningrmakeafterwards (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"...