weizhouUMICH / SAIGE

GNU Lesser General Public License v3.0
188 stars 73 forks source link

Problems with installation: Fortran compiler broken and not cc1 #329

Closed corunesa closed 3 years ago

corunesa commented 3 years ago

Hello! I am trying to install SAIGE on my MAC Big Sur. I am using the environment, created as follows:

conda create -n RSAIGE r-essentials r-base=3.6.1 python=2.7 conda activate RSAIGE FLAGPATH=which python | sed 's|/bin/python$||' export LDFLAGS="-L${FLAGPATH}/lib" export CPPFLAGS="-I${FLAGPATH}/include" conda install -c anaconda cmake=3.14.0 conda install -c conda-forge gettext lapack r-matrix conda install -c r r-rcpp r-rcpparmadillo r-data.table r-bh conda install -c conda-forge r-spatest r-rcppeigen r-devtools r-skat r-rcppparallel r-optparse boost openblas pip3 install cget click conda env export > /Users/elena/Trabajo/SAIGE/environment-RSAIGE.yml_

When I run: devtools::install_github("weizhouUMICH/SAIGE"), I get several errors, mainly that the Fortran compiler is broken and can't find cc1. I don't know if anyone has experienced anything similar or can help me. Thank you very much!

-- The Fortran compiler identification is GNU 4.8.5 x86_64-apple-darwin13.4.0-gfortran: error trying to exec 'cc1': execvp: No such file or directory -- Checking whether Fortran compiler has -isysroot -- Checking whether Fortran compiler has -isysroot - no -- Checking whether Fortran compiler supports OSX deployment target flag -- Checking whether Fortran compiler supports OSX deployment target flag - yes -- Check for working Fortran compiler: /opt/anaconda3/envs/RSAIGE/bin/x86_64-apple-darwin13.4.0-gfortran -- Check for working Fortran compiler: /opt/anaconda3/envs/RSAIGE/bin/x86_64-apple-darwin13.4.0-gfortran -- broken CMake Error at /opt/anaconda3/envs/RSAIGE/share/cmake-3.14/Modules/CMakeTestFortranCompiler.cmake:45 (message): The Fortran compiler

"/opt/anaconda3/envs/RSAIGE/bin/x86_64-apple-darwin13.4.0-gfortran"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/opt/anaconda3/envs/RSAIGE/bin/make cmTC_3b46c/fast 
make -f CMakeFiles/cmTC_3b46c.dir/build.make CMakeFiles/cmTC_3b46c.dir/build
make[1]: Entering directory '/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/build/CMakeFiles/CMakeTmp'
Building Fortran object CMakeFiles/cmTC_3b46c.dir/testFortranCompiler.f.o
/opt/anaconda3/envs/RSAIGE/bin/x86_64-apple-darwin13.4.0-gfortran   -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe    -c /private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_3b46c.dir/testFortranCompiler.f.o
Linking Fortran executable cmTC_3b46c
/opt/anaconda3/envs/RSAIGE/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3b46c.dir/link.txt --verbose=1
/opt/anaconda3/envs/RSAIGE/bin/x86_64-apple-darwin13.4.0-gfortran  -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/opt/anaconda3/envs/RSAIGE/lib -L/opt/anaconda3/envs/RSAIGE/lib  -march=nocona -mtune=core2 -ftree-vectorize -fPIC -fstack-protector -O2 -pipe  CMakeFiles/cmTC_3b46c.dir/testFortranCompiler.f.o  -o cmTC_3b46c 
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_3b46c.dir/build.make:87: cmTC_3b46c] Error 1
make[1]: Leaving directory '/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_3b46c/fast] Error 2

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

-- Configuring incomplete, errors occurred! See also "/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/build/CMakeFiles/CMakeOutput.log". See also "/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/build/CMakeFiles/CMakeError.log". Command failed: ['/opt/anaconda3/envs/RSAIGE/bin/cmake', '-DCMAKE_TOOLCHAIN_FILE=/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/cget.cmake', u'/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/superlu-b6177d0b743c0f1f6765db535dd8b6ce30c00061', '-DCGET_CMAKE_DIR=/Users/elena/Library/Python/2.7/lib/python/site-packages/cget/cmake', '-DCGET_CMAKE_ORIGINAL_SOURCE_FILE=/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/build/tmp-b37f2cca5a554fe19f756db8d5f18ea0/superlu-b6177d0b743c0f1f6765db535dd8b6ce30c00061/cget_original_cmake_file__.cmake', '-DCMAKE_C_FLAGS=-fPIC', '-DCMAKE_CXX_FLAGS=-fPIC', '-DBUILD_TESTING=Off', '-DCMAKE_BUILD_TYPE=Release', u'-DCMAKE_INSTALL_PREFIX=/private/var/folders/7g/n31vv69d1g92264s6mgdt61w0000gn/T/RtmpjY8o15/R.INSTALL6f176a66faff/SAIGE/thirdParty/cget/cget/pkg/xiaoyelisuperlu/install'] Failed to build package xiaoyeli/superlu ERROR: configuration failed for package ‘SAIGE’

matuskosut commented 3 years ago

@corunesa if you are using conda, you might as well install directly r-saige:

conda install -c conda-forge -c bioconda r-saige

I have written up a bit about conda package in https://github.com/weizhouUMICH/SAIGE/issues/272

corunesa commented 3 years ago

I am extremely grateful to you. I had a week of errors... And in 10 seconds, with your link, everything was done! and running! Thank you, thank you very much!