weird, maybe a little OT, but two weeks ago (when ...
# general
weird, maybe a little OT, but two weeks ago (when I last worked on migrating to pants) my builds worked fine. Now, pip fails trying to build
(presumably before, it was using binaries) Have a constraints file, no other changes. kinda baffled
What's the failure?
Copy code
/tmp/process-executionFQMN5g/.tmp/timer_createhi0gwvus.c:2: undefined reference to `timer_create'
  collect2: error: ld returned 1 exit status
  no timer_create, linking librt
  building 'zmq.libzmq' extension
  creating build/temp.linux-x86_64-3.9/buildutils
  creating build/temp.linux-x86_64-3.9/bundled
  creating build/temp.linux-x86_64-3.9/bundled/zeromq
  creating build/temp.linux-x86_64-3.9/bundled/zeromq/src
  x86_64-linux-gnu-g++ -pthread -std=c++11 -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DZMQ_HAVE_CURVE=1 -DZMQ_USE_TWEETNACL=1 -DZMQ_USE_EPOLL=1 -DZMQ_IOTHREADS_USE_EPOLL=1 -DZMQ_POLL_BASED_ON_POLL=1 -Ibundled/zeromq/include -Ibundled -I/root/.cache/pants/named_caches/pex_root/venvs/short/afc7a36e/include -I/usr/include/python3.9 -c buildutils/initlibzmq.cpp -o build/temp.linux-x86_64-3.9/buildutils/initlibzmq.o
  buildutils/initlibzmq.cpp:10:10: fatal error: Python.h: No such file or directory
     10 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
  ERROR: Failed building wheel for pyzmq
ERROR: Failed to build one or more wheels
so it's failing to build the pyzmq package
(which is understandable, I haven't installed any build stuff on the CI runner)
but two weeks ago, it was using the binary packages
That is weird. Has your environment changed at all, like new machine or OS upgrade? Pants version change?
I think I found it.
👀 1
my CI was running in the image
if I change it to
then it works
(i think)
huh! btw I don't think that's a Pants thing, but rather Pex which itself is using pip. I wonder if you were to
pip install
if you'd get similar behavior of using prebuilt wheel vs compiling sdist
yeah, this is what was making it baffling
as locally, pyenv (while it was working), was set to use 3.8.10
👍 1
which is now another thing that's not workingrage4