tproffen / DiffuseCode

Suite of programs to simulate disordered and nanomaterials
Other
54 stars 21 forks source link

Error one-touch installation on Mac #24

Open JulesOpp opened 3 days ago

JulesOpp commented 3 days ago

Hello. I tried the One touch installation on a Mac (Apple M1 Pro running Ventura 13.2) (installed Globally with Conda deactivated), and received the following error. Is there a way to fix this?

-- The C compiler identification is GNU 14.2.0 -- The CXX compiler identification is GNU 14.2.0 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: /opt/homebrew/Cellar/gcc/14.2.0/bin/gcc-14 -- Check for working C compiler: /opt/homebrew/Cellar/gcc/14.2.0/bin/gcc-14 - broken CMake Error at /opt/homebrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler "/opt/homebrew/Cellar/gcc/14.2.0/bin/gcc-14" is not able to compile a simple test program. It fails with the following output: Change Dir: '/Users/NAME/DIFFUSE_INSTALL/develop/DiffuseBuild/CMakeFiles/CMakeScratch/TryCompile-XKldaM' Run Build Command(s): /opt/homebrew/Cellar/cmake/3.30.0/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_92094/fast /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_92094.dir/build.make CMakeFiles/cmTC_92094.dir/build CMakeFiles/cmTC_92094.dir/build.make:79: missing separator. Stop. make: [cmTC_92094/fast] Error 2

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

-- Configuring incomplete, errors occurred! CMake Warning: Value of CMAKE_CXX_COMPILER_ARG1 contained a newline; truncating

CMake Warning: Value of CMAKE_C_COMPILER_ARG1 contained a newline; truncating

JulesOpp commented 3 days ago

The solution to this particular error seems to be switching to the local installation, following the section 0.1 guidelines (source ./DIFFUSE_INSTALL/prepare_macos.sh, xcode-select –-install, brew upgrade gcc), and then reinstalling gcc (brew reinstall gcc).