ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

Unable to install ANTsRCore from source on Mac OS 10.15.2 using R 3.6.1 #295

Closed mattwarkentin closed 4 years ago

mattwarkentin commented 4 years ago

Hi,

I am trying to build the necessary R packages from source. I cloned the ITKR, ANTsRCore, and ANTsR repos. I then began to R CMD INSTALL ... them. ITKR installed fine. However, during the ANTsRCore build, I immediately getting the following error when running R CMD INSTALL ANTsRCore:

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library’
* installing *source* package ‘ANTsRCore’ ...
** using staged installation
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
darwin19 1
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.16.2/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/Library/Developer/CommandLineTools/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/matt/Desktop/ANTsRCore/src/antb/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/make cmTC_da65e/fast && make -f CMakeFiles/cmTC_da65e.dir/build.make CMakeFiles/cmTC_da65e.dir/build
    CMakeFiles/cmTC_da65e.dir/flags.make:6: *** missing separator.  Stop.
    make: *** [cmTC_da65e/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:66 (project)

-- Configuring incomplete, errors occurred!
See also "/Users/matt/Desktop/ANTsRCore/src/antb/CMakeFiles/CMakeOutput.log".
See also "/Users/matt/Desktop/ANTsRCore/src/antb/CMakeFiles/CMakeError.log".
CMake Warning:
  Value of CMAKE_CXX_FLAGS contained a newline; truncating

CMake Warning:
  Value of CMAKE_C_FLAGS contained a newline; truncating

** libs
Makevars:3: *** missing separator.  Stop.
ERROR: compilation failed for package ‘ANTsRCore’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/ANTsRCore’

I'm sure there is probably useful information in this error message to debug the issue, but I am not familiar enough with cmake to know how to solve it. Thanks for your help.

gdevenyi commented 4 years ago

OSX 10.15 is known to have broken a number of things in the OSX build system for many users. This is not a specific issue to ANTs and/or ITK.

cookpa commented 4 years ago

Possibly helpful: https://github.com/ANTsX/ANTsR/issues/291

muschellij2 commented 4 years ago

Also - CMAKE_CXX_FLAGS having a newline may be something in your setup.

mattwarkentin commented 4 years ago

Thanks all.

@muschellij2 An issue with my setup? I have done nothing except git clone ... and R CMD INSTALL .... Should I need to do additional configuration?

muschellij2 commented 4 years ago

This indicates you may have something on your machine that's customized.

-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- broken
CMake Error at /usr/local/Cellar/cmake/3.16.2/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

You should also consider R 3.6.2 as noted in https://github.com/ANTsX/ANTsR/issues/291

mattwarkentin commented 4 years ago

Okay, not sure why that would be the case.

Okay, I guess today is the day I finally make the upgrade. Thanks for the suggestions.

muschellij2 commented 4 years ago

Seems as though this may be useful: https://github.com/PointCloudLibrary/pcl/issues/2601#issuecomment-525750226

Changed the osx_image and probably going to see failures: https://travis-ci.org/muschellij2/ANTsRCore/jobs/645574698