Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
22 stars 17 forks source link

Problem installing RMINC on Mac #320

Open christianlimberger opened 7 months ago

christianlimberger commented 7 months ago

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 commented 6 months ago

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’

ZaidaEMtzMo commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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:

vfonov commented 1 month ago

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 commented 1 month ago

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

vfonov commented 1 month ago

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

  • minc-toolkit-v2

Are you using Mac with ARM silicone ?