Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems building molecularGSM in Apple Silicon (M2) #32

Open
mverissi opened this issue May 11, 2023 · 2 comments
Open

Problems building molecularGSM in Apple Silicon (M2) #32

mverissi opened this issue May 11, 2023 · 2 comments

Comments

@mverissi
Copy link

Dear all,

I tried building molecularGSM in my Macbook with M2 chip. I am using Intel OneAPI 2023.0.0 and cmake 3.26.0, and I'm configuring it for use with ORCA (-D GSM_ENABLE_ORCA=1). Unfortunately I get the error messages listed after this message. I'd appreciate help to get it compiled.

Best regards,

Marcos Verissimo Alves
Lund University

=========

`CMake Deprecation Warning at CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

Configuring GSM build directory

-- PROJECT_SOURCE_DIR='/Users/marcosverissimoalves/Software/molecularGSM'
-- PROJECT_BINARY_DIR='/Users/marcosverissimoalves/Software/molecularGSM/BUILD'
-- GSM_TRIBITS_DIR='/Users/marcosverissimoalves/Software/molecularGSM/cmake/tribits'
-- TriBITS_VERSION_STRING='0.9 (Dev)'
-- CMAKE_VERSION='3.26.0'
-- CMAKE_GENERATOR='Unix Makefiles'
-- CMAKE_HOST_SYSTEM_NAME='Darwin'
-- GSM_HOSTNAME='Marcoss-MacBook-Air.local'
-- PYTHON_EXECUTABLE='/Users/marcosverissimoalves/miniconda3/bin/python'

Setting up major user options ...

-- GSM_GENERATE_REPO_VERSION_FILE='OFF'

Reading list of native TPLs from /Users/marcosverissimoalves/Software/molecularGSM/TPLsList.cmake

-- GSM_NUM_TPLS='1'

Reading list of native packages from /Users/marcosverissimoalves/Software/molecularGSM/PackagesList.cmake

-- GSM_NUM_PACKAGES='1'

Processing Project, Repository, and Package dependency files and building internal dependencies graph ...

-- GSM_NUM_SE_PACKAGES='1'

Explicitly enabled packages on input (by user): gsm 1

Explicitly enabled SE packages on input (by user): gsm 1

Explicitly disabled packages on input (by user or by default): 0

Explicitly disabled SE packages on input (by user or by default): 0

Explicitly enabled TPLs on input (by user): 0

Explicitly disabled TPLs on input (by user or by default): 0

Disabling all packages that have a required dependency on disabled TPLs and optional package TPL support based on TPL_ENABLE_=OFF ...

Disabling subpackages for hard disables of parent packages due to GSM_ENABLE_<PARENT_PACKAGE>=OFF ...

Disabling forward required SE packages and optional intra-package support that have a dependency on disabled SE packages GSM_ENABLE_<TRIBITS_PACKAGE>=OFF ...

Enabling subpackages for hard enables of parent packages due to GSM_ENABLE_<PARENT_PACKAGE>=ON ...

Enabling all required (and optional since GSM_ENABLE_ALL_OPTIONAL_PACKAGES=ON) upstream SE packages for current set of enabled packages (GSM_ENABLE_SECONDARY_TESTED_CODE=OFF) ...

Enabling all optional intra-package enables <TRIBITS_PACKAGE>ENABLE that are not currently disabled if both sets of packages are enabled ...

Enabling all remaining required TPLs for current set of enabled packages ...

Enabling all optional package TPL support <TRIBITS_PACKAGE>ENABLE not currently disabled for enabled TPLs ...

Enabling TPLs based on <TRIBITS_PACKAGE>ENABLE=ON if TPL is not explicitly disabled ...

Set cache entries for optional packages/TPLs and tests/examples for packages actually enabled ...

Enabling the shell of non-enabled parent packages (mostly for show) that have at least one subpackage enabled ...

Final set of enabled packages: gsm 1

Final set of enabled SE packages: gsm 1

Final set of non-enabled packages: 0

Final set of non-enabled SE packages: 0

Final set of enabled TPLs: 0

Final set of non-enabled TPLs: MKL 1

Probing the environment ...

-- USE_XSDK_DEFAULTS='FALSE'
-- BUILD_SHARED_LIBS='FALSE'
-- CMAKE_BUILD_TYPE='RELEASE'
-- CMAKE_C_COMPILER_ID='Clang'
-- CMAKE_C_COMPILER_VERSION='14.0.3.14030022'
-- CMAKE_CXX_COMPILER_ID='Clang'
-- CMAKE_CXX_COMPILER_VERSION='14.0.3.14030022'
-- GSM_SET_INSTALL_RPATH='TRUE'
-- CMAKE_INSTALL_RPATH_USE_LINK_PATH='TRUE'
-- Setting default for CMAKE_INSTALL_RPATH pointing to GSM_INSTALL_LIB_DIR
-- Setting default CMAKE_MACOSX_RPATH=TRUE
-- CMAKE_MACOSX_RPATH='TRUE'
-- CMAKE_INSTALL_RPATH='/usr/local/lib'
-- Warning, cannot automatically determine Fortran mangling.
CMake Error at /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface.cmake:396 (message):
The Fortran compiler:

/opt/intel/oneapi/compiler/2023.0.0/mac/bin/intel64/ifort

and the CXX compiler:

/Library/Developer/CommandLineTools/usr/bin/c++

failed to compile a simple test project using both languages. The output
was:

Change Dir: /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX

Run Build Command(s):/opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile VerifyFortranC && /opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -S/opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify -B/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX --check-build-system CMakeFiles/Makefile.cmake 0
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/Makefile2 VerifyFortranC
/opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -S/opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify -B/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -E cmake_progress_start /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles 6
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/Makefile2 CMakeFiles/VerifyFortranC.dir/all
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/VerifyFortran.dir/build.make CMakeFiles/VerifyFortran.dir/depend
cd /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX && /opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -E cmake_depends "Unix Makefiles" /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles/VerifyFortran.dir/DependInfo.cmake
Dependee "/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles/VerifyFortran.dir/DependInfo.cmake" is newer than depender "/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles/VerifyFortran.dir/depend.internal".
Dependee "/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles/VerifyFortran.dir/depend.internal".
Scanning dependencies of target VerifyFortran
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/VerifyFortran.dir/build.make CMakeFiles/VerifyFortran.dir/build
[ 16%] Building Fortran object CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
/opt/intel/oneapi/compiler/2023.0.0/mac/bin/intel64/ifort -DVERIFY_CXX -I/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX -O3 -c /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify/VerifyFortran.f -o CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
[ 33%] Linking Fortran static library libVerifyFortran.a
/opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -P CMakeFiles/VerifyFortran.dir/cmake_clean_target.cmake
/opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -E cmake_link_script CMakeFiles/VerifyFortran.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/ar qc libVerifyFortran.a CMakeFiles/VerifyFortran.dir/VerifyFortran.f.o
/Library/Developer/CommandLineTools/usr/bin/ranlib libVerifyFortran.a
[ 33%] Built target VerifyFortran
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/depend
cd /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX && /opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -E cmake_depends "Unix Makefiles" /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX /Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX/CMakeFiles/VerifyFortranC.dir/DependInfo.cmake
/Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/VerifyFortranC.dir/build.make CMakeFiles/VerifyFortranC.dir/build
[ 50%] Building C object CMakeFiles/VerifyFortranC.dir/main.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -DVERIFY_CXX -I/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/VerifyFortranC.dir/main.c.o -MF CMakeFiles/VerifyFortranC.dir/main.c.o.d -o CMakeFiles/VerifyFortranC.dir/main.c.o -c /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify/main.c
[ 66%] Building C object CMakeFiles/VerifyFortranC.dir/VerifyC.c.o
/Library/Developer/CommandLineTools/usr/bin/cc -DVERIFY_CXX -I/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/VerifyFortranC.dir/VerifyC.c.o -MF CMakeFiles/VerifyFortranC.dir/VerifyC.c.o.d -o CMakeFiles/VerifyFortranC.dir/VerifyC.c.o -c /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify/VerifyC.c
[ 83%] Building CXX object CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DVERIFY_CXX -I/Users/marcosverissimoalves/Software/molecularGSM/BUILD/CMakeFiles/FortranCInterface/VerifyCXX -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -MD -MT CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o -MF CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o.d -o CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o -c /opt/homebrew/Cellar/cmake/3.26.0/share/cmake/Modules/FortranCInterface/Verify/VerifyCXX.cxx
[100%] Linking CXX executable VerifyFortranC
/opt/homebrew/Cellar/cmake/3.26.0/bin/cmake -E cmake_link_script CMakeFiles/VerifyFortranC.dir/link.txt --verbose=1
/Library/Developer/CommandLineTools/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/opencl-headers/lib CMakeFiles/VerifyFortranC.dir/main.c.o CMakeFiles/VerifyFortranC.dir/VerifyC.c.o CMakeFiles/VerifyFortranC.dir/VerifyCXX.cxx.o -o VerifyFortranC   -L/opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib  libVerifyFortran.a /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libifport.a /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libifcoremt.a /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libimf.a /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libsvml.a /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libipgo.a /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libirc.a -lpthread /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libsvml.a 
ld: warning: ld: warning: ignoring file libVerifyFortran.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libimf.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libipgo.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ld: warning: ignoring file /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libifport.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ignoring file /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libifcoremt.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libirc.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
ld: warning: ignoring file /opt/intel/oneapi/compiler/2023.0.0/mac/compiler/lib/libsvml.a, building for macOS-arm64 but attempting to link with file built for unknown-x86_64
Undefined symbols for architecture arm64:
  "_VerifyFortran", referenced from:
      _main in main.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [VerifyFortranC] Error 1
make[2]: *** [CMakeFiles/VerifyFortranC.dir/all] Error 2
make[1]: *** [CMakeFiles/VerifyFortranC.dir/rule] Error 2
make: *** [VerifyFortranC] Error 2

Call Stack (most recent call first):
cmake/tribits/core/package_arch/TribitsFortranMangling.cmake:50 (fortrancinterface_verify)
cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:1669 (include)
cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:183 (tribits_setup_env)
cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl)
CMakeLists.txt:28 (TRIBITS_PROJECT)

-- Configuring incomplete, errors occurred!`

@duykhoidang
Copy link
Member

We have a new build system in place that was recently merged. Try building with the updated master branch.

@mverissi
Copy link
Author

Thanks, I will try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants