You are not logged in.

#1 2020-09-02 07:30:17

ibrokemypie
Member
Registered: 2016-06-27
Posts: 11

[SOLVED] CMake Error Imported target "Boost::system"

When building some packages that use cmake and include boost, such as musikcube or yuzu, they fail to build mentioning the eror below numerous times. This occurs both through makepkg and when attempting to build from source manually. The whole system is up to date, including cmake and boost, and the same packages succeed to build on another up to date arch system, so the issue must be configuration somehow but I have no idea where to look

The errors all look similar to this:

CMake Error in src/core/CMakeLists.txt:
  Imported target "Boost::system" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

Here is the full output of trying to build musikcube from source, following the instructions here
https://hastebin.com/gatogeriwe.rb

Help would be greatly appreciated!

Last edited by ibrokemypie (2020-09-02 08:30:31)

Offline

#2 2020-09-02 08:24:35

loqs
Member
Registered: 2014-03-06
Posts: 12,148

Re: [SOLVED] CMake Error Imported target "Boost::system"

What is the output of

pacman -Qikk boost boost-libs

Offline

#3 2020-09-02 08:29:03

ibrokemypie
Member
Registered: 2016-06-27
Posts: 11

Re: [SOLVED] CMake Error Imported target "Boost::system"

I seem to have worked it out! It turns out my login manager (ly) overrides the path variable? Comparing my path locally to path on a system that worked it was totally different, and I discovered it was being set in /etc/ly/config.ini to

path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin

Changing this to

path = /usr/local/sbin:/usr/local/bin:/usr/bin

, the path that was on the working machine, and then rebooting, totally solved the issue!

Offline

#4 2020-09-02 08:29:41

ibrokemypie
Member
Registered: 2016-06-27
Posts: 11

Re: [SOLVED] CMake Error Imported target "Boost::system"

loqs wrote:

What is the output of

pacman -Qikk boost boost-libs

I solved the issue but heres the output anyway!

  pacman -Qikk boost boost-libs
Name            : boost
Version         : 1.72.0-2
Description     : Free peer-reviewed portable C++ source libraries - development headers
Architecture    : x86_64
URL             : https://www.boost.org/
Licenses        : custom
Groups          : None
Provides        : None
Depends On      : boost-libs=1.72.0
Optional Deps   : python: for python bindings [installed]
                  python2: for python2 bindings [installed]
Required By     : lgogdownloader  musikcube-git
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 175.72 MiB
Packager        : Evangelos Foutras <evangelos@foutrelis.com>
Build Date      : Mon 27 Apr 2020 18:06:59
Install Date    : Fri 07 Aug 2020 15:00:24
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

boost: 15599 total files, 0 altered files
Name            : boost-libs
Version         : 1.72.0-2
Description     : Free peer-reviewed portable C++ source libraries - runtime libraries
Architecture    : x86_64
URL             : https://www.boost.org/
Licenses        : custom
Groups          : None
Provides        : libboost_atomic.so=1.72.0-64  libboost_chrono.so=1.72.0-64  libboost_container.so=1.72.0-64  libboost_context.so=1.72.0-64  libboost_contract.so=1.72.0-64  libboost_coroutine.so=1.72.0-64
                  libboost_date_time.so=1.72.0-64  libboost_fiber.so=1.72.0-64  libboost_filesystem.so=1.72.0-64  libboost_graph.so=1.72.0-64  libboost_graph_parallel.so=1.72.0-64  libboost_iostreams.so=1.72.0-64
                  libboost_locale.so=1.72.0-64  libboost_log.so=1.72.0-64  libboost_log_setup.so=1.72.0-64  libboost_math_c99.so=1.72.0-64  libboost_math_c99f.so=1.72.0-64  libboost_math_c99l.so=1.72.0-64
                  libboost_math_tr1.so=1.72.0-64  libboost_math_tr1f.so=1.72.0-64  libboost_math_tr1l.so=1.72.0-64  libboost_mpi.so=1.72.0-64  libboost_numpy27.so=1.72.0-64  libboost_numpy38.so=1.72.0-64
                  libboost_prg_exec_monitor.so=1.72.0-64  libboost_program_options.so=1.72.0-64  libboost_python27.so=1.72.0-64  libboost_python38.so=1.72.0-64  libboost_random.so=1.72.0-64
                  libboost_regex.so=1.72.0-64  libboost_serialization.so=1.72.0-64  libboost_stacktrace_addr2line.so=1.72.0-64  libboost_stacktrace_basic.so=1.72.0-64  libboost_stacktrace_noop.so=1.72.0-64
                  libboost_system.so=1.72.0-64  libboost_thread.so=1.72.0-64  libboost_timer.so=1.72.0-64  libboost_type_erasure.so=1.72.0-64  libboost_unit_test_framework.so=1.72.0-64  libboost_wave.so=1.72.0-64
                  libboost_wserialization.so=1.72.0-64
Depends On      : bzip2  zlib  icu  zstd
Optional Deps   : openmpi: for mpi support [installed]
Required By     : adriconf  assimp  boost  ceph-libs  krita  libtorrent-rasterbar  monero  monero-gui  mupen64plus  pamixer  pulseeffects
Optional For    : openexr
Conflicts With  : None
Replaces        : None
Installed Size  : 10.52 MiB
Packager        : Evangelos Foutras <evangelos@foutrelis.com>
Build Date      : Mon 27 Apr 2020 18:06:59
Install Date    : Fri 07 Aug 2020 14:57:48
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

boost-libs: 179 total files, 0 altered files

Offline

#5 2020-09-20 10:27:11

KatsukiMizutani
Member
Registered: 2017-02-12
Posts: 2

Re: [SOLVED] CMake Error Imported target "Boost::system"

ibrokemypie wrote:

I seem to have worked it out! It turns out my login manager (ly) overrides the path variable? Comparing my path locally to path on a system that worked it was totally different, and I discovered it was being set in /etc/ly/config.ini to

path = /sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin

Changing this to

path = /usr/local/sbin:/usr/local/bin:/usr/bin

, the path that was on the working machine, and then rebooting, totally solved the issue!

I have the same problem, I am using ly too. This worked for me. Thank you. big_smile

Offline

#6 2020-12-01 20:39:45

Wild Penguin
Member
Registered: 2015-03-19
Posts: 190

Re: [SOLVED] CMake Error Imported target "Boost::system"

I'm having this issue while trying to compile rstudio-desktop (from AUR).

More specifically, something sets /bin (and /usr/bin) in the front of search path, which causes failure. I'm not sure what sets it (I'm not using ly but sddm as a display manager and KDE Plasma). I've noticed that while logging in from console, the path is slightly different. I can reproduce this at will by changing the search path (removing or adding /bin is the culptrit)!

The real question is: why does setting the PATH differently cause failure with cmake/boost? Shouldn't this be reported somewhere, and if so, where? Is this a cmake bug, boost bug, or something else?

Bear with me, I'm not quite familiar with cmake and all this related compiling stuff ;-) . I can only understand something sets the include directories (variables in cmake) incorrectly, possibly because calling a binary in a wrong location?

$ echo $PATH
/home/ville/bin:/home/ville/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/plan9/bin

This path will cause failure, in this way:

$ LANG=C makepkg
==> Making package: rstudio-desktop 1.3.1093-1 (Tue Dec  1 22:36:50 2020)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found rstudio-1.3.1093.tar.gz
  -> Found core-dictionaries.zip
==> Validating source files with sha256sums...
    rstudio-1.3.1093.tar.gz ... Passed
    core-dictionaries.zip ... Passed
==> Extracting sources...
  -> Extracting rstudio-1.3.1093.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
[1] "/usr/lib64/R" is not writable. Creating user R library directory.
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /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: /bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LSB release: arch
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Found Boost: /lib64/cmake/Boost-1.72.0/BoostConfig.cmake (found suitable version "1.72.0", minimum required is "1.69.0")  
-- Found Boost: /lib64/cmake/Boost-1.72.0/BoostConfig.cmake (found suitable version "1.72.0", minimum required is "1.69.0") found components: atomic chrono date_time filesystem iostreams program_options random regex system thread 
-- Using Boost.Signals version 2
-- No Crashpad libraries found under /opt/rstudio-tools/crashpad/crashpad/out/Default/obj. Crashpad integration disabled.
-- Performing Test HAVE_SCANDIR_POSIX
-- Performing Test HAVE_SCANDIR_POSIX - Success
-- Looking for SA_NOCLDWAIT
-- Looking for SA_NOCLDWAIT - found
-- Looking for SO_PEERCRED
-- Looking for SO_PEERCRED - found
-- Looking for inotify_init1
-- Looking for inotify_init1 - found
-- Looking for getpeereid
-- Looking for getpeereid - not found
-- Looking for setresuid
-- Looking for setresuid - found
-- Configured to build DESKTOP
-- Found LibR: /usr/lib64/R  
-- Found R: /usr/lib64/R
-- Found Qt: /usr/bin/qmake-qt5
-- Configuring done
CMake Error in src/cpp/shared_core/CMakeLists.txt:
  Imported target "Boost::atomic" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in src/cpp/shared_core/CMakeLists.txt:
  Imported target "Boost::atomic" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in src/cpp/desktop/CMakeLists.txt:
  Imported target "Boost::atomic" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in src/cpp/desktop/CMakeLists.txt:
  Imported target "Boost::atomic" includes non-existent path

    "/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
==> ERROR: A failure occurred in build().
    Aborting...

However, with this small change, compiling works without issues:

PATH=/home/ville/bin:/home/ville/usr/bin:/usr/lib/ccache/bin/:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/plan9/bin

Cheers!

p.s. Sorry if this is considered necrobumping (two months old thread); but I believe replying here is more convenient and constructive than starting a new thread.

Last edited by Wild Penguin (2020-12-01 20:41:00)

Offline

#7 Yesterday 05:15:44

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,778

Re: [SOLVED] CMake Error Imported target "Boost::system"

Because cmake is dumb, and it looks at the path the binary was invoked as in order to figure out what your "system prefix" is.

It was compiled for /usr/bin/cmake, so instead of embedding "/usr" it looks at /usr/bin/cmake, and runs:

dirname /usr/bin/cmake -> /usr/bin
dirname /usr/bin -> /usr

"the system root must be /usr, let's look for things in /usr/include or /usr/lib"

Or... it looks at /bin/cmake, and runs:

dirname /bin/cmake -> /bin
dirname /bin -> /

"the system root must be /, let's look for things in /include or /lib".


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB