Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] boost/1.73.0: undefined reference to `jump_fcontext' #3159

Closed
sturmf opened this issue Oct 9, 2020 · 21 comments
Closed

[package] boost/1.73.0: undefined reference to `jump_fcontext' #3159

sturmf opened this issue Oct 9, 2020 · 21 comments
Labels
bug Something isn't working

Comments

@sturmf
Copy link

sturmf commented Oct 9, 2020

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: boost/1.73.0
  • Operating System+version: Linux Ubuntu 18.04.4
  • Compiler+version: GCC 7.5.0
  • Conan version: conan 1.26.0
  • Python version: Python 3.6.9
  • CMake version: CMake 3.10.2

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++11
build_type=Release
[options]
[build_requires]
[env]

This gets enhanced by the selected settings of the conan-package-builder:

Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
boost:shared=False
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Running conan-package-tools 0.34.3 can build the first boost variants (shared=True) without problems but fails on this one which seems to be the first with shared=False. The failure seems to happen during the test_package linking step of coroutine_exe.

Logs (Include/Attach if Applicable)

Click to expand log
boost/1.73.0 (test package): Calling build()
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Compiler GCC>=5, checking major version 7
-- Conan: Checking correct version: 7
-- Conan: C++ stdlib: libstdc++11
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1094 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1096 ] Boost_USE_MULTITHREADED = TRUE
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1098 ] Boost_USE_STATIC_LIBS = True
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1100 ] Boost_USE_STATIC_RUNTIME =
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1102 ] Boost_ADDITIONAL_VERSIONS =
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1104 ] Boost_NO_SYSTEM_PATHS =
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1172 ] Declared as CMake or Environmental Variables:
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1174 ]   BOOST_ROOT =
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1176 ]   BOOST_INCLUDEDIR =
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1178 ]   BOOST_LIBRARYDIR =
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1180 ] _boost_TEST_VERSIONS = 1.65.1;1.65.0;1.65;1.64.0;1.64;1.63.0;1.63;1.62.0;1.62;1.61.0;1.61;1.60.0;1.60;1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1255 ] Include debugging info:
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1257 ]   _boost_INCLUDE_SEARCH_DIRS = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782;PATHS;C:/boost/include;C:/boost;/sw/local/include
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1259 ]   _boost_PATH_SUFFIXES = boost-1_65_1;boost_1_65_1;boost/boost-1_65_1;boost/boost_1_65_1;boost-1_65_0;boost_1_65_0;boost/boost-1_65_0;boost/boost_1_65_0;boost-1_65;boost_1_65;boost/boost-1_65;boost/boost_1_65;boost-1_64_0;boost_1_64_0;boost/boost-1_64_0;boost/boost_1_64_0;boost-1_64;boost_1_64;boost/boost-1_64;boost/boost_1_64;boost-1_63_0;boost_1_63_0;boost/boost-1_63_0;boost/boost_1_63_0;boost-1_63;boost_1_63;boost/boost-1_63;boost/boost_1_63;boost-1_62_0;boost_1_62_0;boost/boost-1_62_0;boost/boost_1_62_0;boost-1_62;boost_1_62;boost/boost-1_62;boost/boost_1_62;boost-1_61_0;boost_1_61_0;boost/boost-1_61_0;boost/boost_1_61_0;boost-1_61;boost_1_61;boost/boost-1_61;boost/boost_1_61;boost-1_60_0;boost_1_60_0;boost/boost-1_60_0;boost/boost_1_60_0;boost-1_60;boost_1_60;boost/boost-1_60;boost/boost_1_60;boost-1_59_0;boost_1_59_0;boost/boost-1_59_0;boost/boost_1_59_0;boost-1_59;boost_1_59;boost/boost-1_59;boost/boost_1_59;boost-1_58_0;boost_1_58_0;boost/boost-1_58_0;boost/boost_1_58_0;boost-1_58;boost_1_58;boost/boost-1_58;boost/boost_1_58;boost-1_57_0;boost_1_57_0;boost/boost-1_57_0;boost/boost_1_57_0;boost-1_57;boost_1_57;boost/boost-1_57;boost/boost_1_57;boost-1_56_0;boost_1_56_0;boost/boost-1_56_0;boost/boost_1_56_0;boost-1_56;boost_1_56;boost/boost-1_56;boost/boost_1_56;boost-1_55_0;boost_1_55_0;boost/boost-1_55_0;boost/boost_1_55_0;boost-1_55;boost_1_55;boost/boost-1_55;boost/boost_1_55;boost-1_54_0;boost_1_54_0;boost/boost-1_54_0;boost/boost_1_54_0;boost-1_54;boost_1_54;boost/boost-1_54;boost/boost_1_54;boost-1_53_0;boost_1_53_0;boost/boost-1_53_0;boost/boost_1_53_0;boost-1_53;boost_1_53;boost/boost-1_53;boost/boost_1_53;boost-1_52_0;boost_1_52_0;boost/boost-1_52_0;boost/boost_1_52_0;boost-1_52;boost_1_52;boost/boost-1_52;boost/boost_1_52;boost-1_51_0;boost_1_51_0;boost/boost-1_51_0;boost/boost_1_51_0;boost-1_51;boost_1_51;boost/boost-1_51;boost/boost_1_51;boost-1_50_0;boost_1_50_0;boost/boost-1_50_0;boost/boost_1_50_0;boost-1_50;boost_1_50;boost/boost-1_50;boost/boost_1_50;boost-1_49_0;boost_1_49_0;boost/boost-1_49_0;boost/boost_1_49_0;boost-1_49;boost_1_49;boost/boost-1_49;boost/boost_1_49;boost-1_48_0;boost_1_48_0;boost/boost-1_48_0;boost/boost_1_48_0;boost-1_48;boost_1_48;boost/boost-1_48;boost/boost_1_48;boost-1_47_0;boost_1_47_0;boost/boost-1_47_0;boost/boost_1_47_0;boost-1_47;boost_1_47;boost/boost-1_47;boost/boost_1_47;boost-1_46_1;boost_1_46_1;boost/boost-1_46_1;boost/boost_1_46_1;boost-1_46_0;boost_1_46_0;boost/boost-1_46_0;boost/boost_1_46_0;boost-1_46;boost_1_46;boost/boost-1_46;boost/boost_1_46;boost-1_45_0;boost_1_45_0;boost/boost-1_45_0;boost/boost_1_45_0;boost-1_45;boost_1_45;boost/boost-1_45;boost/boost_1_45;boost-1_44_0;boost_1_44_0;boost/boost-1_44_0;boost/boost_1_44_0;boost-1_44;boost_1_44;boost/boost-1_44;boost/boost_1_44;boost-1_43_0;boost_1_43_0;boost/boost-1_43_0;boost/boost_1_43_0;boost-1_43;boost_1_43;boost/boost-1_43;boost/boost_1_43;boost-1_42_0;boost_1_42_0;boost/boost-1_42_0;boost/boost_1_42_0;boost-1_42;boost_1_42;boost/boost-1_42;boost/boost_1_42;boost-1_41_0;boost_1_41_0;boost/boost-1_41_0;boost/boost_1_41_0;boost-1_41;boost_1_41;boost/boost-1_41;boost/boost_1_41;boost-1_40_0;boost_1_40_0;boost/boost-1_40_0;boost/boost_1_40_0;boost-1_40;boost_1_40;boost/boost-1_40;boost/boost_1_40;boost-1_39_0;boost_1_39_0;boost/boost-1_39_0;boost/boost_1_39_0;boost-1_39;boost_1_39;boost/boost-1_39;boost/boost_1_39;boost-1_38_0;boost_1_38_0;boost/boost-1_38_0;boost/boost_1_38_0;boost-1_38;boost_1_38;boost/boost-1_38;boost/boost_1_38;boost-1_37_0;boost_1_37_0;boost/boost-1_37_0;boost/boost_1_37_0;boost-1_37;boost_1_37;boost/boost-1_37;boost/boost_1_37;boost-1_36_1;boost_1_36_1;boost/boost-1_36_1;boost/boost_1_36_1;boost-1_36_0;boost_1_36_0;boost/boost-1_36_0;boost/boost_1_36_0;boost-1_36;boost_1_36;boost/boost-1_36;boost/boost_1_36;boost-1_35_1;boost_1_35_1;boost/boost-1_35_1;boost/boost_1_35_1;boost-1_35_0;boost_1_35_0;boost/boost-1_35_0;boost/boost_1_35_0;boost-1_35;boost_1_35;boost/boost-1_35;boost/boost_1_35;boost-1_34_1;boost_1_34_1;boost/boost-1_34_1;boost/boost_1_34_1;boost-1_34_0;boost_1_34_0;boost/boost-1_34_0;boost/boost_1_34_0;boost-1_34;boost_1_34;boost/boost-1_34;boost/boost_1_34;boost-1_33_1;boost_1_33_1;boost/boost-1_33_1;boost/boost_1_33_1;boost-1_33_0;boost_1_33_0;boost/boost-1_33_0;boost/boost_1_33_0;boost-1_33;boost_1_33;boost/boost-1_33;boost/boost_1_33
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1279 ] location of version.hpp: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/boost/version.hpp
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1303 ] version.hpp reveals boost 1.73.0
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1389 ] guessed _boost_COMPILER = -gcc7
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1399 ] _boost_MULTITHREADED = -mt
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1443 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1445 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1507 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/stage/lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/../lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG   = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/stage/lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/../lib;/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/include/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)


