centos7 安装 pylzma 失败:/usr/bin/ld: this linker was not configured to use sysroots
问题背景:
centos7 安装 pythond的 pylzma 模块失败。
报错内容:
pip install pylzma Collecting pylzma Using cached pylzma-0.5.0.tar.gz (4.2 MB) Building wheels for collected packages: pylzma Building wheel for pylzma (setup.py) ... error ERROR: Command errored out with exit status 1: command: /data/algo/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-x8zstql_ cwd: /tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/ Complete output (74 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.6 copying py7zlib.py -> build/lib.linux-x86_64-3.6 running build_ext /tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py:107: UnsupportedPlatformWarning: Multithreading is not supported on the platform "linux", please contact mail@joachim-bauch.de for more informations. please contact mail@joachim-bauch.de for more informations.""" % (sys.platform), UnsupportedPlatformWarning) building 'pylzma' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src creating build/temp.linux-x86_64-3.6/src/pylzma creating build/temp.linux-x86_64-3.6/src/sdk creating build/temp.linux-x86_64-3.6/src/sdk/C creating build/temp.linux-x86_64-3.6/src/compat gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_aes.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_aes.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_compress.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compress.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_compressfile.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compressfile.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompress.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompressobj.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj.o src/pylzma/pylzma_decompressobj.c: In function ‘pylzma_decomp_decompress’: src/pylzma/pylzma_decompressobj.c:99:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((self->unconsumed_length + length) < propertiesLength) { ^ src/pylzma/pylzma_decompressobj.c: In function ‘pylzma_decomp_flush’: src/pylzma/pylzma_decompressobj.c:232:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (self->max_length != -1) { ^ src/pylzma/pylzma_decompressobj.c:288:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (!outProcessed && self->max_length != -1 && self->total_out < self->max_length) { ^ src/pylzma/pylzma_decompressobj.c:296:88: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (outProcessed < avail_out || (outProcessed == avail_out && self->max_length != -1)) { ^ src/pylzma/pylzma_decompressobj.c:300:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (self->max_length != -1) { ^ src/pylzma/pylzma_decompressobj.c:317:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (outsize != PyBytes_GET_SIZE(result)) { ^ gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_streams.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_streams.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompress_compat.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress_compat.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompressobj_compat.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj_compat.o src/pylzma/pylzma_decompressobj_compat.c: In function ‘pylzma_decomp_decompress’: src/pylzma/pylzma_decompressobj_compat.c:119:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (self->stream.avail_in != self->unconsumed_length) ^ gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Aes.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Aes.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/AesOpt.c -o build/temp.linux-x86_64-3.6/src/sdk/C/AesOpt.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Bra.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Bra.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Bra86.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Bra86.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/BraIA64.c -o build/temp.linux-x86_64-3.6/src/sdk/C/BraIA64.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/CpuArch.c -o build/temp.linux-x86_64-3.6/src/sdk/C/CpuArch.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/LzFind.c -o build/temp.linux-x86_64-3.6/src/sdk/C/LzFind.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/LzmaDec.c -o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaDec.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/LzmaEnc.c -o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaEnc.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Lzma2Dec.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Dec.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Lzma2Enc.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Enc.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Sha256.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Sha256.o src/sdk/C/Sha256.c: In function ‘Sha256_Final’: src/sdk/C/Sha256.c:232:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SetBe32(p->buffer + 64 - 8, (UInt32)(numBits >> 32)); ^ src/sdk/C/Sha256.c:233:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SetBe32(p->buffer + 64 - 4, (UInt32)(numBits)); ^ gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/compat/LzmaCompatDecode.c -o build/temp.linux-x86_64-3.6/src/compat/LzmaCompatDecode.o gcc -pthread -shared -B /home/upchina/anaconda3/compiler_compat -L/home/upchina/anaconda3/lib -Wl,-rpath=/home/upchina/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/src/pylzma/pylzma.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_aes.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compress.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compressfile.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_streams.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress_compat.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj_compat.o build/temp.linux-x86_64-3.6/src/sdk/C/Aes.o build/temp.linux-x86_64-3.6/src/sdk/C/AesOpt.o build/temp.linux-x86_64-3.6/src/sdk/C/Bra.o build/temp.linux-x86_64-3.6/src/sdk/C/Bra86.o build/temp.linux-x86_64-3.6/src/sdk/C/BraIA64.o build/temp.linux-x86_64-3.6/src/sdk/C/CpuArch.o build/temp.linux-x86_64-3.6/src/sdk/C/LzFind.o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaDec.o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaEnc.o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Dec.o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Enc.o build/temp.linux-x86_64-3.6/src/sdk/C/Sha256.o build/temp.linux-x86_64-3.6/src/compat/LzmaCompatDecode.o -o build/lib.linux-x86_64-3.6/pylzma.cpython-36m-x86_64-linux-gnu.so /usr/bin/ld: this linker was not configured to use sysroots collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for pylzma Running setup.py clean for pylzma Failed to build pylzma Installing collected packages: pylzma Running setup.py install for pylzma ... error ERROR: Command errored out with exit status 1: command: /data/algo/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v4_r8p5x/install-record.txt --single-version-externally-managed --compile --install-headers /data/algo/anaconda3/include/python3.6m/pylzma cwd: /tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/ Complete output (74 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 copying py7zlib.py -> build/lib.linux-x86_64-3.6 running build_ext /tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py:107: UnsupportedPlatformWarning: Multithreading is not supported on the platform "linux", please contact mail@joachim-bauch.de for more informations. please contact mail@joachim-bauch.de for more informations.""" % (sys.platform), UnsupportedPlatformWarning) building 'pylzma' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src creating build/temp.linux-x86_64-3.6/src/pylzma creating build/temp.linux-x86_64-3.6/src/sdk creating build/temp.linux-x86_64-3.6/src/sdk/C creating build/temp.linux-x86_64-3.6/src/compat gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_aes.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_aes.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_compress.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compress.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_compressfile.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compressfile.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompress.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompressobj.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj.o src/pylzma/pylzma_decompressobj.c: In function ‘pylzma_decomp_decompress’: src/pylzma/pylzma_decompressobj.c:99:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((self->unconsumed_length + length) < propertiesLength) { ^ src/pylzma/pylzma_decompressobj.c: In function ‘pylzma_decomp_flush’: src/pylzma/pylzma_decompressobj.c:232:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (self->max_length != -1) { ^ src/pylzma/pylzma_decompressobj.c:288:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (!outProcessed && self->max_length != -1 && self->total_out < self->max_length) { ^ src/pylzma/pylzma_decompressobj.c:296:88: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (outProcessed < avail_out || (outProcessed == avail_out && self->max_length != -1)) { ^ src/pylzma/pylzma_decompressobj.c:300:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (self->max_length != -1) { ^ src/pylzma/pylzma_decompressobj.c:317:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (outsize != PyBytes_GET_SIZE(result)) { ^ gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_streams.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_streams.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompress_compat.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress_compat.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/pylzma/pylzma_decompressobj_compat.c -o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj_compat.o src/pylzma/pylzma_decompressobj_compat.c: In function ‘pylzma_decomp_decompress’: src/pylzma/pylzma_decompressobj_compat.c:119:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (self->stream.avail_in != self->unconsumed_length) ^ gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Aes.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Aes.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/AesOpt.c -o build/temp.linux-x86_64-3.6/src/sdk/C/AesOpt.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Bra.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Bra.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Bra86.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Bra86.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/BraIA64.c -o build/temp.linux-x86_64-3.6/src/sdk/C/BraIA64.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/CpuArch.c -o build/temp.linux-x86_64-3.6/src/sdk/C/CpuArch.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/LzFind.c -o build/temp.linux-x86_64-3.6/src/sdk/C/LzFind.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/LzmaDec.c -o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaDec.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/LzmaEnc.c -o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaEnc.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Lzma2Dec.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Dec.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Lzma2Enc.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Enc.o gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/sdk/C/Sha256.c -o build/temp.linux-x86_64-3.6/src/sdk/C/Sha256.o src/sdk/C/Sha256.c: In function ‘Sha256_Final’: src/sdk/C/Sha256.c:232:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SetBe32(p->buffer + 64 - 8, (UInt32)(numBits >> 32)); ^ src/sdk/C/Sha256.c:233:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SetBe32(p->buffer + 64 - 4, (UInt32)(numBits)); ^ gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPY_SSIZE_T_CLEAN=1 -DWITH_COMPAT=1 -DPYLZMA_VERSION=0.5.0 -D_7ZIP_ST=1 -Isrc/sdk/C -I/data/algo/anaconda3/include/python3.6m -c src/compat/LzmaCompatDecode.c -o build/temp.linux-x86_64-3.6/src/compat/LzmaCompatDecode.o gcc -pthread -shared -B /home/upchina/anaconda3/compiler_compat -L/home/upchina/anaconda3/lib -Wl,-rpath=/home/upchina/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/src/pylzma/pylzma.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_aes.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compress.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_compressfile.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_streams.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompress_compat.o build/temp.linux-x86_64-3.6/src/pylzma/pylzma_decompressobj_compat.o build/temp.linux-x86_64-3.6/src/sdk/C/Aes.o build/temp.linux-x86_64-3.6/src/sdk/C/AesOpt.o build/temp.linux-x86_64-3.6/src/sdk/C/Bra.o build/temp.linux-x86_64-3.6/src/sdk/C/Bra86.o build/temp.linux-x86_64-3.6/src/sdk/C/BraIA64.o build/temp.linux-x86_64-3.6/src/sdk/C/CpuArch.o build/temp.linux-x86_64-3.6/src/sdk/C/LzFind.o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaDec.o build/temp.linux-x86_64-3.6/src/sdk/C/LzmaEnc.o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Dec.o build/temp.linux-x86_64-3.6/src/sdk/C/Lzma2Enc.o build/temp.linux-x86_64-3.6/src/sdk/C/Sha256.o build/temp.linux-x86_64-3.6/src/compat/LzmaCompatDecode.o -o build/lib.linux-x86_64-3.6/pylzma.cpython-36m-x86_64-linux-gnu.so /usr/bin/ld: this linker was not configured to use sysroots collect2: error: ld returned 1 exit status error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /data/algo/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z58heye3/pylzma_db286d89a8e64a96a0d04fe8c43c0eb5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-v4_r8p5x/install-record.txt --single-version-externally-managed --compile --install-headers /data/algo/anaconda3/include/python3.6m/pylzma Check the logs for full command output. WARNING: You are using pip version 21.0.1; however, version 21.3.1 is available. You should consider upgrading via the '/data/algo/anaconda3/bin/python -m pip install --upgrade pip' command. You have mail in /var/spool/mail/upchina [upchina@factor-227 ~]$ ls algoproto-1.0.551-py3-none-any.whl app_log heliang liwang logs pylzma-0.5.0.tar.gz
总结一下问题:
gcc -pthread -B /home/upchina/anaconda3/compiler_compat -Wl,--sysroot=/
/usr/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
网上搜了相关的问题,这篇文章启发最大。
给电脑安装 binutils
sudo yum install binutils
重新安装 pylzma
pip install pylzma
安装成功!!!!