ohmtech-rdi / eurorack-blocks

Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
Other
296 stars 19 forks source link

cairocffi failuire in macos build instructions #599

Open olilarkin opened 11 months ago

olilarkin commented 11 months ago

hey!

when following the tutorial for macos with xcode. I got an error


~/Dev/eurorack-blocks$ erbb setup --with-xcode-support                ✹main
#·Packages·required·to·user·erbb·and·erbui
Extracting kicad_minimal_macos_6.0.11-0.tar.gz...
Extracting gcc-arm-none-eabi-10.3-2021.10-mac.tar.bz2...
Extracting toolchain_big_sur.tar.gz...
Adding Xcode support...
Installing python packages...
  Preparing metadata (setup.py) ... done
  Building wheel for cairocffi (setup.py) ... error
  ERROR: Failed building wheel for cairocffi
  ERROR: Failed cleaning build dir for cairocffi
ERROR: Could not build wheels for cairocffi, which is required to install pyproject.toml-based projects

in order to fix it, i removed the version number from cairocffi here:

https://github.com/ohmtech-rdi/eurorack-blocks/blob/341e72b52465b0cdf94ff4fb8a463d0c5c70fe94/requirements/build-system.txt#L5

-cairocffi>=1.4.0,<1.5.0
+cairocffi
ohmtech-rdi commented 11 months ago

Hi @olilarkin

Thanks for the report! I remember I added this <1.5.0 because the build was failing on Windows, but I didn't investigate more on it, and I totally should as this is quite restrictive.

I think that was is happening is that a 1.4.x wheel is not available for your platform, which might be a combination of machine architecture, macOS version as well as python3 version, so please could you tell me:

Thanks!

olicarter commented 10 months ago

I was also getting the same error.

I noticed from getting this info that the last instance of Python existed within Xcode, so I manually deleted /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/ and reinstalled Python from https://www.python.org/downloads/macos.

After doing that it built successfully 🎉

The docs currently say to ensure that which python3 doesn't include Xcode anywhere in the path, though mine didn't include Xcode but still failed. Would it be worth including the python3 -c 'import os.path; import sys; print(os.path.realpath(sys.executable))' check in the docs too?

ohmtech-rdi commented 10 months ago

Hi @olicarter

Great! Thanks for the feedback. Yeah indeed, I guess that which python3 returns /usr/bin/python3? Which I guess then itself is a symlink to the Python in your Xcode installation?

I guess I could indeed put this quickly in a troubleshooting section in the documentation, but I guess I could also do this in the environment check prior to installation. What do you think?