xfstk 소스 코드를 다운로드하여 빌드했습니다. 등과 boost
같은 종속성을 설치했지만 libusb-devel
설치했는데도 설치되지 않았다는 boost
오류 메시지가 아래와 같이 표시됩니다 .boost
...some output code here
[ 0%] Built target docs
[ 1%] Built target xfstk-command-line
[ 2%] Automatic MOC for target XfstkFactory
[ 2%] Built target XfstkFactory_autogen
[ 39%] Built target XfstkFactory
[ 40%] Automatic MOC for target xfstk-dldr-api
[ 40%] Built target xfstk-dldr-api_autogen
[ 40%] Linking CXX shared library libxfstk-dldr-api.so
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/8/../../../libboost_program_options.so when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/8/../../../libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //lib/libboost_program_options.so when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //lib/libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //usr/lib/libboost_program_options.so when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //usr/lib/libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: cannot find -lboost_program_options
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/8/../../../libboost_program_options.so when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/8/../../../libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //lib/libboost_program_options.so when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //lib/libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //usr/lib/libboost_program_options.so when searching for -lboost_program_options
/usr/bin/ld: skipping incompatible //usr/lib/libboost_program_options.a when searching for -lboost_program_options
/usr/bin/ld: cannot find -lboost_program_options
collect2: error: ld returned 1 exit status
make[2]: *** [ancillary/configure/api/downloader-api/CMakeFiles/xfstk-dldr-api.dir/build.make:137: ancillary/configure/api/downloader-api/libxfstk-dldr-api.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:366: ancillary/configure/api/downloader-api/CMakeFiles/xfstk-dldr-api.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
[frogwine@leopardpro build]$
답변1
Linux 배포판에서 소프트웨어를 구축하려고 할 때 일반적으로 선택할 수 있는 경로는 두 가지가 있습니다.
옵션
- Linux 배포판의 패키지 관리자를 활용하여 어려운 작업을 수행하세요.
- 빌드/구성 도구가 인식할 수 있도록 자체 컴파일된 라이브러리를 LD의 경로에 병합합니다.
첫 번째 지점에서는 boost
배포판의 패키지 관리자를 사용하여 설치할 수 있습니다. 저는 다음과 같은 Redhat 배포판에 더 익숙합니다.
$ sudo yum search boost | grep ^boost | head
yum search boost | grep ^boost | head -10
boost-atomic.i686 : Run-Time component of boost atomic library
boost-atomic.x86_64 : Run-Time component of boost atomic library
boost-chrono.i686 : Run-Time component of boost chrono library
boost-chrono.x86_64 : Run-Time component of boost chrono library
boost-context.i686 : Run-Time component of boost context switching library
boost-context.x86_64 : Run-Time component of boost context switching library
boost-date-time.i686 : Run-Time component of boost date-time library
boost-date-time.x86_64 : Run-Time component of boost date-time library
boost-devel.i686 : The Boost C++ headers and shared development libraries
boost-devel.x86_64 : The Boost C++ headers and shared development libraries
그런 다음 이 출력에서 필요한 것을 설치하십시오.
$ sudo yum install -y boost boost-devel ....
옵션 2
두 번째 요점에 관해서는 다음과 같은 제목의 U&L Q&A에서 이 내용을 다뤘습니다.컴파일 시 부스트 라이브러리 연결에 대한 혼란.