Azure / azure-uamqp-python

AMQP 1.0 client library for Python
MIT License
55 stars 47 forks source link

Can't build on Mac OS error: command '/usr/bin/clang' failed with exit code 1 #371

Open Gsantomaggio opened 7 months ago

Gsantomaggio commented 7 months ago
$ xcode-select --version
xcode-select version 2399.

Describe the bug Cannot build the library on MAC OS To Reproduce Steps to reproduce the behavior:

  1. python -m venv env
  2. source env/bin/activate
  3. pip install -r dev_requirements.txt
  4. python setup.py build_ext --inplace

Expected behavior build the library Error

 python setup.py build_ext --inplace
running build_ext
will build uamqp in build/temp.macosx-13-x86_64-cpython-311/cmake
Building with generator flags: -G "Unix Makefiles"
calling cmake /Users/gas/git/Azure/azure-uamqp-python/src/vendor/azure-uamqp-c/ -G "Unix Makefiles" -Duse_openssl:bool=OFF -Duse_default_uuid:bool=ON  -Duse_builtin_httpapi:bool=ON  -Dskip_samples:bool=ON -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release
CMake Deprecation Warning at deps/azure-macro-utils-c/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at deps/umock-c/CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- target architecture: x86_64
-- target architecture: x86_64
-- Configuring done (0.2s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/gas/git/Azure/azure-uamqp-python/build/temp.macosx-13-x86_64-cpython-311/cmake
calling cmake --build . --config Release
[ 58%] Built target aziotsharedutil
[ 83%] Built target uamqp
[100%] Built target umock_c
Adding amqp_definitions.pyx
Adding amqp_management.pyx
Adding amqp_string.pyx
Adding amqpvalue.pyx
Adding annotations.pyx
Adding async_operation.pyx
Adding base.pyx
Adding cbs.pyx
Adding connection.pyx
Adding constants.pyx
Adding error.pyx
Adding header.pyx
Adding link.pyx
Adding message.pyx
Adding message_receiver.pyx
Adding message_sender.pyx
Adding platform.pyx
Adding properties.pyx
Adding sasl.pyx
Adding session.pyx
Adding source.pyx
Adding target.pyx
Adding tlsio.pyx
Adding wsio.pyx
Adding xio.pyx
Adding xlogging.pyx
building 'cmake_uamqp' extension
clang -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -o build/lib.macosx-13-x86_64-cpython-311/cmake_uamqp.cpython-311-darwin.so
clang: error: no input files
error: command '/usr/bin/clang' failed with exit code 1
ReLehmann commented 3 months ago

I also noticed this today. @Gsantomaggio have you found a solution?

Gsantomaggio commented 3 months ago

@ReLehmann No, I did not. I decided to move on to something else.

ReLehmann commented 3 months ago

I can now confirm that it is related to macOS 14.x. My colleagues on 13.x have no problems with this.

swildermann commented 2 months ago

same here on macOS 14.3.1 (23D60)

qeternity commented 2 months ago

This is related to llvm 15. If you brew install llvm@14 and then run pip install with a PATH override like so PATH="/opt/homebrew/opt/llvm@14/bin:$PATH" pip install uamqp (or wherever your homebrew is) then it will work fine.

dineshwebdeveloper commented 1 month ago

I have the similar issue in mac0S 14 with python 3.7.17 on installation of pillow and report lab can someone help me to resolve the issue. @qeternity

xinwuchn commented 3 weeks ago

I also have the same issue in MacOS 14.5 with python 3.10.14 on installation of Calorine 2.3. I have nearly tried all the ways could be useful.