나는 VM을 설치할 수 있고 arm64 기반인 mopidy-spotify를 freebox delta에 설치하려고 합니다.
많은 문제 후에 나는 대부분의 종속성을 작동시키고 대부분의 오류를 제거했습니다.
하지만 pyspotify를 컴파일하려고 할 때 여전히 libspotify로 인해 어려움을 겪고 있습니다. 다음 소스를 사용하여 내 시스템에서 libspotify를 성공적으로 컴파일했습니다.그 링크
하지만 난 항상
로그 출력은 다음과 같습니다.
Obtaining file:///home/jc/pyspotify
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from pyspotify==2.1.3) (45.2.0)
Requirement already satisfied: cffi>=1.0.0 in /usr/local/lib/python3.8/dist-packages (from pyspotify==2.1.3) (1.14.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.0.0->pyspotify==2.1.3) (2.20)
Installing collected packages: pyspotify
Running setup.py develop for pyspotify
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/jc/pyspotify/setup.py'"'"'; __file__='"'"'/home/jc/pyspotify/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
cwd: /home/jc/pyspotify/
Complete output (22 lines):
running develop
running egg_info
writing pyspotify.egg-info/PKG-INFO
writing dependency_links to pyspotify.egg-info/dependency_links.txt
writing requirements to pyspotify.egg-info/requires.txt
writing top-level names to pyspotify.egg-info/top_level.txt
reading manifest file 'pyspotify.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'examples/tmp'
warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
writing manifest file 'pyspotify.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-aarch64-3.8/spotify._spotify.c'
already up-to-date
building 'spotify._spotify' extension
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c build/temp.linux-aarch64-3.8/spotify._spotify.c -o build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/spotify._spotify.o
aarch64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-aarch64-3.8/build/temp.linux-aarch64-3.8/spotify._spotify.o -lspotify -o build/lib.linux-aarch64-3.8/spotify/_spotify.abi3.so
/usr/bin/ld: skipping incompatible /usr/local/lib/libspotify.so when searching for -lspotify
/usr/bin/ld: cannot find -lspotify
collect2: error: ld returned 1 exit status
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
더 많은 정보 나 단서가 있으면 언제든지 문의해 주세요 .
답변1
32비트와 64비트 라이브러리를 혼합하려고 할 가능성이 높습니다. 32비트 애플리케이션은 32비트 라이브러리에 연결해야 하고, 64비트 애플리케이션은 64비트 라이브러리에 연결해야 합니다.
file /usr/local/lib/libspotify.so
다음을 실행하여 라이브러리가 32비트 또는 64비트용으로 컴파일되었는지 확인할 수 있습니다 .
다음 환경 변수를 설정하여 64비트 시스템에서 실행되는 GCC에 32비트 코드를 컴파일하도록 지시할 수 있습니다.
CFLAGS=-m32 CXXFLAGS=-m32 make