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

Modify build documents for problems from JOSS reviewers #3258

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions src/docs/sphinx/buildGuide/AppleMacOS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
.. _AppleMacOS:

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

Install homebrew
----------------

rrsettgast marked this conversation as resolved.
Show resolved Hide resolved
.. code-block::

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe replace by link to homebrew in case this changes as some point, and then there is also other information on how to setup homebrew.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes...good idea

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/settgast1/.zprofile
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? Don't really like my PATH being modified when I'm installing some package. Also it assumes you are using zsh which should be mentioned (for example I don't).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean I have this line in my shell environment too but I know I added it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the recommended path modification from home-brew, but it is specific to my shell. I will better document this and generalize it

rrsettgast marked this conversation as resolved.
Show resolved Hide resolved
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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like ninja, but it isn't necessary I guess?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not necessary, but for geos, ninja does compile much faster than make

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)
Comment on lines +77 to +79
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think I get this error.

Copy link
Member Author

@rrsettgast rrsettgast Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really? we are going to have to compare configurations tomorrow. You have an M1 or an M2? I have this error on both M1 and M2. Are you on Sonoma (MacOS 14.6)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M1

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do get the linker error (M1 / macOS 13 / apple clang 14)

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
Loading