-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for COROUTINE_LIBRARY_RELEASE: boost_coroutine-gcc7-mt-1_73;boost_coroutine-gcc7-mt;boost_coroutine-mt-1_73;boost_coroutine-mt;boost_coroutine
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for COROUTINE_LIBRARY_DEBUG: boost_coroutine-gcc7-mt-d-1_73;boost_coroutine-gcc7-mt-d;boost_coroutine-mt-d-1_73;boost_coroutine-mt-d;boost_coroutine-mt;boost_coroutine
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-gcc7-mt-1_73;boost_thread-gcc7-mt;boost_thread-mt-1_73;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-gcc7-mt-d-1_73;boost_thread-gcc7-mt-d;boost_thread-mt-d-1_73;boost_thread-mt-d;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for RANDOM_LIBRARY_RELEASE: boost_random-gcc7-mt-1_73;boost_random-gcc7-mt;boost_random-mt-1_73;boost_random-mt;boost_random
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for RANDOM_LIBRARY_DEBUG: boost_random-gcc7-mt-d-1_73;boost_random-gcc7-mt-d;boost_random-mt-d-1_73;boost_random-mt-d;boost_random-mt;boost_random
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-gcc7-mt-1_73;boost_regex-gcc7-mt;boost_regex-mt-1_73;boost_regex-mt;boost_regex
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-gcc7-mt-d-1_73;boost_regex-gcc7-mt-d;boost_regex-mt-d-1_73;boost_regex-mt-d;boost_regex-mt;boost_regex
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for CHRONO_LIBRARY_RELEASE: boost_chrono-gcc7-mt-1_73;boost_chrono-gcc7-mt;boost_chrono-mt-1_73;boost_chrono-mt;boost_chrono
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for CHRONO_LIBRARY_DEBUG: boost_chrono-gcc7-mt-d-1_73;boost_chrono-gcc7-mt-d;boost_chrono-mt-d-1_73;boost_chrono-mt-d;boost_chrono-mt;boost_chrono
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for CONTEXT_LIBRARY_RELEASE: boost_context-gcc7-mt-1_73;boost_context-gcc7-mt;boost_context-mt-1_73;boost_context-mt;boost_context
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for CONTEXT_LIBRARY_DEBUG: boost_context-gcc7-mt-d-1_73;boost_context-gcc7-mt-d;boost_context-mt-d-1_73;boost_context-mt-d;boost_context-mt;boost_context
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-gcc7-mt-1_73;boost_system-gcc7-mt;boost_system-mt-1_73;boost_system-mt;boost_system
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-gcc7-mt-d-1_73;boost_system-gcc7-mt-d;boost_system-mt-d-1_73;boost_system-mt-d;boost_system-mt;boost_system
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc7-mt-1_73;boost_date_time-gcc7-mt;boost_date_time-mt-1_73;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc7-mt-d-1_73;boost_date_time-gcc7-mt-d;boost_date_time-mt-d-1_73;boost_date_time-mt-d;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1657 ] Searching for ATOMIC_LIBRARY_RELEASE: boost_atomic-gcc7-mt-1_73;boost_atomic-gcc7-mt;boost_atomic-mt-1_73;boost_atomic-mt;boost_atomic
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_RELEASE = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1708 ] Searching for ATOMIC_LIBRARY_DEBUG: boost_atomic-gcc7-mt-d-1_73;boost_atomic-gcc7-mt-d;boost_atomic-mt-d-1_73;boost_atomic-mt-d;boost_atomic-mt;boost_atomic
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:380 ]  Boost_LIBRARY_DIR_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib _boost_LIBRARY_SEARCH_DIRS_DEBUG = /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib;NO_DEFAULT_PATH;NO_CMAKE_FIND_ROOT_PATH
-- [ /usr/share/cmake-3.10/Modules/FindBoost.cmake:1783 ] Boost_FOUND = 1
-- Boost version: 1.73.0
-- Found the following Boost libraries:
--   coroutine
--   thread
--   random
--   regex
--   chrono
--   system
--   date_time
--   atomic
LIBS=> boost_wave;boost_container;boost_contract;boost_exception;boost_graph;boost_iostreams;boost_locale;boost_log;boost_program_options;boost_random;boost_regex;boost_serialization;boost_wserialization;boost_coroutine;boost_fiber;boost_context;boost_timer;boost_thread;boost_chrono;boost_date_time;boost_atomic;boost_filesystem;boost_system;boost_type_erasure;boost_log_setup;boost_math_c99;boost_math_c99f;boost_math_c99l;boost_math_tr1;boost_math_tr1f;boost_math_tr1l;boost_nowide;boost_stacktrace_addr2line;boost_stacktrace_backtrace;boost_stacktrace_basic;boost_stacktrace_noop;boost_unit_test_framework;z;bz2;rt;pthread
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


