RalfG / python-wheels-manylinux-build

GitHub Action to build Python manylinux wheels
https://github.com/marketplace/actions/python-wheels-manylinux-build
Apache License 2.0
92 stars 44 forks source link

cannot find -lpython3.6m #5

Closed dralley closed 4 years ago

dralley commented 4 years ago

My package fails to link properly, am I doing something incorrectly here?

https://github.com/dralley/createrepo_c/actions/runs/39456233/workflow

https://github.com/dralley/createrepo_c/runs/446531451?check_suite_focus=true#step:6:470

dralley commented 4 years ago

Strangely, it seems like it found the python installation fine?

  -- Python install dir is /opt/_internal/cpython-3.6.10/lib/python3.6/site-packages
  -- Found PythonInterp: /opt/_internal/cpython-3.6.10/bin/python (found version "3.6.10")
  -- Found PythonLibs: libpython3.6m.a (found version "3.6.10")
dralley commented 4 years ago

It's a manylinux2014 build if that's relevant.

RalfG commented 4 years ago

During the build /opt/_internal/cpython-3.6.10/bin/python is being referenced as python path, but yum installed python3-devel.x86_64 0:3.6.8-10.el7 (version 3.6.8). Could this be the problem?

dralley commented 4 years ago

I don't think so, here's a build (technically a different package) with the same problem that doesn't yum install python3-dvel at all: https://github.com/dralley/libcomps/runs/447836515?check_suite_focus=true#step:7:304

However, I managed to make this work on a third package, which suggests its probably something wrong with the CMake scripts rather than your action. I can close this issue if you like.

RalfG commented 4 years ago

Ok, let me know it there turns out to be something in this action that can fix your issue.

dralley commented 4 years ago

No action needed on your part. Apparently the problem is that if you target_link_libraries(${PYTHON_LIBRARY}) then even if PYTHON_INCLUDE_DIR is also defined correctly, it'll try to link the runtime library anyway, which doesn't exist.

So the solution is to just avoid doing that.