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

Failed to install Gazebo Harmonic on macOS #2555

Closed
atinfinity opened this issue Feb 12, 2024 · 8 comments
Closed

Failed to install Gazebo Harmonic on macOS #2555

atinfinity opened this issue Feb 12, 2024 · 8 comments
Labels

Comments

@atinfinity
Copy link

I read https://gazebosim.org/docs/harmonic/install_osx to install Gazebo Harmonic on macOS.
And, I add ulimit -n unlimited to avoid gazebosim/gz-sim#2215.

ulimit -n unlimited
brew tap osrf/simulation
brew install gz-harmonic

As a result, the following error occured.

Last 15 lines from /Users/dandelion/Library/Logs/Homebrew/gz-transport13/01.cmake:
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
CMake Error at /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development Development.Module
  Development.Embed) (found version "3.12")
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/FindPython/Support.cmake:3867 (find_package_handle_standard_args)
  /opt/homebrew/Cellar/cmake/3.28.3/share/cmake/Modules/FindPython3.cmake:545 (include)
  CMakeLists.txt:151 (find_package)


-- Configuring incomplete, errors occurred!

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/osrf/homebrew-simulation/issues

brew configuration

$ brew config
HOMEBREW_VERSION: 4.2.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: 6170b6297c61ef0b68814c708eeff2199d8b0d11
Last commit: 7 days ago
Core tap JSON: 12 Feb 16:40 UTC
Core cask tap JSON: 12 Feb 16:24 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.U1q1efnuAt/org.xquartz:0
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.3-arm64
CLT: 15.1.0.0.1.1700200546
Xcode: 15.2
Rosetta 2: false
@atinfinity atinfinity added the bug label Feb 12, 2024
@scpeters
Copy link
Member

I just added patches to fix finding python in #2563. Can you try again?

@cirocavani
Copy link

cirocavani commented Feb 14, 2024

Hi @scpeters

I had the same error yesterday. It's working for me now (10GMT). But some projects still find 3.12 instead of 3.11 (even with the -DPython3_EXECUTABLE. gz-math7 for example). But as yesterday, it's out of skill right now. So thank you very much for this work, it helps a lot for beginners like me.

The problem I found trying to understand the error yesterday was to look at the cmake logs and some of then still have 3.12 as python found.

grep "3\.12" -r ~/Library/Logs/Homebrew/gz-*/01.cmake

# /Users/ciro.cavani/Library/Logs/Homebrew/gz-fuel-tools9/01.cmake:-- Found Python3: /opt/homebrew/bin/python3.12 (found version "3.12.2") found components: Interpreter 
# /Users/ciro.cavani/Library/Logs/Homebrew/gz-gui8/01.cmake:-- Found Python3: /opt/homebrew/bin/python3.12 (found version "3.12.2") found components: Interpreter 
# /Users/ciro.cavani/Library/Logs/Homebrew/gz-harmonic/01.cmake:-- Found Python3: /opt/homebrew/bin/python3.12 (found version "3.12.2") found components: Interpreter 
# /Users/ciro.cavani/Library/Logs/Homebrew/gz-launch7/01.cmake:-- Found Python3: /opt/homebrew/bin/python3.12 (found version "3.12.2") found components: Interpreter 
# /Users/ciro.cavani/Library/Logs/Homebrew/gz-math7/01.cmake:-- Searching for Python - found version 3.12.2.
# /Users/ciro.cavani/Library/Logs/Homebrew/gz-sensors8/01.cmake:-- Found Python3: /opt/homebrew/bin/python3.12 (found version "3.12.2") found components: Interpreter 

How I tested (as today):

brew reinstall [email protected]
brew reinstall [email protected]
brew link --overwrite [email protected]
which python3
# /opt/homebrew/bin/python3
python3 --version
# Python 3.11.7
which python
# /opt/homebrew/bin/python
python --version
# Python 3.11.7

for f in gz-launch7 gz-sim8 gz-sensors8 gz-physics7 sdformat14 gz-gui8 gz-transport13 gz-rendering8 ogre2.3 ogre1.9 gz-plugin2 gz-fuel-tools9 gz-msgs10 gz-tools2 gz-common5 gz-math7 gz-utils2 gz-cmake3 gz-harmonic
do
  echo $f
  brew uninstall --force --ignore-dependencies $f 2> /dev/null
  brew cleanup -s $f
  find ~/Library/Caches/Homebrew -name "*$f*" -delete
  rm -rf ~/Library/Logs/Homebrew/$f
done

brew list | grep gz
# empty

brew tap osrf/simulation
brew update && brew upgrade
brew install gz-harmonic

# ==> Fetching dependencies for osrf/simulation/gz-harmonic: osrf/simulation/gz-cmake3, osrf/simulation/gz-utils2, osrf/simulation/gz-math7, osrf/simulation/gz-common5, osrf/simulation/gz-tools2, osrf/simulation/gz-msgs10, osrf/simulation/gz-fuel-tools9, osrf/simulation/gz-plugin2, osrf/simulation/ogre1.9, osrf/simulation/ogre2.3, osrf/simulation/gz-rendering8, osrf/simulation/gz-transport13, osrf/simulation/gz-gui8, osrf/simulation/sdformat14, osrf/simulation/gz-physics7, osrf/simulation/gz-sensors8, osrf/simulation/gz-sim8 and osrf/simulation/gz-launch7
#
# ...
#
# ==> Installing osrf/simulation/gz-harmonic
# ==> cmake ..
# ==> make install
# ==> /opt/homebrew/opt/[email protected]/libexec/bin/python -m venv --system-site-packages --without-pip /opt/homebrew/Cellar/gz-harmonic/1.0.0_3/libexec
# ==> /opt/homebrew/opt/[email protected]/libexec/bin/python -m pip --python=/opt/homebrew/Cellar/gz-harmonic/1.0.0_3/libexec/bin/python install PyYAML
# ==> /opt/homebrew/opt/[email protected]/libexec/bin/python -m pip --python=/opt/homebrew/Cellar/gz-harmonic/1.0.0_3/libexec/bin/python install vcstool
# 🍺  /opt/homebrew/Cellar/gz-harmonic/1.0.0_3: 93 files, 627.5KB, built in 1 minute 13 seconds
# ==> Running `brew cleanup gz-harmonic`...
# Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
# Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

@atinfinity
Copy link
Author

@scpeters I was able to install Gazebo Harmonic. And, I also encountered #2555 (comment).

@scpeters
Copy link
Member

if you are able to install Gazebo Harmonic and use the python bindings (confirm with brew test {package} for each of gz-math7, sdformat14, gz-msgs10, gz-transport13, gz-sim8), then everything is working fine. It is especially important that packages that install python bindings use the correct version of python3. Every package uses python3 during its build to some extent (for example to run the check_test_ran.py script when running make test), but choosing the right version is only really important for the packages with bindings.

@atinfinity
Copy link
Author

@scpeters Thank you for your explanation. I understood. So, I closed this issue.

@scpeters
Copy link
Member

glad it's working for you!

@skol101
Copy link

skol101 commented Sep 10, 2024

Fails on M2 . I'm running standard Macos binary installation instruction

After running brew install gz-sim8 --verbose --debug

[ 30%] Building CXX object src/CMakeFiles/gz-math7.dir/Vector3Stats.cc.o
cd /tmp/gz-math7-20240910-20768-1wsv82/gz-math-7.5.1/build/src && /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ -DMAC_OS_X_VERSION=1080 -Dgz_math7_EXPORTS -I/tmp/gz-math7-20240910-20768-1wsv82/gz-math-7.5.1/include -I/tmp/gz-math7-20240910-20768-1wsv82/gz-math-7.5.1/build/include -I/tmp/gz-math7-20240910-20768-1wsv82/gz-math-7.5.1/build/core/include -isystem /opt/homebrew/include/gz/utils2 -stdlib=libc++ -O3 -DNDEBUG -std=c++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -fPIC -MD -MT src/CMakeFiles/gz-math7.dir/Vector3Stats.cc.o -MF CMakeFiles/gz-math7.dir/Vector3Stats.cc.o.d -o CMakeFiles/gz-math7.dir/Vector3Stats.cc.o -c /tmp/gz-math7-20240910-20768-1wsv82/gz-math-7.5.1/src/Vector3Stats.cc
[ 32%] Linking CXX shared library ../lib/libgz-math7.dylib
cd /tmp/gz-math7-20240910-20768-1wsv82/gz-math-7.5.1/build/src && /opt/homebrew/Cellar/cmake/3.30.3/bin/cmake -E cmake_link_script CMakeFiles/gz-math7.dir/link.txt --verbose=1
/opt/homebrew/Library/Homebrew/shims/mac/super/clang++  -stdlib=libc++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -dynamiclib -Wl,-headerpad_max_install_names  -Wl,-undefined -Wl,dynamic_lookup -compatibility_version 7.0.0 -current_version 7.5.1 -o ../lib/libgz-math7.7.5.1.dylib -install_name @rpath/libgz-math7.7.dylib "CMakeFiles/gz-math7.dir/Angle.cc.o" "CMakeFiles/gz-math7.dir/AxisAlignedBox.cc.o" "CMakeFiles/gz-math7.dir/Color.cc.o" "CMakeFiles/gz-math7.dir/DiffDriveOdometry.cc.o" "CMakeFiles/gz-math7.dir/Frustum.cc.o" "CMakeFiles/gz-math7.dir/GaussMarkovProcess.cc.o" "CMakeFiles/gz-math7.dir/Helpers.cc.o" "CMakeFiles/gz-math7.dir/Kmeans.cc.o" "CMakeFiles/gz-math7.dir/Material.cc.o" "CMakeFiles/gz-math7.dir/MecanumDriveOdometry.cc.o" "CMakeFiles/gz-math7.dir/MovingWindowFilter.cc.o" "CMakeFiles/gz-math7.dir/PID.cc.o" "CMakeFiles/gz-math7.dir/Rand.cc.o" "CMakeFiles/gz-math7.dir/RollingMean.cc.o" "CMakeFiles/gz-math7.dir/RotationSpline.cc.o" "CMakeFiles/gz-math7.dir/SemanticVersion.cc.o" "CMakeFiles/gz-math7.dir/SignalStats.cc.o" "CMakeFiles/gz-math7.dir/SpeedLimiter.cc.o" "CMakeFiles/gz-math7.dir/SphericalCoordinates.cc.o" "CMakeFiles/gz-math7.dir/Spline.cc.o" "CMakeFiles/gz-math7.dir/SplinePrivate.cc.o" "CMakeFiles/gz-math7.dir/Stopwatch.cc.o" "CMakeFiles/gz-math7.dir/Temperature.cc.o" "CMakeFiles/gz-math7.dir/Vector3Stats.cc.o"  /opt/homebrew/lib/libgz-utils2.2.2.0.dylib

cd /tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/src && /opt/homebrew/Cellar/cmake/3.30.3/bin/cmake -E cmake_symlink_library ../lib/libgz-math7.7.5.1.dylib ../lib/libgz-math7.7.dylib ../lib/libgz-math7.dylib
[ 32%] Built target gz-math7
/opt/homebrew/bin/doxygen /tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox
warning: Tag 'OUTPUT_TEXT_DIRECTION' at line 102 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'CLANG_ASSISTED_PARSING' at line 1073 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' belongs to an option that was not enabled at compile time.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'CLANG_OPTIONS' at line 1081 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' belongs to an option that was not enabled at compile time.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'CLANG_DATABASE_PATH' at line 1091 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' belongs to an option that was not enabled at compile time.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u", or recompile doxygen with this feature enabled.
warning: Tag 'HTML_TIMESTAMP' at line 1238 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'FORMULA_TRANSPARENT' at line 1530 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'LATEX_SOURCE_CODE' at line 1838 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'LATEX_TIMESTAMP' at line 1854 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'RTF_SOURCE_CODE' at line 1928 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOCBOOK_PROGRAMLISTING' at line 2033 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'CLASS_DIAGRAMS' at line 2220 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOT_FONTNAME' at line 2262 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOT_FONTSIZE' at line 2269 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'DOT_TRANSPARENT' at line 2495 of file '/tmp/gz-math7-20240910-14205-6zrvcz/gz-math-7.5.1/build/api.dox' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
[ 32%] Built target doc
make: *** [all] Error 2
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --version
/opt/homebrew/Library/Homebrew/ignorable.rb:27:in `block in raise'
BuildError: Failed executing: make install
1. raise

@scpeters
Copy link
Member

@skol101 I don't think the error is from doxygen; perhaps there was another error earlier on the console log?

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

No branches or pull requests

4 participants