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

Problem installing RMINC on Mac #320

Open
christianlimberger opened this issue Nov 19, 2023 · 7 comments
Open

Problem installing RMINC on Mac #320

christianlimberger opened this issue Nov 19, 2023 · 7 comments

Comments

@christianlimberger
Copy link

Hi everyone,

I'm having this problem installing RMINC on macOS:

> Sys.setenv(MINC_PATH = "/opt/minc/1.9.18/")
> devtools::install_github("Mouse-Imaging-Centre/RMINC")

Downloading GitHub repo Mouse-Imaging-Centre/RMINC@HEAD
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/r5/3gw0g1y93rdg5ddhcgcscylc0000gn/T/RtmpArIFq9/remotes15d3292203f0/Mouse-Imaging-Centre-RMINC-edfa0f4/DESCRIPTION’ ...
─  preparing ‘RMINC’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘RMINC/etc’
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘RMINC_1.5.3.0.tar.gz’
   
* installing *source* package ‘RMINC’ ...
** using staged installation
checking for gcc... clang -arch arm64
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang -arch arm64 accepts -g... yes
checking for clang -arch arm64 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ -arch arm64 -std=gnu++17 accepts -g... yes
checking how to run the C preprocessor... clang -arch arm64 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
configure: Searching for libminc
configure: MINC_PATH was specified
configure: MINC_PATH set to /opt/minc/1.9.18/
configure: override by setting the environment variable MINC_PATH
configure: or by setting --with-build-path as a configure argument
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for h5cc... /opt/homebrew/bin/h5cc
checking for HDF5 libraries... yes (version 1.14.3)
checking hdf5.h usability... yes
checking hdf5.h presence... yes
checking for hdf5.h... yes
checking for H5Fcreate in -lhdf5... yes
checking for main in -lhdf5_hl... yes
checking for matching HDF5 Fortran wrapper... no
checking for mifree_name in -lminc2... no
configure: error: minc2 not found
ERROR: configuration failed for package ‘RMINC’
* removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RMINC’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/r5/3gw0g1y93rdg5ddhcgcscylc0000gn/T//RtmpArIFq9/file15d3247007034/RMINC_1.5.3.0.tar.gz’ had non-zero exit status

I have set the MINC_PATH and also have done the recommended steps here https://github.com/Mouse-Imaging-Centre/RMINC/blob/master/INSTALL

Do you have any idea how to solve this? Thank you!

@bsantyr
Copy link

bsantyr commented Dec 13, 2023

I'm having a similar issue on M1 Mac OS 14.2.

Any solution?

Here is my error log.

devtools::install_github("Mouse-Imaging-Centre/RMINC")
Downloading GitHub repo Mouse-Imaging-Centre/RMINC@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────
checking for file ‘/private/var/folders/r9/yw_30hyx3ydfbfl42jfpq5240000gn/T/RtmpeQQtRa/remotes86b92033e3d3/Mouse-Imaging-Centre-RMINC-edfa0f4/DESCRIPTION’ ..✔ checking for file ‘/private/var/folders/r9/yw_30hyx3ydfbfl42jfpq5240000gn/T/RtmpeQQtRa/remotes86b92033e3d3/Mouse-Imaging-Centre-RMINC-edfa0f4/DESCRIPTION’
─ preparing ‘RMINC’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ running ‘cleanup’
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
Removed empty directory ‘RMINC/etc’
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘RMINC_1.5.3.0.tar.gz’

  • installing source package ‘RMINC’ ...
    ** using staged installation
    checking for gcc... /usr/local/bin/gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether /usr/local/bin/gcc accepts -g... yes
    checking for /usr/local/bin/gcc option to accept ISO C89... none needed
    checking whether we are using the GNU C++ compiler... yes
    checking whether clang++ -arch arm64 -std=gnu++17 accepts -g... yes
    checking how to run the C preprocessor... /usr/local/bin/gcc -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... rm: conftest.dSYM: is a directory
    rm: conftest.dSYM: is a directory
    yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    configure: Searching for libminc
    configure: MINC_TOOLKIT was specified
    configure: MINC_PATH set to /opt/minc/1.9.18
    configure: override by setting the environment variable MINC_PATH
    configure: or by setting --with-build-path as a configure argument
    checking zlib.h usability... yes
    checking zlib.h presence... yes
    checking for zlib.h... yes
    checking for h5cc... /opt/minc/1.9.18/bin/h5cc
    checking for HDF5 libraries... clang: error: unknown argument: '-show'
    clang: error: unknown argument: '-show'
    clang: error: unknown argument: '-showconfig'
    clang: error: unknown argument: '-showconfig'
    clang: error: unknown argument: '-showconfig'
    yes (version )
    checking hdf5.h usability... no
    checking hdf5.h presence... no
    checking for hdf5.h... no
    checking for H5Fcreate in -lhdf5... no
    configure: WARNING: Unable to compile HDF5 test program
    checking for main in -lhdf5_hl... no
    checking for matching HDF5 Fortran wrapper... no
    checking for mifree_name in -lminc2... no
    configure: error: minc2 not found
    ERROR: configuration failed for package ‘RMINC’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RMINC’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/r9/yw_30hyx3ydfbfl42jfpq5240000gn/T//RtmpeQQtRa/file86b9a19f2c5/RMINC_1.5.3.0.tar.gz’ had non-zero exit status

