User Tools

Site Tools


howto:compile_on_macos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:compile_on_macos [2024/01/24 13:30] – Update macOS version krackhowto:compile_on_macos [2024/06/10 11:35] (current) – GCC 14 krack
Line 2: Line 2:
  
 This page describes how CP2K can be installed under [[https://en.wikipedia.org/wiki/MacOS|macOS]] ([[https://en.wikipedia.org/wiki/MacOS_Monterey|Monterey]], [[https://en.wikipedia.org/wiki/MacOS_Ventura|Ventura]], and [[https://en.wikipedia.org/wiki/MacOS_Sonoma|Sonoma]] This page describes how CP2K can be installed under [[https://en.wikipedia.org/wiki/MacOS|macOS]] ([[https://en.wikipedia.org/wiki/MacOS_Monterey|Monterey]], [[https://en.wikipedia.org/wiki/MacOS_Ventura|Ventura]], and [[https://en.wikipedia.org/wiki/MacOS_Sonoma|Sonoma]]
-). This howto has last been tested on an Apple M1 under macOS Sonoma 14.(Darwin Kernel Version 23.3.0, Homebrew 4.2.5). For further details check the corresponding Darwin-gnu-arm64 [[https://github.com/cp2k/cp2k/blob/master/arch/Darwin-gnu-arm64.psmp|arch file]] and [[https://dashboard.cp2k.org/archive/darwin-gnu-arm64-psmp/index.html|regression tester]]. This howto assumes that your default shell is ''bash''.+). This howto has last been tested on an Apple M1 under macOS Sonoma 14.(Darwin Kernel Version 23.5.0, Homebrew 4.3.4). For further details check the corresponding Darwin-gnu-arm64 [[https://github.com/cp2k/cp2k/blob/master/arch/Darwin-gnu-arm64.psmp|arch file]] and [[https://dashboard.cp2k.org/archive/darwin-gnu-arm64-psmp/index.html|regression tester]]. This howto assumes that your default shell is ''bash''.
  
 ==== 1. Install Homebrew ==== ==== 1. Install Homebrew ====
Line 10: Line 10:
 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
 </code> </code>
-which will install the latest Homebrew version. This howto was tested with Homebrew 3.6.11 as well as with newer versions up to 4.0.19.+which will install the latest Homebrew version. This howto was tested with Homebrew 3.6.11 as well as with newer versions up to 4.3.4.
  
 === a) The easy way === === a) The easy way ===
Line 32: Line 32:
 Create the following links Create the following links
 <code> <code>
-ln -s /opt/homebrew/bin/gcc-13 /opt/homebrew/bin/gcc +ln -s /opt/homebrew/bin/gcc-14 /opt/homebrew/bin/gcc 
-ln -s /opt/homebrew/bin/g++-13 /opt/homebrew/bin/g++ +ln -s /opt/homebrew/bin/g++-14 /opt/homebrew/bin/g++ 
-ln -s /opt/homebrew/bin/gfortran-13 /opt/homebrew/bin/gfortran+ln -s /opt/homebrew/bin/gfortran-14 /opt/homebrew/bin/gfortran
 </code> </code>
-to make Homebrew's latest ''gcc'' and ''g++'' compilers the default instead of the clang versions in ''/usr/bin''.+to make Homebrew's latest ''gcc'' and ''g++'' compilers the default instead of the clang versions in ''/usr/bin''. Check with 
 +<code> 
 +gcc -v 
 +</code> 
 +if that is the case.
  
 ==== 2. Obtain CP2K ==== ==== 2. Obtain CP2K ====
howto/compile_on_macos.1706103021.txt.gz · Last modified: 2024/01/24 13:30 by krack