devinbost commented on issue #15417:
URL: https://github.com/apache/pulsar/issues/15417#issuecomment-1117663588

   I was able to build from source from master locally on my M1 Mac, but when I 
try to install the pip wheels, I get:
   
   > ERROR: [wheel-file].whl is not a supported wheel on this platform. 
   
   (I was running Python 3.9.12)
   
   I tried all of the wheel files produced by the build. They are:
   
   - pulsar_client-2.11.0-cp310-cp310-macosx_11_0_universal2.whl 
   - pulsar_client-2.11.0-cp39-cp39-macosx_11_0_universal2.whl
   - pulsar_client-2.11.0-cp37-cp37m-macosx_11_0_x86_64.whl      
   - pulsar_client-2.8.0-cp37-cp37m-linux_x86_64.whl
   - pulsar_client-2.11.0-cp38-cp38-macosx_11_0_universal2.whl
   
   I also tried upgrading Python to 3.10.4 and installing 
`pulsar_client-2.11.0-cp310-cp310-macosx_11_0_universal2.whl` but that also 
gave me the same error. 
   
   Reproduction steps. Build from source on M1 Mac:
   
   ```
   sudo xcodebuild -license
   brew install boost
   brew install protobuf
   brew install openssl
   brew link --force openssl
   export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
   echo 'export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"' >> ~/.zshrc
   export OPENSSL_INCLUDE_DIR=/opt/homebrew/Cellar/openssl@3/3.0.3/include
   export OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@3/3.0.3
   brew install libcurl
   # Downloaded latest stable release of curllib
   cd /Users/dbost/proj/binaries/curl-7.83.0
   ./configure --prefix=/usr/local/curl 
--with-openssl=/opt/homebrew/Cellar/openssl@3/3.0.3
   make
   sudo make install
   which curl
   
   # Downloaded latest stable gtest release
   cd ..
   mv /Users/dbost/Downloads/googletest-release-1.11.0.tar.gz .
   cp /Users/dbost/Downloads/googletest-release-1.11.0.tar.gz 
/Users/dbost/proj/binaries/
   cd /Users/dbost/proj/binaries/
   tar -zxvf /Users/dbost/Downloads/googletest-release-1.11.0.tar.gz
   cd googletest-release-1.11.0
   mkdir build
   cd ~/proj/apache-pulsar/pulsar
   git pull
   cd pulsar-client-cpp
   brew install protobuf boost boost-python3 log4cxx jsoncpp
   
   # Installed cmake from GUI. Then:
   export PATH=/Applications/CMake.app/Contents/bin:$PATH
   
   cd /Users/dbost/proj/binaries/googletest-release-1.11.0
   sudo cmake .
   sudo make
   sudo cp *.a /usr/lib # Didn't work. Next attempt:
   sudo cp ./lib/*.a /usr/lib # Didn't work. Next attempt:
   sudo cp ./lib/*.a /usr/local/lib
   
   cd ~/proj/apache-pulsar
   
   cd pulsar
   cd pulsar-client-cpp
   sudo ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin/cmake
   brew install gcc
   # Failed when I tried to use gcc-11 and g++-11 due to unknown parameters
   #export CC=/opt/homebrew/bin/gcc-11
   #export CXX=/opt/homebrew/bin/g++-11
   export CC=/usr/bin/gcc
   export CXX=/usr/bin/g++
   
   export PULSAR_PATH=/Users/dbost/proj/apache-pulsar/pulsar
   rm CMakeCache.txt
   cmake . -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import 
get_python_inc; print(get_python_inc())") -DPYTHON_LIBRARY=$(python3 -c "import 
distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
   # Failed, so I tried excluding the tests:
   rm CMakeCache.txt
   cmake . -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import 
get_python_inc; print(get_python_inc())") -DPYTHON_LIBRARY=$(python3 -c "import 
distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") 
-DBUILD_TESTS=OFF
   make
   # Success!
   
   
   cd python
   vi build-mac-wheels.sh
   ./build-mac-wheels.sh
   # Success!
   
   cd dist
   conda create -n pulsarexample
   conda install wheel
   conda activate pulsarexample
   pip install (any of the wheel files)
   # They all fail
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to