ANTsR icon indicating copy to clipboard operation
ANTsR copied to clipboard

Installation error on Mac OS 12.6.3 with devtools

Open afni-gangc opened this issue 2 years ago • 11 comments

Describe the bug

Tried to install ANTsR with the command in R (version is 4.3.0) on MacBook Air (OS 12.6.3):

devtools::install_github('ANTsX/ANTsR')

It failed after two hours of compiling with the following error at the end:

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.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so': dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so, 0x0006): symbol not found in flat namespace (_composeDisplacementFields) Error: loading failed

To Reproduce Steps to reproduce the behavior:

  1. devtools::install_github('ANTsX/ANTsR')

Desktop (please complete the following information):

  • OS: iOS 12.6.3
  • R Version: 4.3.0

Additional context See attached text for the full installation log. ANTsR.install.error.txt

afni-gangc avatar May 19 '23 02:05 afni-gangc

Can you try installing it in steps?

> devtools::install_github('stnava/ITKR')
> devtools::install_github('ANTsX/ANTsRCore')
> devtools::install_github('ANTsX/ANTsR')

ntustison avatar May 19 '23 13:05 ntustison

Thanks!

After another two hours of installation, the first two commands worked, but the third one

devtools::install_github('ANTsX/ANTsR')

still failed. Still upload the log?

From: Nick Tustison @.> Date: Friday, May 19, 2023 at 9:26 AM To: ANTsX/ANTsR @.> Cc: Chen, Gang (NIH/NIMH) [E] @.>, Author @.> Subject: [EXTERNAL] Re: [ANTsX/ANTsR] Installation error on Mac OS 12.6.3 (Issue #387)

Can you try installing it in steps?

devtools::install_github('stnava/ITKR')

devtools::install_github('ANTsX/ANTsRCore')

devtools::install_github('ANTsX/ANTsR')

— Reply to this email directly, view it on GitHubhttps://github.com/ANTsX/ANTsR/issues/387#issuecomment-1554575761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPFE6MGLTJ5JMKPXLWS63TXG5YHHANCNFSM6AAAAAAYHGGTPU. You are receiving this because you authored the thread.Message ID: @.***> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.

afni-gangc avatar May 19 '23 15:05 afni-gangc

Is it still the same error?

ntustison avatar May 19 '23 15:05 ntustison

Looks like the same error:

** 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.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so':

dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/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.3-x86_64/Resources/library/ANTsR’

Warning message:

In i.p(...) :

installation of package ‘/var/folders/0z/m_31mkc564bbkx8hh2_wvrfc0000gx/T//RtmpTbtUP6/filefe6c43a65c9e/ANTsR_0.5.7.5.tar.gz’ had non-zero exit status

From: Nick Tustison @.> Date: Friday, May 19, 2023 at 11:37 AM To: ANTsX/ANTsR @.> Cc: Chen, Gang (NIH/NIMH) [E] @.>, Author @.> Subject: [EXTERNAL] Re: [ANTsX/ANTsR] Installation error on Mac OS 12.6.3 (Issue #387)

Is it still the same error?

— Reply to this email directly, view it on GitHubhttps://github.com/ANTsX/ANTsR/issues/387#issuecomment-1554765686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPFE6JNZS533SATJUCZA3LXG6HTXANCNFSM6AAAAAAYHGGTPU. You are receiving this because you authored the thread.Message ID: @.***> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.

afni-gangc avatar May 19 '23 15:05 afni-gangc

Same issue as #377 (on Linux).

cookpa avatar May 19 '23 16:05 cookpa

Thanks @cookpa

ntustison avatar May 19 '23 17:05 ntustison

Thanks for the pointer! Method 2 worked. However, when I tried to test the installation per the site https://gist.github.com/ntustison/12a656a5fc2f6f9c4494c88dc09c5621#brain-extraction, the following command

t1 <- antsImageRead( getANTsXNetData( 'mprage_hippmapp3r' ) )

led to error:

t1 <- antsImageRead( getANTsXNetData( 'mprage_hippmapp3r' ) )

Downloading data from https://ndownloader.figshare.com/files/24984689

Error in py_call_impl(callable, call_args$unnamed, call_args$named) :

Exception: URL fetch failure on https://ndownloader.figshare.com/files/24984689: None -- [SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1129)

Run reticulate::py_last_error() for details.

From: Nick Tustison @.> Date: Friday, May 19, 2023 at 1:53 PM To: ANTsX/ANTsR @.> Cc: Chen, Gang (NIH/NIMH) [E] @.>, Author @.> Subject: [EXTERNAL] Re: [ANTsX/ANTsR] Installation error on Mac OS 12.6.3 (Issue #387)

Thanks @cookpahttps://github.com/cookpa

— Reply to this email directly, view it on GitHubhttps://github.com/ANTsX/ANTsR/issues/387#issuecomment-1555031078, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPFE6KRPYWQRBC3URDVQ5TXG6XQ3ANCNFSM6AAAAAAYHGGTPU. You are receiving this because you authored the thread.Message ID: @.***> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.

afni-gangc avatar May 19 '23 18:05 afni-gangc

Maybe a local access issue. Try directly copying and pasting the url in your browser. Should download a nifti image.

ntustison avatar May 19 '23 18:05 ntustison

I believe the "UNSAFE_LEGACY_RENEGOTIATION_DISABLED" is a Python issue that will be fixed in a later version of Python (https://github.com/python/cpython/pull/93927).

Most users will probably just want to download manually, but other workarounds have been suggested online, including downgrading Python < 3.11. Reticulate can be made to use a specified conda environment if needed https://rstudio.github.io/reticulate/

cookpa avatar May 19 '23 19:05 cookpa

Thanks again @cookpa

ntustison avatar May 19 '23 20:05 ntustison

Confirming _composeDisplacementFields is an issue as well on MacOS on my end

muschellij2 avatar Oct 25 '23 19:10 muschellij2