I then changed directory to where the sh file at, ran this following code.
but i keep getting errors, can some help ..................................
MacBook-Air Documents % chmod +x build-saga.sh
MacBook-Air Documents % sh ./build-saga.sh
==> Checking for sudo access (which may request your password)...
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R johnk:admin /opt/homebrew
==> Downloading and installing Homebrew...
HEAD is now at 96f861e94 Merge pull request #16729 from reitermarkus/warn-from-name-loader
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Next steps:
- Run brew help to get started
- Further documentation: https://docs.brew.sh
Warning: Formula wxmac was renamed to wxwidgets.
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: wxwidgets 3.2.4 is already installed and up-to-date.
To reinstall 3.2.4, run:
brew reinstall wxwidgets
Warning: llvm 17.0.6_1 is already installed and up-to-date.
To reinstall 17.0.6_1, run:
brew reinstall llvm
Warning: libomp 17.0.6 is already installed and up-to-date.
To reinstall 17.0.6, run:
brew reinstall libomp
Warning: gdal 3.8.4 is already installed and up-to-date.
To reinstall 3.8.4, run:
brew reinstall gdal
Warning: postgis 3.3.4_2 is already installed and up-to-date.
To reinstall 3.3.4_2, run:
brew reinstall postgis
Warning: cmake 3.28.3 is already installed and up-to-date.
To reinstall 3.28.3, run:
brew reinstall cmake
Cloning into 'saga-code'...
remote: Enumerating objects: 89678, done.
remote: Counting objects: 100% (89678/89678), done.
remote: Compressing objects: 100% (19062/19062), done.
remote: Total 89678 (delta 77198), reused 82701 (delta 70318)
Receiving objects: 100% (89678/89678), 28.93 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (77198/77198), done.
-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- 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 - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- folder: saga
-- Set default build type to Release
-- Found Git: /usr/bin/git (found version "2.39.3 (Apple Git-145)")
GIT_BRANCH: master
VERSON_STRING: 9.4.0
VERSON_FULL_STRING: 9.4.0-63+df92323d3
CMake Error at /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindOpenMP.cmake:580 (find_package_handle_standard_args)
CMakeLists.txt:92 (find_package)
-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found. Stop.
Last edit: Kingsley John 2024-02-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
interpreting your provided information, it seems cmake is unable to finde the openMP. The hint is the following line:
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Since openMP can't be found it may help to provide cmake with an explicit path to the install location before configuring SAGA as suggested in the accepted answer here [1] . It might also be a problem with clang and the version of installed version of openMP as Volker wrote on a similar thread in the forum [2] . Unfortunately, I am not familiar with MACOS, hopefully one of those refences contains the solution to your problem.
i saved this sh file in my computer,
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install wxmac llvm libomp gdal postgis cmake
mkdir ~/saga && cd ~/saga
git clone https://git.code.sf.net/p/saga-gis/code saga-code
mkdir _build && cd _build
cmake ../saga-code/saga-gis
make -j4 && sudo make install"
I then changed directory to where the sh file at, ran this following code.
but i keep getting errors, can some help ..................................
MacBook-Air Documents % chmod +x build-saga.sh
MacBook-Air Documents % sh ./build-saga.sh
==> Checking for
sudo
access (which may request your password)...Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R johnk:admin /opt/homebrew
==> Downloading and installing Homebrew...
HEAD is now at 96f861e94 Merge pull request #16729 from reitermarkus/warn-from-name-loader
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run brew help to get started
- Further documentation:
https://docs.brew.sh
Warning: Formula wxmac was renamed to wxwidgets.
Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: wxwidgets 3.2.4 is already installed and up-to-date.
To reinstall 3.2.4, run:
brew reinstall wxwidgets
Warning: llvm 17.0.6_1 is already installed and up-to-date.
To reinstall 17.0.6_1, run:
brew reinstall llvm
Warning: libomp 17.0.6 is already installed and up-to-date.
To reinstall 17.0.6, run:
brew reinstall libomp
Warning: gdal 3.8.4 is already installed and up-to-date.
To reinstall 3.8.4, run:
brew reinstall gdal
Warning: postgis 3.3.4_2 is already installed and up-to-date.
To reinstall 3.3.4_2, run:
brew reinstall postgis
Warning: cmake 3.28.3 is already installed and up-to-date.
To reinstall 3.28.3, run:
brew reinstall cmake
Cloning into 'saga-code'...
remote: Enumerating objects: 89678, done.
remote: Counting objects: 100% (89678/89678), done.
remote: Compressing objects: 100% (19062/19062), done.
remote: Total 89678 (delta 77198), reused 82701 (delta 70318)
Receiving objects: 100% (89678/89678), 28.93 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (77198/77198), done.
-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- 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 - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- folder: saga
-- Set default build type to Release
-- Found Git: /usr/bin/git (found version "2.39.3 (Apple Git-145)")
GIT_BRANCH: master
VERSON_STRING: 9.4.0
VERSON_FULL_STRING: 9.4.0-63+df92323d3
CMake Error at /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindOpenMP.cmake:580 (find_package_handle_standard_args)
CMakeLists.txt:92 (find_package)
-- Configuring incomplete, errors occurred!
make: *** No targets specified and no makefile found. Stop.
Last edit: Kingsley John 2024-02-23
Hi!
interpreting your provided information, it seems cmake is unable to finde the openMP. The hint is the following line:
Since openMP can't be found it may help to provide cmake with an explicit path to the install location before configuring SAGA as suggested in the accepted answer here [1] . It might also be a problem with clang and the version of installed version of openMP as Volker wrote on a similar thread in the forum [2] . Unfortunately, I am not familiar with MACOS, hopefully one of those refences contains the solution to your problem.
Regards,
Manfred
[1] https://discourse.cmake.org/t/how-to-find-openmp-with-clang-on-macos/8860
[2] https://sourceforge.net/p/saga-gis/discussion/790705/thread/c03747383d/