Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fail with devtools #377

Open
ptsii opened this issue Jan 14, 2023 · 5 comments
Open

Installation fail with devtools #377

ptsii opened this issue Jan 14, 2023 · 5 comments
Labels

Comments

@ptsii
Copy link

ptsii commented Jan 14, 2023

I just tried to build ANTsR from within R doing:

> library(devtools)
> install_github("stnava/cmaker")
> install_github("stnava/ANTsR")

It seemed to compile fine, but then failed on the install:

installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘ANTsR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so, 0x0006): symbol not found in flat namespace (_composeDisplacementFields)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/ANTsR’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/22/g163kh494cj0yrk3fqkc13240000gq/T//RtmpbUSmYm/file49a5753f8886/ANTsR_0.5.7.5.tar.gz’ had non-zero exit status

This is a multi-user machine (OSX), but this was done from one of the accounts that has admin privileges.

Any ideas about what might have happened?

@ptsii
Copy link
Author

ptsii commented Jan 14, 2023

I'm not sure what this means (what caused the problem). It occurred twice FWIW. I ended up trying to install using Method 2 (from command line) listed here: https://github.com/ANTsX/ANTsR. That worked without errors.

@cookpa
Copy link
Member

cookpa commented Jan 16, 2023

Thanks for the workaround. I've not used cmaker in a long time - what version of cmake does it provide? If it's too old, that might be the cause of compilation problems.

@ptsii
Copy link
Author

ptsii commented Jan 16, 2023

I'm not sure how to check that - how do I check what version of cmaker it provides? That may well be the issue, because before trying the second method (command line install sequence using R CMD INSTALL), I in fact updated to the latest cmaker.

@cookpa
Copy link
Member

cookpa commented Jan 18, 2023

Looks like CMake 3.11 from here

https://github.com/stnava/cmaker/blob/master/DESCRIPTION

I think but I'm not sure that R CMD install uses system commands, so if you have a newer cmake in your environment, that might be why it works.

@cookpa
Copy link
Member

cookpa commented Mar 28, 2023

I have reproduced this error via Docker, when installing using devtools::install and remotes::install

#8 6553.4 Error: package or namespace load failed for ‘ANTsR’ in dyn.load(file, DLLpath = DLLpath, ...):
#8 6553.4  unable to load shared object '/usr/local/lib/R/site-library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so':
#8 6553.4   /usr/local/lib/R/site-library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so: undefined symbol: composeDisplacementFields
#8 6553.4 Error: loading failed
#8 6553.4 Execution halted

This is using R 4.0.5 and CMake 3.25.3, so I think it's not cmake.

@cookpa cookpa added the bug label May 11, 2023
@cookpa cookpa changed the title Installation fail Installation fail with devtools May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants