Problem Installing openMC with macOS M3Pro

hello,

I am having some difficulties installing openMC. I tried initially with conda, but it didn’t end up fully installing. Now, I’ve been trying with source, and I thought was able to successfully install, but when I tried to run the file, there was issues with producing the plot, where I got this error below.

I ended up coming here and I found out that I needed to do another extra step in the installation, so I ended up installing again using the same method as before, following the steps described in both of these:
https://docs.openmc.org/en/v0.12.1/quickinstall.html#installing-from-source-on-linux-or-mac-os-x
https://docs.openmc.org/en/v0.12.1/usersguide/install.html#build-configuration

I followed the instructions to a T but when I try to do “cmake …” I get this error.


If anyone can please help, I would really appreciate it!!

First: Instead of sending a screenshot, copy or paste the text here, it will be easier for us to look for information to help you.

Second: are you using a old version of OpenMC (0.12.0)?
Please consider using the latest version: 0.15.0
Maybe you are using the newer version, but the documentation link you sent is for the old version, please follow the updated documentation.

Third: can you share the “install script” that you use? Or the step by step how did you install OpenMC?

Fourth: The message you received is an architectural error, which is that your processor is ARM64 and was running an x86_64 binary

Where is the documentation for the newer version?
here is the error:
(base) eiriniklemes@MacBook-Pro-8 ~ % cd openmc
(base) eiriniklemes@MacBook-Pro-8 openmc % git checkout master
branch ‘master’ set up to track ‘origin/master’.
Switched to a new branch ‘master’
(base) eiriniklemes@MacBook-Pro-8 openmc % mkdir build && cd build
(base) eiriniklemes@MacBook-Pro-8 build % cmake …
– The C compiler identification is AppleClang 15.0.0.15000309
– The CXX compiler identification is Clang 18.1.8
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /opt/homebrew/bin/mpicc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++
– Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
The C++ compiler

"/opt/homebrew/opt/llvm/bin/clang++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: '/Users/eiriniklemes/openmc/build/CMakeFiles/CMakeScratch/TryCompile-pqKvcU'

Run Build Command(s): /opt/homebrew/Cellar/cmake/3.30.0/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_fdbcd/fast
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_fdbcd.dir/build.make CMakeFiles/cmTC_fdbcd.dir/build
Building CXX object CMakeFiles/cmTC_fdbcd.dir/testCXXCompiler.cxx.o
/opt/homebrew/opt/llvm/bin/clang++   -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -MD -MT CMakeFiles/cmTC_fdbcd.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_fdbcd.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_fdbcd.dir/testCXXCompiler.cxx.o -c /Users/eiriniklemes/openmc/build/CMakeFiles/CMakeScratch/TryCompile-pqKvcU/testCXXCompiler.cxx
Linking CXX executable cmTC_fdbcd
/opt/homebrew/Cellar/cmake/3.30.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fdbcd.dir/link.txt --verbose=1
/opt/homebrew/opt/llvm/bin/clang++  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/Cellar/qt/6.3.1_1/lib  CMakeFiles/cmTC_fdbcd.dir/testCXXCompiler.cxx.o -o cmTC_fdbcd
ld: warning: directory not found for option '-L/opt/homebrew/Cellar/qt/6.3.1_1/lib'
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/lib/libc++.tbd' for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_fdbcd] Error 1
make: *** [cmTC_fdbcd/fast] Error 2

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

and this is what I did:

  1. export CXX=/opt/homebrew/opt/llvm/bin/clang++
  2. git clone --recurse-submodules GitHub - openmc-dev/openmc: OpenMC Monte Carlo Code
  3. cd openmc
  4. git checkout master
  5. mkdir build && cd build
  6. cmake …
    and then I get the error

About documentation, I will split the link you send:

https://docs.openmc.org/
en/
v0.12.1/
quickinstall.html

As you can see, is about version v0.12.1

But use the command git checkout masterthat change the git repository to the version “stable” (today is v0.15.0)

You can just change the link to “stable” version, like this:

https://docs.openmc.org/
en/
stable/
quickinstall.html

Or you can select the version here:

Select stable:

As you can see, the error is in LD, can’t link with QT:

If you follow the stable documentation, they put the folowing pakages as prerequisites on macOS:

brew install llvm cmake xtensor hdf5 python libomp libpng

You can try folowing the docummentation first, but in my opinion your error is because don’t have QT installed. So maybe this can solve your problem:

brew install qt

thank you for your help and the information. I did brew install qt, but im still receiving the same error message when I do cmake …

this is the error message:

– The C compiler identification is AppleClang 15.0.0.15000309
– The CXX compiler identification is Clang 18.1.8
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++
– Check for working CXX compiler: /opt/homebrew/opt/llvm/bin/clang++ - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
The C++ compiler

"/opt/homebrew/opt/llvm/bin/clang++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: '/Users/eiriniklemes/openmc/build/CMakeFiles/CMakeScratch/TryCompile-NLZsqQ'

Run Build Command(s): /opt/homebrew/Cellar/cmake/3.30.0/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_0d6ac/fast
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_0d6ac.dir/build.make CMakeFiles/cmTC_0d6ac.dir/build
Building CXX object CMakeFiles/cmTC_0d6ac.dir/testCXXCompiler.cxx.o
/opt/homebrew/opt/llvm/bin/clang++   -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -MD -MT CMakeFiles/cmTC_0d6ac.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_0d6ac.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_0d6ac.dir/testCXXCompiler.cxx.o -c /Users/eiriniklemes/openmc/build/CMakeFiles/CMakeScratch/TryCompile-NLZsqQ/testCXXCompiler.cxx
Linking CXX executable cmTC_0d6ac
/opt/homebrew/Cellar/cmake/3.30.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0d6ac.dir/link.txt --verbose=1
/opt/homebrew/opt/llvm/bin/clang++  -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/Cellar/qt/6.3.1_1/lib  CMakeFiles/cmTC_0d6ac.dir/testCXXCompiler.cxx.o -o cmTC_0d6ac
ld: warning: directory not found for option '-L/opt/homebrew/Cellar/qt/6.3.1_1/lib'
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/lib/libc++.tbd' for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cmTC_0d6ac] Error 1
make: *** [cmTC_0d6ac/fast] Error 2

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