fishaudio / fish-speech

Brand new TTS solution

Home Page:https://speech.fish.audio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] dependencies samplerate could not install on centos9

zergtant opened this issue · comments

when i run

pip3 install -e .

get error
subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for samplerate
Failed to build samplerate
ERROR: Could not build wheels for samplerate, which is required to install pyproject.toml-based projects

system info :

cat /etc/os-release
NAME="CentOS Stream"
VERSION="9"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="9"
PLATFORM_ID="platform:el9"
PRETTY_NAME="CentOS Stream 9"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:centos:centos:9"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

Can you provide the full error log?

Have you installed cmake ?

Can you provide the full error log?
here is full error log
`Building wheels for collected packages: fish-speech, antlr4-python3-runtime, samplerate, ffmpy
Building editable for fish-speech (pyproject.toml) ... done
Created wheel for fish-speech: filename=fish_speech-0.1.0-0.editable-py3-none-any.whl size=5611 sha256=fab53bc08d8a53b70041dbb9fdce9c5a0f6b58790259608c5dfa510f864a6363
Stored in directory: /tmp/pip-ephem-wheel-cache-qv8292ki/wheels/8b/0f/66/c766dd414ee5287ce45f3d43eda5fe282d04eb803a8bf6f9fa
Building wheel for antlr4-python3-runtime (setup.py) ... done
Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144554 sha256=fd924afad85f0ce2e4033bbcce3d810daaa9ae5efc98cb696bc4aa0edaf020e5
Stored in directory: /home/tant/.cache/pip/wheels/12/93/dd/1f6a127edc45659556564c5730f6d4e300888f4bca2d4c5a88
Building wheel for samplerate (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for samplerate (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [107 lines of output]
running bdist_wheel
running build
running build_ext
-- Found Python prefix
-- The C compiler identification is GNU 11.3.1
-- The CXX compiler identification is GNU 11.3.1
-- 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
-- pybind11 v2.10.4
-- Found PythonInterp: /home/tant/anaconda3/envs/fish-speech/bin/python (found suitable version "3.10.14", minimum required is "3.6")
-- Found PythonLibs: /home/tant/anaconda3/envs/fish-speech/lib/libpython3.10.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Looking for stdbool.h
-- Looking for stdbool.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.7.3")
-- Checking processor clipping capabilities...
-- Performing Test CPU_CLIPS_POSITIVE
-- Performing Test CPU_CLIPS_POSITIVE - Failed
-- Performing Test CPU_CLIPS_NEGATIVE
-- Performing Test CPU_CLIPS_NEGATIVE - Failed
-- Checking processor clipping capabilities... none
-- Performing Test HAVE_VISIBILITY
-- Performing Test HAVE_VISIBILITY - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-kwqw_v5y/samplerate_827c68b4f8c64b1c9606cce9a40b8eaa/build/temp.linux-x86_64-cpython-310/samplerate
[ 14%] Building C object _deps/libsamplerate-build/src/CMakeFiles/samplerate.dir/samplerate.c.o
[ 28%] Building C object _deps/libsamplerate-build/src/CMakeFiles/samplerate.dir/src_linear.c.o
[ 42%] Building C object _deps/libsamplerate-build/src/CMakeFiles/samplerate.dir/src_sinc.c.o
[ 57%] Building C object _deps/libsamplerate-build/src/CMakeFiles/samplerate.dir/src_zoh.c.o
[ 71%] Linking C static library libsamplerate.a
[ 71%] Built target samplerate
[ 85%] Building CXX object CMakeFiles/python-samplerate.dir/src/samplerate.cpp.o
[100%] Linking C shared module ../../lib.linux-x86_64-cpython-310/samplerate.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: _deps/libsamplerate-build/src/libsamplerate.a(samplerate.c.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: _deps/libsamplerate-build/src/libsamplerate.a(src_linear.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: _deps/libsamplerate-build/src/libsamplerate.a(src_sinc.c.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: _deps/libsamplerate-build/src/libsamplerate.a(src_zoh.c.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
collect2: 错误:ld 返回 1
gmake[2]: *** [CMakeFiles/python-samplerate.dir/build.make:99:../../lib.linux-x86_64-cpython-310/samplerate.cpython-310-x86_64-linux-gnu.so] 错误 1
gmake[1]: *** [CMakeFiles/Makefile2:148:CMakeFiles/python-samplerate.dir/all] 错误 2
gmake: *** [Makefile:111:all] 错误 2
Traceback (most recent call last):
File "/home/tant/anaconda3/envs/fish-speech/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/home/tant/anaconda3/envs/fish-speech/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/tant/anaconda3/envs/fish-speech/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 129, in
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/init.py", line 104, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-ityum7b2/normal/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 368, in run
self.run_command("build")
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 91, in run
_build_ext.run(self)
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
self._build_extensions_serial()
File "/tmp/pip-build-env-ityum7b2/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
self.build_extension(ext)
File "", line 124, in build_extension
File "/home/tant/anaconda3/envs/fish-speech/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 2.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for samplerate
Building wheel for ffmpy (setup.py) ... done
Created wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5584 sha256=7f3c13294c51b3496134bab649d258be380ace97195e138cdb50cd56e8363342
Stored in directory: /home/tant/.cache/pip/wheels/bd/65/9a/671fc6dcde07d4418df0c592f8df512b26d7a0029c2a23dd81
Successfully built fish-speech antlr4-python3-runtime ffmpy
Failed to build samplerate
ERROR: Could not build wheels for samplerate, which is required to install pyproject.toml-based projects
`

Have you installed cmake ?

installed

cmake --version
cmake version 3.20.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

我遇到了 同样的问题和错误
cmake
|make version 3.25.0
centos 7

解决方法:
export CFLAGS="-fPIC"
export CXXFLAGS="-fPIC"

pip install samplerate