-- Build files have been written to: /conan-center-index/recipes/boost/all/test_package/build/0e2e53b2223857eda3f858a4b2873ec16f0fff55
Scanning dependencies of target random_exe
Scanning dependencies of target lambda_exe
Scanning dependencies of target regex_exe
[  7%] Building CXX object CMakeFiles/random_exe.dir/random.cpp.o
Scanning dependencies of target newregex
[ 14%] Building CXX object CMakeFiles/lambda_exe.dir/lambda.cpp.o
[ 21%] Building CXX object CMakeFiles/regex_exe.dir/regex.cpp.o
Scanning dependencies of target test_exe
Scanning dependencies of target chrono_exe
Scanning dependencies of target coroutine_exe
[ 28%] Building CXX object CMakeFiles/newregex.dir/regex.cpp.o
[ 35%] Building CXX object CMakeFiles/test_exe.dir/test.cpp.o
[ 42%] Building CXX object CMakeFiles/chrono_exe.dir/chrono.cpp.o
[ 50%] Building CXX object CMakeFiles/coroutine_exe.dir/coroutine.cpp.o
[ 57%] Linking CXX executable bin/random_exe
[ 57%] Built target random_exe
[ 64%] Linking CXX executable bin/lambda_exe
[ 64%] Built target lambda_exe
[ 71%] Linking CXX executable bin/chrono_exe
[ 71%] Built target chrono_exe
[ 78%] Linking CXX executable bin/test_exe
[ 78%] Built target test_exe
[ 85%] Linking CXX executable bin/newregex
[ 85%] Built target newregex
[ 92%] Linking CXX executable bin/regex_exe
[ 92%] Built target regex_exe
[100%] Linking CXX executable bin/coroutine_exe
/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a(coroutine_context.o): In function `boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&)':
coroutine_context.cpp:(.text+0x4f): undefined reference to `make_fcontext'
/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a(coroutine_context.o): In function `boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, void*)':
coroutine_context.cpp:(.text+0xe9): undefined reference to `jump_fcontext'
collect2: error: ld returned 1 exit status
CMakeFiles/coroutine_exe.dir/build.make:103: recipe for target 'bin/coroutine_exe' failed
make[2]: *** [bin/coroutine_exe] Error 1
CMakeFiles/Makefile2:289: recipe for target 'CMakeFiles/coroutine_exe.dir/all' failed
make[1]: *** [CMakeFiles/coroutine_exe.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/conans/errors.py", line 34, in conanfile_exception_formatter
    yield
  File "/usr/local/lib/python3.6/dist-packages/conans/client/conanfile/build.py", line 16, in run_build_method
    conanfile.build()
  File "/conan-center-index/recipes/boost/all/test_package/conanfile.py", line 31, in build
    cmake.build()
  File "/usr/local/lib/python3.6/dist-packages/conans/client/build/cmake.py", line 288, in build
    self._build(args, build_dir, target)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/build/cmake.py", line 323, in _build
    self._run(command)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/build/cmake.py", line 243, in _run
    self._conanfile.run(command)
  File "/usr/local/lib/python3.6/dist-packages/conans/model/conan_file.py", line 287, in run
    raise ConanException("Error %d while executing %s" % (retcode, command))
conans.errors.ConanException: Error 2 while executing cmake --build '/conan-center-index/recipes/boost/all/test_package/build/0e2e53b2223857eda3f858a4b2873ec16f0fff55' '--' '-j8'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".gitlab-ci/build.py", line 6, in <module>
    builder.run()
  File "/usr/local/lib/python3.6/dist-packages/cpt/packager.py", line 594, in run
    self.run_builds(base_profile_name=base_profile_name)
  File "/usr/local/lib/python3.6/dist-packages/cpt/packager.py", line 687, in run_builds
    r.run()
  File "/usr/local/lib/python3.6/dist-packages/cpt/runner.py", line 134, in run
    lockfile=self._lockfile)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 92, in wrapper
    return f(api, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 373, in create
    test_build_folder, test_folder, conanfile_path, recorder=recorder)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/cmd/create.py", line 43, in create
    recorder=recorder)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/cmd/test.py", line 40, in install_build_and_test
    install_folder=test_build_folder, test=reference)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/cmd/build.py", line 48, in cmd_build
    run_build_method(conan_file, app.hook_manager, conanfile_path=conanfile_path)
  File "/usr/local/lib/python3.6/dist-packages/conans/client/conanfile/build.py", line 16, in run_build_method
    conanfile.build()
  File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/dist-packages/conans/errors.py", line 40, in conanfile_exception_formatter
    raise ConanExceptionInUserConanfileMethod(msg)
conans.errors.ConanExceptionInUserConanfileMethod: boost/1.73.0 (test package): Error in build() method, line 31
        cmake.build()
        ConanException: Error 2 while executing cmake --build '/conan-center-index/recipes/boost/all/test_package/build/0e2e53b2223857eda3f858a4b2873ec16f0fff55' '--' '-j8'
root@2a5be8c01f6b:/conan-center-index#

@sturmf sturmf added the bug Something isn't working label Oct 9, 2020
@madebr
Copy link
Contributor

madebr commented Oct 9, 2020

See the Boost.Context docs.
It looks like the 2 missing symbols are functions created in assembly language.
See https://github.com/boostorg/context/tree/0e463a5b66ee905fadcb1f2891135830f6737501/src/asm for the files.
The files for amd64 are configured here: https://github.com/boostorg/context/blob/0e463a5b66ee905fadcb1f2891135830f6737501/build/Jamfile.v2#L614-L623
So you will have to skim through the build log why the assembly files were not used.

Is your assembler configured correctly?

@sturmf
Copy link
Author

sturmf commented Oct 9, 2020

@madebr thanks for the hint, I found those lines which do not look too wrong:

gcc.compile.asm /opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn/asm/make_x86_64_sysv_elf_gas.o
gcc.compile.asm /opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn/asm/jump_x86_64_sysv_elf_gas.o
gcc.compile.asm /opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn/asm/ontop_x86_64_sysv_elf_gas.o

and this is the dump of the object files:

root@2a5be8c01f6b:/opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn/asm# objdump -t
 jump_x86_64_sysv_elf_gas.o

jump_x86_64_sysv_elf_gas.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 jump_x86_64_sysv_elf_gas.S
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     F .text  000000000000006a jump_fcontext
root@2a5be8c01f6b:/opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn/asm# objdump -t
 make_x86_64_sysv_elf_gas.o

make_x86_64_sysv_elf_gas.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 make_x86_64_sysv_elf_gas.S
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
000000000000002c l       .text  0000000000000000 trampoline
000000000000002f l       .text  0000000000000000 finish
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     F .text  0000000000000038 make_fcontext
0000000000000000         *UND*  0000000000000000 _GLOBAL_OFFSET_TABLE_
0000000000000000         *UND*  0000000000000000 _exit
root@2a5be8c01f6b:/opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn/asm# objdump -t
 ontop_x86_64_sysv_elf_gas.o

ontop_x86_64_sysv_elf_gas.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 ontop_x86_64_sysv_elf_gas.S
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     F .text  0000000000000068 ontop_fcontext

@sturmf
Copy link
Author

sturmf commented Oct 9, 2020

and one directory up is a static library looking good too:

root@2a5be8c01f6b:/opt/conan/.conan/data/boost/1.73.0/_/_/build/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/boost/bin.v2/libs/context/build/gcc-7/rls/lnk-sttc/thrd-mlt/vsblt-hdn# objdump -t libboost_context.a
In archive libboost_context.a:

make_x86_64_sysv_elf_gas.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 make_x86_64_sysv_elf_gas.S
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
000000000000002c l       .text  0000000000000000 trampoline
000000000000002f l       .text  0000000000000000 finish
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     F .text  0000000000000038 make_fcontext
0000000000000000         *UND*  0000000000000000 _GLOBAL_OFFSET_TABLE_
0000000000000000         *UND*  0000000000000000 _exit



jump_x86_64_sysv_elf_gas.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 jump_x86_64_sysv_elf_gas.S
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     F .text  000000000000006a jump_fcontext



ontop_x86_64_sysv_elf_gas.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 ontop_x86_64_sysv_elf_gas.S
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 g     F .text  0000000000000068 ontop_fcontext



stack_traits.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 stack_traits.cpp
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .text._ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv       0000000000000000 .text._ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv
0000000000000000 l    d  .text._ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv 0000000000000000 .text._ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv
0000000000000000 l     F .text  000000000000000d _ZN12_GLOBAL__N_116stacksize_limit_EP6rlimit
0000000000000010 l     F .text  0000000000000013 _ZN12_GLOBAL__N_19pagesize_EPm
0000000000000010 l     O .bss   0000000000000010 _ZZN12_GLOBAL__N_115stacksize_limitEvE5limit
0000000000000000 l     O .bss   0000000000000004 _ZZN12_GLOBAL__N_115stacksize_limitEvE4flag
0000000000000000 l    d  .gcc_except_table      0000000000000000 .gcc_except_table
0000000000000028 l     O .bss   0000000000000008 _ZZN12_GLOBAL__N_18pagesizeEvE4size
0000000000000020 l     O .bss   0000000000000004 _ZZN12_GLOBAL__N_18pagesizeEvE4flag
0000000000000000 l    d  .text._ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv 0000000000000000 .text._ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv
0000000000000000 l    d  .text._ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv   0000000000000000 .text._ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv
0000000000000000 l    d  .data.rel.local.DW.ref.__gxx_personality_v0    0000000000000000 .data.rel.local.DW.ref.__gxx_personality_v0
0000000000000000 l    d  .note.GNU-stack        0000000000000000 .note.GNU-stack
0000000000000000 l    d  .eh_frame      0000000000000000 .eh_frame
0000000000000000 l    d  .comment       0000000000000000 .comment
0000000000000000 l    d  .group 0000000000000000 .group
0000000000000000 l    d  .group 0000000000000000 .group
0000000000000000 l    d  .group 0000000000000000 .group
0000000000000000  w    F .text._ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv       0000000000000027 _ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv
0000000000000000         *UND*  0000000000000000 _GLOBAL_OFFSET_TABLE_
0000000000000000         *UND*  0000000000000000 _ZSt15__once_callable
0000000000000000         *UND*  0000000000000000 __tls_get_addr
0000000000000000  w    F .text._ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv 0000000000000027 .hidden _ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv
0000000000000000         *UND*  0000000000000000 getrlimit
0000000000000000         *UND*  0000000000000000 sysconf
0000000000000030 g     F .text  00000000000000b8 .hidden _ZN5boost7context12stack_traits12is_unboundedEv
0000000000000000  w    O .data.rel.local.DW.ref.__gxx_personality_v0    0000000000000008 .hidden DW.ref.__gxx_personality_v0
0000000000000000         *UND*  0000000000000000 _ZSt11__once_call
0000000000000000         *UND*  0000000000000000 __once_proxy
0000000000000000         *UND*  0000000000000000 _ZSt20__throw_system_errori
0000000000000000         *UND*  0000000000000000 __stack_chk_fail
0000000000000000         *UND*  0000000000000000 __gxx_personality_v0
00000000000000f0 g     F .text  00000000000000b4 .hidden _ZN5boost7context12stack_traits9page_sizeEv
00000000000001b0 g     F .text  0000000000000006 .hidden _ZN5boost7context12stack_traits12default_sizeEv
00000000000001c0 g     F .text  0000000000000006 .hidden _ZN5boost7context12stack_traits12minimum_sizeEv
00000000000001d0 g     F .text  00000000000000b4 .hidden _ZN5boost7context12stack_traits12maximum_sizeEv
0000000000000000  w    F .text._ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv 0000000000000027 .hidden _ZZSt9call_onceIRFvPmEJS0_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv
0000000000000000  w    F .text._ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv   0000000000000027 .hidden _ZZSt9call_onceIRFvP6rlimitEJS1_EEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv
0000000000000000  w      *UND*  0000000000000000 __pthread_key_create
0000000000000000  w      *UND*  0000000000000000 pthread_once

