1

I downloaded xfstk source and built it. I installed dependencies such as boost, libusb-devel etc... but although I installed boost, I getting error messages, such as the one below, reporting that boost is not installed.

...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]$ 
0
0

You typically have 2 paths to take when you're trying to build software on Linux distros.

Options

  1. Rely on the package manager of the Linux distro to do the heavy lifting for you
  2. Incorporate your self compiled libraries into LD's path so that build/config tools are aware of it.
Option 1

For number 1, you can install boost using your distros package manager. I'm more familiar with Redhat distros, and for these you'd do this:

$ 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

And then install whatever you need from this output:

$ sudo yum install -y boost boost-devel ....
Option 2

For number 2, I've covered this already in this U&L Q&A titled: Confusion about linking boost library while compilation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy