rbchan / unmarked

R package for hierarchical models in ecological research
https://rbchan.github.io/unmarked/
36 stars 25 forks source link

Fails to compile when using update.packages() on Ubuntu Linux #237

Closed PowellWheeler closed 2 years ago

PowellWheeler commented 2 years ago

Reports the following error on Ubuntu 22.04 when trying to update from 1.2.3 to 1.2.5:

: No such file or directory
/usr/bin/ld: cannot find Goodbye!: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: unmarked.so] Error 1
ERROR: compilation failed for package ‘unmarked’
* removing ‘/usr/local/lib/R/site-library/unmarked’
* restoring previous ‘/usr/local/lib/R/site-library/unmarked’
Warning in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl,  :
  installation of package ‘unmarked’ had non-zero exit status

Also produces a very similar error on Ubuntu 20.04

kenkellner commented 2 years ago

I'm on up-to-date 22.04 and was just able to install 1.2.5 successfully with install.packages(). Github's 20.04 install we use for continuous integration also had no problems with it. Have you made any modifications to your ~/.R/Makevars file?

If you are willing to risk your current working install of unmarked (maybe first copy it out of the R libraries directory?) I'd suggest uninstalling and reinstalling instead of using update.packages to see if that helps. Also I would suggest making sure TMB, Rcpp, RcppArmadillo, and RcppEigen packages are all updated first, before you try to update unmarked.

If none of that works I'd probably have to see more of the compiler output.

PowellWheeler commented 2 years ago

I tried your suggestions but they did not help. Then I ran R with --vanilla from the command line. Then I was able to install with no problems. I've changed a configuration file somewhere that was causing the problem. Thanks