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

gz-transport13 fails to find Python3 #2549

Closed
rgov opened this issue Feb 5, 2024 · 6 comments
Closed

gz-transport13 fails to find Python3 #2549

rgov opened this issue Feb 5, 2024 · 6 comments
Labels

Comments

@rgov
Copy link

rgov commented Feb 5, 2024

On macOS Sonoma 14.3, installing gz-transport13 fails. It looks like CMake is not being passed the path to the Python3.11 development headers.

-- Searching for Python - found version 3.11.7.
...
CMake Error at /opt/homebrew/Cellar/cmake/3.28.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Development Development.Module
  Development.Embed) (found version "3.12")
Homebrew info
HOMEBREW_VERSION: 4.2.6-119-gd947721
ORIGIN: https://github.com/Homebrew/brew
HEAD: d94772171f8be4885ce2f9ef018989c9955b324d
Last commit: 10 hours ago
Core tap HEAD: 96429d0c4d7356e72396b83523ea4c74a4eb3253
Core tap last commit: 9 months ago
Core tap branch: colmap
Core tap JSON: 05 Feb 05:16 UTC
Core cask tap HEAD: a771466c1d4ecce5ed03d1af1708147de31aecce
Core cask tap last commit: 1 year, 4 months ago
Core cask tap branch: bump-foxglove-studio-1.27.0
Core cask tap JSON: 05 Feb 05:16 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.oCiqzjI50D/org.xquartz:0
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-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.1
Rosetta 2: false
@scpeters
Copy link
Member

scpeters commented Feb 6, 2024

I think this is more an issue with how gz-transport is finding python and that it should be fixed by gazebosim/gz-transport#472 without any additional changes to the homebrew formulae

@rgov
Copy link
Author

rgov commented Feb 6, 2024

We ought to verify that CMake is correctly finding the [email protected] keg's development headers/library and not defaulting to another Python like [email protected].

@rgov
Copy link
Author

rgov commented Feb 6, 2024

I applied gazebosim/gz-transport#472 alone, without #2550, and ran CMake from within a Homebrew debug shell:

$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/gz-transport14/13.999.999-0-20231016 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DBUILD_TESTING=OFF -DPython3_EXECUTABLE=/opt/homebrew/opt/[email protected]/bin/python3
...
-- ====== Finding Dependencies ======
-- Found Python3: /opt/homebrew/opt/[email protected]/bin/python3 (found version "3.11.7") found components: Interpreter Development Development.Module Development.Embed 
...
-- Python3_INCLUDE_DIRS = /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11
-- Python3_LIBRARIES = /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib
-- Python3_LIBRARY_DIRS = /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/lib

@maisternia
Copy link

Hello,
I'm experiencing the same problem on Sonoma 14.2.1 while brewing gz-harmonic with tap osrf/simulation
Is there a way to take advantage of the fix gazebosim/gz-transport#472?
Sorry, I'm new to homebrew, I tried to tap the rgov/simulation instead of osrf/simulation, but still see the Could NOT find Python3 error:

==> Installing dependencies for rgov/simulation/gz-harmonic: rgov/simulation/gz-transport13, qt@5, rgov/simulation/gz-gui8, google-benchmark, libccd, octomap, fcl, flann, fmt, ampl-mp, ipopt, nlopt, ode, open-scene-graph, spdlog, console_bridge, urdfdom_headers, urdfdom, dartsim, rgov/simulation/sdformat14, rgov/simulation/gz-physics7, rgov/simulation/gz-sensors8, rgov/simulation/gz-sim8 and rgov/simulation/gz-launch7
==> Installing rgov/simulation/gz-harmonic dependency: rgov/simulation/gz-transport13
==> cmake .. -DCMAKE_INSTALL_RPATH=@loader_path/../lib;@loader_path/../../../lib -DPython3_EXECUTABLE=/opt/homebrew/opt/[email protected]/bin/python3
Last 15 lines from /Users/gena/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!


Any help is very much appreciated. Thanks!

@rgov
Copy link
Author

rgov commented Feb 12, 2024

Hi @maisternia. gazebosim/gz-transport#472 was merged so it should build now -- but you may want to do brew install --HEAD gz-transport13 instead, with the official osrf/homebrew-simulation tap and not mine.

If that doesn't work and you do want to use my fork, you'll want to check out the rzg/python3 branch. Like:

$ cd $(brew --prefix)/Library/Taps/rgov/homebrew-simulation
$ git checkout rzg/python3

However please note I will not be keeping my fork in sync with upstream, so I recommend this only as a short term fix. When you want to switch back to the upstream, please untap and re-tap.

@maisternia
Copy link

That worked! Also I had to brew --HEAD sdformat14 as well, but stuck on gz-physics7 with fatal error: 'sdf/Joint.hh' file not found. But this is another kind of animal, will to dig further.

Thank you so much @rgov!

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

Successfully merging a pull request may close this issue.

3 participants