@madebr
Copy link
Contributor

madebr commented Oct 9, 2020

Ok, then let's focus on the boost cmake test_package script.
Can you add cmake.verbose = True and re-run the test?

CMake is complaining about the boost version that is too recent and you're using an old cmake 3.10.
Perhaps the example is not linked to libboost_context.a at all?

I have a pr that let's conan generate the cmake imported boost targets at #2097

@sturmf
Copy link
Author

sturmf commented Oct 10, 2020

I see that I get those warnings, maybe they have anything to do with it?:

CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:33 (find_package)

and here is the linker output you are looking for I guess:

/usr/bin/c++    -m64 -O3 -DNDEBUG        -rdynamic CMakeFiles/coroutine_exe.dir/coroutine.cpp.o  -o bin/coroutine_exe  -L/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib  -L/opt/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib  -L/opt/conan/.conan/data/bzip2/1.0.8/_/_/package/b27e2b40bcb70be2e7d6f0e0c6e43e35c530f8d3/lib -Wl,-rpath,/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib:/opt/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib:/opt/conan/.conan/data/bzip2/1.0.8/_/_/package/b27e2b40bcb70be2e7d6f0e0c6e43e35c530f8d3/lib /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_thread.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_random.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_regex.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_chrono.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_system.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_date_time.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_atomic.a -lpthread
/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a(coroutine_context.o): In function `boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&)':
coroutine_context.cpp:(.text+0x4f): undefined reference to `make_fcontext'

For me it looks good or should there be more linked into the test program?

@madebr
Copy link
Contributor

madebr commented Oct 10, 2020

I see that I get those warnings, maybe they have anything to do with it?:

My cmake version (3.17.2) displays similar warnings, and ends up working just fine.
The problem lies elsewhere.

/usr/bin/c++    -m64 -O3 -DNDEBUG        -rdynamic CMakeFiles/coroutine_exe.dir/coroutine.cpp.o  -o bin/coroutine_exe  -L/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib  -L/opt/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib  -L/opt/conan/.conan/data/bzip2/1.0.8/_/_/package/b27e2b40bcb70be2e7d6f0e0c6e43e35c530f8d3/lib -Wl,-rpath,/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib:/opt/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib:/opt/conan/.conan/data/bzip2/1.0.8/_/_/package/b27e2b40bcb70be2e7d6f0e0c6e43e35c530f8d3/lib /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_thread.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_random.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_regex.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_chrono.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_system.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_date_time.a /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_atomic.a -lpthread
/opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a(coroutine_context.o): In function `boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&)':
coroutine_context.cpp:(.text+0x4f): undefined reference to `make_fcontext'

For me it looks good or should there be more linked into the test program?

For reference, the linking command for me (gcc9@Linux) is:

/usr/bin/g++    -m64 -O2 -DNDEBUG        -rdynamic CMakeFiles/coroutine_exe.dir/coroutine.cpp.o  -o bin/coroutine_exe   -L/home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib  -L/home/maarten/.conan/data/zlib/1.2.11/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib  -L/home/maarten/.conan/data/bzip2/1.0.8/_/_/package/da606cf731e334010b0bf6e85a2a6f891b9f36b0/lib  -Wl,-rpath,/home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib:/home/maarten/.conan/data/zlib/1.2.11/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib:/home/maarten/.conan/data/bzip2/1.0.8/_/_/package/da606cf731e334010b0bf6e85a2a6f891b9f36b0/lib /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_coroutine.a /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_thread.a -lpthread /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_random.a /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_regex.a /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_chrono.a /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_context.a /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_date_time.a /home/maarten/.conan/data/boost/1.74.0/_/_/package/020be167c6748e1e82d613b2837bf63074e10744/lib/libboost_atomic.a 

It's more or less the same.

Can you try/check the following?

  • update conan (unlinkely to be the cause, but it will save you some problems later as components were added in 1.28 which are used heavily here on cci)
  • is /usr/bin/c++ a symbolic link the the g++ compiler? I have added an explicit CC=/usr/bin/gcc + CXX=/usr/bin/g++ to my default profile. Just to be sure.

@sturmf
Copy link
Author

sturmf commented Oct 12, 2020

The latest conan version I could test so far was 1.30 and it did not make a difference.

About the symlink, it is the following:

root@2a5be8c01f6b:/conan-center-index# ls -l /usr/bin/c++
lrwxrwxrwx 1 root root 21 Sep 24 10:40 /usr/bin/c++ -> /etc/alternatives/c++
root@2a5be8c01f6b:/conan-center-index# ls -l /etc/alternatives/c++
lrwxrwxrwx 1 root root 12 Sep 24 10:40 /etc/alternatives/c++ -> /usr/bin/g++

Also setting CC and CXX explicitly did not change anything for me. Except if some caching played a trick on me.

@madebr
Copy link
Contributor

madebr commented Oct 12, 2020

I can reproduce your problem,

First, I built boost without using conan.
I didn't look into only the boost build flags, so this will completely rebuild boost (shared and static).

cd ~/.conan/data/boost/1.74.0/_/_/source/source_subfolder
./bootstrap.sh --prefix /tmp/boost_prefix
./b2 install

Then I compiled the coroutine application without conan/cmake.
Using the following command, it works fine.

g++ coroutine.cpp /tmp/boost_prefix/lib/libboost_coroutine.a  /tmp/boost_prefix/lib/libboost_thread.a   /tmp/boost_prefix//lib/libboost_context.a

But when leaving out the context library, your error appears:

g++ coroutine.cpp /tmp/boost_prefix/lib/libboost_coroutine.a  /tmp/boost_prefix/lib/libboost_thread.a
/usr/bin/ld: /tmp/boost_prefix/lib/libboost_coroutine.a(coroutine_context.o): in function `boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(boost::context::detail::transfer_t), boost::coroutines::detail::preallocated const&)':
coroutine_context.cpp:(.text+0x42): undefined reference to `make_fcontext'
/usr/bin/ld: /tmp/boost_prefix/lib/libboost_coroutine.a(coroutine_context.o): in function `boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, void*)':
coroutine_context.cpp:(.text+0xbe): undefined reference to `jump_fcontext'
collect2: error: ld returned 1 exit status

Looking at your comment in #3159 (comment),
libboost_context is not in the link list.
It's not immediately clear to me why it is not added to your link libraries, it is in mine..

@sturmf
Copy link
Author

sturmf commented Oct 13, 2020

Yes I have overlooked this the first time. libboost_context is missing! And if I add it to the link command manually it resolves everything. Now of course is the question, why is it missing?

The generated conanbuildinfo.cmake looks good and contains boost_context:

set(CONAN_LIBS_BOOST boost_wave boost_container boost_contract boost_exception boost_graph boost_iostreams boost_locale boost_log boost_program_options boost_random boost_regex boost_serialization boost_wserialization boost_coroutine boost_fiber boost_context boost_timer boost_thread boost_chrono boost_date_time boost_atomic boost_filesystem boost_system boost_type_erasure boost_log_setup boost_math_c99 boost_math_c99f boost_math_c99l boost_math_tr1 boost_math_tr1f boost_math_tr1l boost_nowide boost_stacktrace_addr2line boost_stacktrace_backtrace boost_stacktrace_basic boost_stacktrace_noop boost_unit_test_framework)

But if I look into the build.make file in the CMakeFiles/coroutine_exe.dir directory I see this, missing context:

# External object files for target coroutine_exe
coroutine_exe_EXTERNAL_OBJECTS =

bin/coroutine_exe: CMakeFiles/coroutine_exe.dir/coroutine.cpp.o
bin/coroutine_exe: CMakeFiles/coroutine_exe.dir/build.make
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_coroutine.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_thread.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_random.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_regex.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_chrono.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_system.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_date_time.a
bin/coroutine_exe: /opt/conan/.conan/data/boost/1.73.0/_/_/package/84aa75c7e2b2b3d1cb01af39298d01342cf8d782/lib/libboost_atomic.a
bin/coroutine_exe: /usr/lib/x86_64-linux-gnu/libpthread.so
bin/coroutine_exe: CMakeFiles/coroutine_exe.dir/link.txt
        @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/conan-center-index/recipes/boost/all/test_package/build/0e2e53b2223857eda3f858a4b2873ec16f0fff55/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable bin/coroutine_exe"
        $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/coroutine_exe.dir/link.txt --verbose=$(VERBOSE)

So I wonder, how is the list of libraries to link to generated, and why is it missing boost_context in the static case?

@sturmf
Copy link
Author

sturmf commented Oct 13, 2020

Ok, I am not sure if I got this logic right, Ubuntu 18.04 comes with CMake 3.10.2 which only knows boost up to version 1.65.
In the helper file /usr/share/cmake-3.10/Modules/FindBoost.cmake it sets the following: set(_Boost_COROUTINE_DEPENDENCIES context system)
But since it is an unknown boost version it sets set(_Boost_IMPORTED_TARGETS FALSE) too.
This I think prevents the automatic addition of the context library on the dependency list. But with all things CMake, I could be wrong.
If this is indeed the reason, how should I proceed with this? I want to get it compiled for Ubuntu 18.04 without any non standard system packages.

@madebr
Copy link
Contributor

madebr commented Oct 13, 2020

Can you try #2097?
It will recreate the imported cmake targets (not the variables).

git fetch origin pull/2097/head:pr_boost_components
git checkout pr_boost_components
conan create recipes/boost/all boost/1.74.0@

Apart from this, you can also use the cmake package from conan-center-index as a build requirement (RECOMMENDED)
or copy a cmake from a more recent cmake version to your project (NOT RECOMMENDED),

@sturmf
Copy link
Author

sturmf commented Oct 13, 2020

Hmm is this patch compatible with conan-package-tools?

[local_vars]
+---------------------------+----------------------------------+
| Configuration             | value                            |
|---------------------------+----------------------------------|
| cwd                       | /conan-center-index              |
| skip_check_credentials    | False                            |
| upload_only_when_stable   | False                            |
| upload_only_when_tag      | False                            |
| upload_only_recipe        | False                            |
| stable_channel            | stable                           |
| partial_reference         | boost/1.73.0@                    |
| conanfile                 | ./recipes/boost/all/conanfile.py |
| use_docker                | False                            |
| docker_conan_home         | /home/conan                      |
| sudo_docker_command       | sudo -E                          |
| sudo_pip_command          |                                  |
| pip_command               | pip3                             |
| docker_pip_command        | pip                              |
| docker_shell              | /bin/sh -c                       |
| docker_platform_param     |                                  |
| lcow_user_workaround      |                                  |
| exclude_vcvars_precommand | False                            |
| upload_dependencies       |                                  |
| update_dependencies       | False                            |
| docker_32_images          | False                            |
| force_selinux             | False                            |
| conan_pip_package         | conan==1.30.0                    |
| vs10_x86_64_enabled       | False                            |
| builds_in_current_page    | []                               |
| skip_recipe_export        | False                            |
+---------------------------+----------------------------------+
Traceback (most recent call last):
  File ".gitlab-ci/build.py", line 5, in <module>
    builder.add_common_builds()
  File "/usr/local/lib/python3.6/dist-packages/cpt/packager.py", line 485, in add_common_builds
    if hasattr(conanfile, "options") and conanfile.options and "header_only" in conanfile.options:
  File "/conan-center-index/./recipes/boost/all/conanfile.py", line 64, in options
    for name in self._configure_options:
  File "/conan-center-index/./recipes/boost/all/conanfile.py", line 109, in _configure_options
    return self._dependencies["configure_options"]
  File "/conan-center-index/./recipes/boost/all/conanfile.py", line 128, in _dependencies
    return yaml.load(open(os.path.join(self.recipe_folder, "dependencies", self._dependency_filename)))
FileNotFoundError: [Errno 2] No such file or directory: '/conan-center-index/./recipes/boost/all/dependencies/dependencies-None.yml'

@madebr
Copy link
Contributor

madebr commented Oct 13, 2020

@sturmf
Probably not, as the ci on the pr is failing too.

@madebr
Copy link
Contributor

madebr commented Oct 13, 2020

I've created conan-io/conan#7874 to get some feedback on my boost recipe.

@sturmf
Copy link
Author

sturmf commented Oct 14, 2020

I just now created a pull request to change the line from TARGET_LINK_LIBRARIES(coroutine_exe ${Boost_LIBRARIES}) to TARGET_LINK_LIBRARIES(coroutine_exe ${CONAN_LIBS})

This fixes the problem for me and seems to be in line with other test executables also linked this way.

@sturmf
Copy link
Author

sturmf commented Oct 16, 2020

@madebr One question, can you look over my pull request? Is it in the correct form or should I have provided it differently?

@madebr
Copy link
Contributor

madebr commented Nov 1, 2020

We also have #2205, does that fix your issue?
If not, you can comment in that issue.

@madebr
Copy link
Contributor

madebr commented Nov 14, 2020

@sturmf
Can you re-try #2097?
I've removed the stuff that offended conan-package-tools.

#3205 fixes the test_package, but does not fix the component issue.

@sturmf
Copy link
Author

sturmf commented Nov 18, 2020

@madebr I just rebased to the latest conan-center-index version which has #2205 merged. Unfortunately it still does not work under Ubuntu 18.04. I think it even made it worse and now can't resolve any library:

 boost/1.74.0: LIBRARIES: ['boost_wave', 'boost_container', 'boost_contract', 'boost_exception', 'boost_graph', 'boost_iostreams', 'boost_locale', 'boost_log', 'boost_program_options', 'boost_random', 'boost_regex', 'boost_serialization', 'boost_wserialization', 'boost_coroutine', 'boost_fiber', 'boost_context', 'boost_timer', 'boost_thread', 'boost_chrono', 'boost_date_time', 'boost_atomic', 'boost_filesystem', 'boost_system', 'boost_type_erasure', 'boost_log_setup', 'boost_math_c99', 'boost_math_c99f', 'boost_math_c99l', 'boost_math_tr1', 'boost_math_tr1f', 'boost_math_tr1l', 'boost_nowide', 'boost_stacktrace_addr2line', 'boost_stacktrace_backtrace', 'boost_stacktrace_basic', 'boost_stacktrace_noop', 'boost_unit_test_framework']
 boost/1.74.0: Package folder: /opt/conan/.conan/data/boost/1.74.0/_/_/package/f032c58318d87e3fc57c3a0bc1ecebbe644cd10f
 boost/1.74.0 (test package): Generator cmake created conanbuildinfo.cmake
 boost/1.74.0 (test package): Generator txt created conanbuildinfo.txt
 boost/1.74.0 (test package): Generated conaninfo.txt
 boost/1.74.0 (test package): Generated graphinfo
 Using lockfile: '/builds/conan-center-index/recipes/boost/all/test_package/build/b8822c12de1078d0fe4c3f77046b422864d578e2/conan.lock'
 Using cached profile from lockfile
 boost/1.74.0 (test package): Calling build()
 -- The C compiler identification is GNU 7.5.0
 -- The CXX compiler identification is GNU 7.5.0
 -- Check for working C compiler: /usr/bin/cc
 -- Check for working C compiler: /usr/bin/cc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Detecting C compile features
 -- Detecting C compile features - done
 -- Check for working CXX compiler: /usr/bin/c++
 -- Check for working CXX compiler: /usr/bin/c++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Detecting CXX compile features
 -- Detecting CXX compile features - done
 -- Conan: called by CMake conan helper
 -- Conan: Adjusting output directories
 -- Conan: Using cmake global configuration
 -- Conan: Adjusting default RPATHs Conan policies
 -- Conan: Adjusting language standard
 -- Conan: Compiler GCC>=5, checking major version 7
 -- Conan: Checking correct version: 7
 -- Conan: C++ stdlib: libstdc++11
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
   New Boost version may have incorrect or missing dependencies and imported
   targets
 Call Stack (most recent call first):
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
   /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
   CMakeLists.txt:35 (find_package)
 -- Looking for pthread.h
 -- Looking for pthread.h - found
 -- Looking for pthread_create
 -- Looking for pthread_create - not found
 -- Looking for pthread_create in pthreads
 -- Looking for pthread_create in pthreads - not found
 -- Looking for pthread_create in pthread
 -- Looking for pthread_create in pthread - found
 -- Found Threads: TRUE  
 -- Boost version: 1.74.0
 -- Found the following Boost libraries:
 --   coroutine
 --   thread
 --   random
 --   regex
 --   chrono
 --   unit_test_framework
 --   system
 --   date_time
 --   atomic
 -- Configuring done
 CMake Error at CMakeLists.txt:43 (add_executable):
   Target "regex_exe" links to target "Boost::regex" but the target was not
   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
   an ALIAS target is missing?
 CMake Error at CMakeLists.txt:38 (add_executable):
   Target "random_exe" links to target "Boost::random" but the target was not
   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
   an ALIAS target is missing?
 CMake Error at CMakeLists.txt:50 (add_executable):
   Target "test_exe" links to target "Boost::unit_test_framework" but the
   target was not found.  Perhaps a find_package() call is missing for an
   IMPORTED target, or an ALIAS target is missing?
 CMake Error at CMakeLists.txt:60 (add_executable):
   Target "chrono_exe" links to target "Boost::chrono" but the target was not
   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
   an ALIAS target is missing?
 CMake Error at CMakeLists.txt:55 (add_executable):
   Target "coroutine_exe" links to target "Boost::coroutine" but the target
   was not found.  Perhaps a find_package() call is missing for an IMPORTED
   target, or an ALIAS target is missing?
 CMake Error at CMakeLists.txt:55 (add_executable):
   Target "coroutine_exe" links to target "Boost::thread" but the target was
   not found.  Perhaps a find_package() call is missing for an IMPORTED
   target, or an ALIAS target is missing?
 -- Generating done
 -- Build files have been written to: /builds/conan-center-index/recipes/boost/all/test_package/build/b8822c12de1078d0fe4c3f77046b422864d578e2
 CMake Warning:
   Manually-specified variables were not used by the project:
     CMAKE_EXPORT_NO_PACKAGE_REGISTRY
 boost/1.74.0: WARN: Patching user-config.jam
 boost/1.74.0: WARN: 
 using zlib : 1.2.11 : <include>"/opt/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/include" <search>"/opt/conan/.conan/data/zlib/1.2.11/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/lib" <name>z ;
 using bzip2 : 1.0.8 : <include>"/opt/conan/.conan/data/bzip2/1.0.8/_/_/package/b27e2b40bcb70be2e7d6f0e0c6e43e35c530f8d3/include" <search>"/opt/conan/.conan/data/bzip2/1.0.8/_/_/package/b27e2b40bcb70be2e7d6f0e0c6e43e35c530f8d3/lib" <name>bz2 ;
 using "gcc" :  :  "/usr/bin/g++-7" : 
  ;
 boost/1.74.0: WARN: b2 target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/opt/conan/.conan/data/boost/1.74.0/_/_/source/source_subfolder/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.iconv=on boost.locale.icu=off threading=multi link=shared variant=release --without-python toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 pch=on cxxflags="-fPIC" install --prefix=/opt/conan/.conan/data/boost/1.74.0/_/_/package/f032c58318d87e3fc57c3a0bc1ecebbe644cd10f -j6 --abbreviate-paths --debug-configuration --build-dir="/opt/conan/.conan/data/boost/1.74.0/_/_/build/f032c58318d87e3fc57c3a0bc1ecebbe644cd10f"
 Traceback (most recent call last):
   File "/usr/local/lib/python3.6/dist-packages/conans/errors.py", line 34, in conanfile_exception_formatter
     yield
   File "/usr/local/lib/python3.6/dist-packages/conans/client/conanfile/build.py", line 16, in run_build_method
     conanfile.build()
   File "/builds/conan-center-index/recipes/boost/all/test_package/conanfile.py", line 31, in build
     cmake.configure()
   File "/usr/local/lib/python3.6/dist-packages/conans/client/build/cmake.py", line 304, in configure
     self._run(command)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/build/cmake.py", line 264, in _run
     self._conanfile.run(command)
   File "/usr/local/lib/python3.6/dist-packages/conans/model/conan_file.py", line 290, in run
     raise ConanException("Error %d while executing %s" % (retcode, command))
 conans.errors.ConanException: Error 1 while executing cd '/builds/conan-center-index/recipes/boost/all/test_package/build/b8822c12de1078d0fe4c3f77046b422864d578e2' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="7" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DBoost_USE_STATIC_LIBS="False" -DWITH_RANDOM="TRUE" -DWITH_REGEX="TRUE" -DWITH_TEST="TRUE" -DWITH_COROUTINE="TRUE" -DWITH_CHRONO="TRUE" -DBoost_NO_BOOST_CMAKE="TRUE" -Wno-dev '/builds/conan-center-index/recipes/boost/all/test_package'
 During handling of the above exception, another exception occurred:
 Traceback (most recent call last):
   File ".gitlab-ci/build.py", line 6, in <module>
     builder.run()
   File "/usr/local/lib/python3.6/dist-packages/cpt/packager.py", line 594, in run
     self.run_builds(base_profile_name=base_profile_name)
   File "/usr/local/lib/python3.6/dist-packages/cpt/packager.py", line 687, in run_builds
     r.run()
   File "/usr/local/lib/python3.6/dist-packages/cpt/runner.py", line 134, in run
     lockfile=self._lockfile)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 95, in wrapper
     return f(api, *args, **kwargs)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 382, in create
     test_build_folder, test_folder, conanfile_path, recorder=recorder)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/cmd/create.py", line 77, in create
     recorder=recorder)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/cmd/test.py", line 40, in install_build_and_test
     install_folder=test_build_folder, test=reference)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/cmd/build.py", line 48, in cmd_build
     run_build_method(conan_file, app.hook_manager, conanfile_path=conanfile_path)
   File "/usr/local/lib/python3.6/dist-packages/conans/client/conanfile/build.py", line 16, in run_build_method
     conanfile.build()
   File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
     self.gen.throw(type, value, traceback)
   File "/usr/local/lib/python3.6/dist-packages/conans/errors.py", line 40, in conanfile_exception_formatter
     raise ConanExceptionInUserConanfileMethod(msg)
 conans.errors.ConanExceptionInUserConanfileMethod: boost/1.74.0 (test package): Error in build() method, line 31
 	cmake.configure()
 	ConanException: Error 1 while executing cd '/builds/conan-center-index/recipes/boost/all/test_package/build/b8822c12de1078d0fe4c3f77046b422864d578e2' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="7" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DBoost_USE_STATIC_LIBS="False" -DWITH_RANDOM="TRUE" -DWITH_REGEX="TRUE" -DWITH_TEST="TRUE" -DWITH_COROUTINE="TRUE" -DWITH_CHRONO="TRUE" -DBoost_NO_BOOST_CMAKE="TRUE" -Wno-dev '/builds/conan-center-index/recipes/boost/all/test_package'
 ERROR: Job failed: exit code 1

@madebr
Copy link
Contributor

madebr commented Nov 18, 2020

I guess that means #2205 made it worse for you.
But its changes will get overridden by #2097, so that's the one I would like you to test.

@sturmf
Copy link
Author

sturmf commented Jul 2, 2021

This has been solved with the boost package restructuring, thanks!.

@sturmf sturmf closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants