Skip to content

Cannot build manylinux wheels #265

@Crozzers

Description

@Crozzers

Using the PyPA manylinux docker images, I am unable to build the wheels for this package. Running the command python3.10 -m pip wheel . generates the following error:

running bdist_wheel
running build
running build_ext

==> Configuring:
$ cmake -S /pocketsphinx-build/pocketsphinx -B /pocketsphinx-build/pocketsphinx/build/temp.linux-x86_64-cpython-310_pocketsphinx5 -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/pocketsphinx-build/pocketsphinx/build/lib.linux-x86_64-cpython-310/pocketsphinx5 -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DPython3_ROOT_DIR=/opt/_internal/cpython-3.10.5 -DCALL_FROM_SETUP_PY:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF

==> Building:
$ cmake --build /pocketsphinx-build/pocketsphinx/build/temp.linux-x86_64-cpython-310_pocketsphinx5 --config Release

==> Installing:
$ cmake --install /pocketsphinx-build/pocketsphinx/build/temp.linux-x86_64-cpython-310_pocketsphinx5

-- SIZEOF_LONG="8" ; SIZEOF_LONG_LONG="8"
-- WORDS_BIGENDIAN="0"
-- SPHINX_DEBUG="" ; DEBUG_ENDIAN=""
-- FIXED_POINT="OFF" ; DEFAULT_RADIX="12"
-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development Development.Module Development.Embed) (found version "3.11.0")
-- Configuring done
CMake Error at /opt/_internal/pipx/venvs/cmake/lib/python3.9/site-packages/cmake/data/share/cmake-3.22/Modules/UseSWIG.cmake:905 (add_library):
  Target "bindings" links to target "Python3::Python" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  swig/python/CMakeLists.txt:16 (swig_add_library)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I have tried adding arguments to the cmake_configure_options in setup.py like:

-DPython3_EXECUTABLE=/opt/python/cp310-cp310/bin/python
-DPython3_INCLUDE_DIRS=/opt/python/cp310-cp310/include
-DPython3_LIBRARIES=/opt/python/cp310-cp310/lib

But none of these had any effect.
Here are the commands I ran in the latest x86_64 manylinux docker container:

mkdir pocketsphinx-build && cd pocketsphinx-build
git clone https://github.com/cmusphinx/pocketsphinx && cd pocketsphinx
apt update && apt install swig autoconf automake make pulseaudio tk libasound2-dev libpulse-dev python3-dev python-dev ninja-build -y
python3.10 -m pip install -r requirements.dev.txt
python3.10 -m pip wheel .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions