Skip to content

Commit

Permalink
Modify build documents for problems from JOSS reviewers (#3258)
Browse files Browse the repository at this point in the history
* add Apple MacOS build doc

* Apply suggestions from code review
  • Loading branch information
rrsettgast authored Aug 21, 2024
1 parent e2c0903 commit fba859c
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
93 changes: 93 additions & 0 deletions src/docs/sphinx/buildGuide/AppleMacOS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. _AppleMacOS:

Building Apple MacOS
==============

Install homebrew
----------------
Taken from the [homebrew website](https://brew.sh)
.. code-block::
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> ~/.zprofile
note: this is the command for `zsh`. Other shells will require different commands. Homebrew should provide the correct command after install is complete.
eval "$(/opt/homebrew/bin/brew shellenv)"
Install packages using homebrew
-------------------------------

.. code-block::
brew install bison cmake gfortran git-lfs open-mpi lapack python3 ninja m4
echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/opt/homebrew/opt/m4/bin:$PATH"' >> ~/.zshrc
git lfs install
Clone GEOS
----------

.. code-block::
git clone [email protected]:GEOS-DEV/GEOS.git
cd GEOS
git submodule init
git submodule update
cd ..
Clone thirdPartyLibs
--------------------

.. code-block::
git clone [email protected]:GEOS-DEV/thirdPartyLibs.git
cd thirdPartyLibs
git submodule init
git submodule update
git lfs pull
Configure and build thirdPartyLibs
---------------------------------

.. code-block::
python3 scripts/config-build.py -hc ../GEOS/host-configs/apple/macOS_arm.cmake -bt Release
You will get a warning you can ignore

.. code-block::
CMake Warning at /Users/settgast1/Codes/geos/GEOS/host-configs/tpls.cmake:10 (message):
'GEOS_TPL_DIR' does not exist.
Continue with the build

.. code-block::
cd build-macOS_arm-release
make
You will get an error at the end...you can ignore it.

.. code-block::
[100%] Linking CXX executable ../../../tests/blt_mpi_smoke
ld: warning: -commons use_dylibs is no longer supported, using error treatment instead
ld: file not found: @rpath/libquadmath.0.dylib for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tests/blt_mpi_smoke] Error 1
make[1]: *** [blt/tests/smoke/CMakeFiles/blt_mpi_smoke.dir/all] Error 2
make: *** [all] Error 2
Build GEOS
----------

.. code-block::
cd ../../GEOS
python3 scripts/config-build.py -hc host-configs/apple/macOS_arm.cmake -bt Release --ninja
cd build-macOS_arm-release
ninja geosx
2 changes: 2 additions & 0 deletions src/docs/sphinx/buildGuide/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Welcome to the GEOS build guide.
SpackUberenv

ContinuousIntegration

AppleMacOS

0 comments on commit fba859c

Please sign in to comment.