@ZaidaEMtzMo
Copy link

Same issue. I even managed to get past the checking for HDF5 libraries... cc: error: unrecognized command line option '-show' cc: error: unrecognized command line option '-show' by installing everything in a conda environment and then installing hdf5 there:

conda install -c conda-forge hdf5

However, I still get the error configure: error: minc2 not found
This is not on Mac though, this is on Linux: Ubuntu 20.04.6 LTS

This is the full error message:

> remotes::install_github("Mouse-Imaging-Centre/RMINC")
Using GitHub PAT from the git credential store.
Downloading GitHub repo Mouse-Imaging-Centre/RMINC@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpPPZgHD/remotes13033a4c0263a/Mouse-Imaging-Centre-RMINC-edfa0f4/DESCRIPTION’ ...
─  preparing ‘RMINC’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Removed empty directory ‘RMINC/etc’
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘RMINC_1.5.3.0.tar.gz’
   
Installing package into ‘/export04/data/zaida/home/R/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘RMINC’ ...
** using staged installation
checking for x86_64-conda-linux-gnu-gcc... /export04/data/conda/envs/Rstats/bin/x86_64-conda-linux-gnu-cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /export04/data/conda/envs/Rstats/bin/x86_64-conda-linux-gnu-cc accepts -g... yes
checking for /export04/data/conda/envs/Rstats/bin/x86_64-conda-linux-gnu-cc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /export04/data/conda/envs/Rstats/bin/x86_64-conda-linux-gnu-c++ accepts -g... yes
checking how to run the C preprocessor... /export04/data/conda/envs/Rstats/bin/x86_64-conda-linux-gnu-cpp
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for a sed that does not truncate output... sed
checking for gawk... gawk
configure: Searching for libminc
checking "Checking for  (MINC_BUILD_PATH)"... no
checking Checking for /opt/minc-itk4/... no
checking Checking for /opt/minc/... yes
configure: MINC_PATH set to /opt/minc
configure: override by setting the environment variable MINC_PATH
configure: or by setting --with-build-path as a configure argument
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for h5cc... /export04/data/conda/envs/Rstats/bin/h5cc
checking for HDF5 libraries... yes (version 1.14.3)
checking hdf5.h usability... yes
checking hdf5.h presence... yes
checking for hdf5.h... yes
checking for H5Fcreate in -lhdf5... yes
checking for main in -lhdf5_hl... yes
checking for matching HDF5 Fortran wrapper... /export04/data/conda/envs/Rstats/bin/h5fc
checking for mifree_name in -lminc2... no
configure: error: minc2 not found
ERROR: configuration failed for package ‘RMINC’
* removing ‘/export04/data/zaida/home/R/library/RMINC’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpPPZgHD/file13033a6c91d73f/RMINC_1.5.3.0.tar.gz’ had non-zero exit status

@vfonov
Copy link
Contributor

vfonov commented May 11, 2024

you can try conda install -c minc-forge r-rminc-sa - that will install RMINC and libminc but it supports only R versions 4.2.3 and 4.1.3

@hannalemmik
Copy link

I have an R environment with r-base 4.2.3 and conda install -c minc-forge r-rminc-sa fails with PackagesNotFoundError: The following packages are not available from current channels:

  • r-rminc-sa

Any tips?

@vfonov
Copy link
Contributor

vfonov commented May 21, 2024

ok, my bad here, I forgot to compile r-rminc-sa for mac, but now I don't have a mac anymore.

You can still try installing conda install -c minc-forge minc-toolkit-v2 that have binaries for osx-arm64 and then install RMINC with remotes::install_github("Mouse-Imaging-Centre/RMINC")

@hannalemmik
Copy link

No luck for me: PackagesNotFoundError: The following packages are not available from current channels:

  • minc-toolkit-v2

@vfonov
Copy link
Contributor

vfonov commented May 22, 2024

No luck for me: PackagesNotFoundError: The following packages are not available from current channels:

  • minc-toolkit-v2

Are you using Mac with ARM silicone ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants