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

ERROR: Failed building wheel for pyzmq on OpenBSD #2037

Open
1 task done
joyboy67 opened this issue Oct 2, 2024 · 11 comments
Open
1 task done

ERROR: Failed building wheel for pyzmq on OpenBSD #2037

joyboy67 opened this issue Oct 2, 2024 · 11 comments

Comments

@joyboy67
Copy link

joyboy67 commented Oct 2, 2024

This is a pyzmq bug

  • This is a pyzmq-specific bug, not an issue of zmq socket behavior. Don't worry if you're not sure! We'll figure it out together.

What pyzmq version?

latest

What libzmq version?

none

Python version (and how it was installed)

3.10.13

OS

OpenBSD 7.3

What happened?

doas pip3 install pyzmq

Collecting pyzmq
  Using cached pyzmq-26.2.0.tar.gz (271 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyzmq
  Building wheel for pyzmq (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyzmq (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      WARNING: Use build.targets instead of cmake.targets for scikit-build-core >= 0.10
      *** scikit-build-core 0.10.7 using CMake 3.25.2 (wheel)
      *** Configuring CMake...
      loading initial cache file /tmp/tmp9bs70ol9/build/CMakeInit.txt
      -- The C compiler identification is Clang 13.0.0
      -- The CXX compiler identification is Clang 13.0.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Python: /usr/local/bin/python3.10 (found version "3.10.13") found components: Interpreter Development.Module
      -- Looking for libzmq
      -- Looking for libzmq with pkg-config
      -- Checking for module 'libzmq'
      --   Found libzmq, version 4.3.4
      -- Looking for libzmq with pkg-config - found: -L/usr/local/lib -lzmq
      --   Adding /usr/local/lib to RPATH, set PYZMQ_LIBZMQ_RPATH=OFF if this is not what you want.
      -- Using Python Python /usr/local/bin/python3.10
      -- Building Cython backend
      -- Linking libzmq target PkgConfig::libzmq
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /tmp/tmp9bs70ol9/build
      *** Building project with Unix Makefiles...
      [ 33%] Generating _src/_zmq.c
      [ 66%] Building C object CMakeFiles/_zmq.dir/_src/_zmq.c.o
      In file included from /tmp/tmp9bs70ol9/build/_src/_zmq.c:1240:
      /tmp/pip-install-8yz0wy7h/pyzmq_418a850cf8ff44dd9884863ced0f6796/zmq/utils/zmq_compat.h:20:10: fatal error: 'zmq.h' file not found
      #include "zmq.h"
               ^~~~~~~
      1 error generated.
      gmake[3]: *** [CMakeFiles/_zmq.dir/build.make:80: CMakeFiles/_zmq.dir/_src/_zmq.c.o] Error 1
      gmake[2]: *** [CMakeFiles/Makefile2:84: CMakeFiles/_zmq.dir/all] Error 2
      gmake[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/pyzmq.dir/rule] Error 2
      gmake: *** [Makefile:182: pyzmq] Error 2
      
    *** CMake build failed
    [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyzmq
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq, which is required to install pyproject.toml-based projects

Code to reproduce bug

No response

Traceback, if applicable

No response

More info

No response

@joyboy67 joyboy67 changed the title BUG: ERROR: Failed building wheel for pyzmq Oct 2, 2024
@minrk
Copy link
Member

minrk commented Oct 3, 2024

Does /usr/local/include/zmq.h exist?

@joyboy67
Copy link
Author

joyboy67 commented Oct 3, 2024

Does /usr/local/include/zmq.h exist?

Yes !

@minrk
Copy link
Member

minrk commented Oct 4, 2024

Can you run a build with SKBUILD_CMAKE_VERBOSE=1 to show the compile commands?

@minrk
Copy link
Member

minrk commented Oct 4, 2024

and pkg-config --cflags libzmq?

@minrk minrk changed the title ERROR: Failed building wheel for pyzmq ERROR: Failed building wheel for pyzmq on OpenBSD Oct 4, 2024
@minrk
Copy link
Member

minrk commented Oct 4, 2024

(btw, if you need a short-term workaround, you can ignore the discovered libzmq with: ZMQ_PREFIX=bundled which will tell pyzmq to build libzmq as a static library)

@joyboy67
Copy link
Author

joyboy67 commented Oct 8, 2024

and pkg-config --cflags libzmq?

$ SKBUILD_CMAKE_VERBOSE=1
$ pkg-config --cflags libzmq
-I/usr/local/include

$ doas pip3 install pyzmq
Collecting pyzmq
  Using cached pyzmq-26.2.0.tar.gz (271 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyzmq
  Building wheel for pyzmq (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pyzmq (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      WARNING: Use build.targets instead of cmake.targets for scikit-build-core >= 0.10
      *** scikit-build-core 0.10.7 using CMake 3.25.2 (wheel)
      *** Configuring CMake...
      loading initial cache file /tmp/tmp3tnjvbzd/build/CMakeInit.txt
      -- The C compiler identification is Clang 13.0.0
      -- The CXX compiler identification is Clang 13.0.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Found Python: /usr/local/bin/python3.10 (found version "3.10.13") found components: Interpreter Development.Module
      -- Looking for libzmq
      -- Looking for libzmq with pkg-config
      -- Checking for module 'libzmq'
      --   Found libzmq, version 4.3.4
      -- Looking for libzmq with pkg-config - found: -L/usr/local/lib -lzmq
      --   Adding /usr/local/lib to RPATH, set PYZMQ_LIBZMQ_RPATH=OFF if this is not what you want.
      -- Using Python Python /usr/local/bin/python3.10
      -- Building Cython backend
      -- Linking libzmq target PkgConfig::libzmq
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /tmp/tmp3tnjvbzd/build
      *** Building project with Unix Makefiles...
      [ 33%] Generating _src/_zmq.c
      [ 66%] Building C object CMakeFiles/_zmq.dir/_src/_zmq.c.o
      In file included from /tmp/tmp3tnjvbzd/build/_src/_zmq.c:1240:
      /tmp/pip-install-u8yptueu/pyzmq_fab255e16eb94deba17bc6f1bdb7aafa/zmq/utils/zmq_compat.h:20:10: fatal error: 'zmq.h' file not found
      #include "zmq.h"
               ^~~~~~~
      1 error generated.
      gmake[3]: *** [CMakeFiles/_zmq.dir/build.make:80: CMakeFiles/_zmq.dir/_src/_zmq.c.o] Error 1
      gmake[2]: *** [CMakeFiles/Makefile2:84: CMakeFiles/_zmq.dir/all] Error 2
      gmake[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/pyzmq.dir/rule] Error 2
      gmake: *** [Makefile:182: pyzmq] Error 2
      
      *** CMake build failed
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyzmq
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq, which is required to install pyproject.toml-based projects

@joyboy67
Copy link
Author

joyboy67 commented Oct 8, 2024

(btw, if you need a short-term workaround, you can ignore the discovered libzmq with: ZMQ_PREFIX=bundled which will tell pyzmq to build libzmq as a static library)

Ok 👍 I need pyzmq as dependency for install @basicswap

@minrk
Copy link
Member

minrk commented Oct 8, 2024

How did you install libzmq?

Can you run one more time after

export CMAKE_ARGS="-DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT"

?

I just setup a fresh openbsd 7.6 vm with pkg_add zeromq and it successfully found libzmq and worked fine, so I'm not sure why it's not finding your zmq.h.

@joyboy67
Copy link
Author

joyboy67 commented Oct 9, 2024

How did you install libzmq?

Can you run one more time after

export CMAKE_ARGS="-DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT"

?

same error :/

I just setup a fresh openbsd 7.6 vm with pkg_add zeromq and it successfully found libzmq and worked fine, so I'm not sure why it's not finding your zmq.h.

Oh ok, I'm on 7.3 and I have also zeromq :

$ pkg_info -Q zeromq
zeromq-4.3.4p0 (installed)
$ pkg_info -Q libzmq 
p5-ZMQ-LibZMQ3-1.19p2 (installed)

@minrk
Copy link
Member

minrk commented Oct 10, 2024

Sorry, that last command was supposed to produce more output for debugging, not fix anything. Can you share the output?

@minrk
Copy link
Member

minrk commented Oct 10, 2024

How did you install Python, as well?

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

No branches or pull requests

2 participants