Emscripten: compiled boost libraries, how to make cmake see them? [duplicate] - boost

This question already has an answer here:
Possible causes for Boost not being found by CMake in certain situations?
(1 answer)
Closed 3 months ago.
Consider the following minimal example:
CMakeLists.txt contains:
cmake_minimum_required(VERSION 3.22)
project(Minexample)
find_package(ZLIB)
if(ZLIB_FOUND)
add_definitions(-DHAVE_LIBZ)
include_directories(${ZLIB_INCLUDE_DIR})
endif()
# tell cmake to search boost in the directory /home/hiisi/workspace/boost-1_75_0
set(Boost_NO_SYSTEM_PATHS ON)
set(BOOST_ROOT "/home/hiisi/workspace/boost-1_75_0")
set(Boost_INCLUDE_DIR "/home/hiisi/workspace/boost-1_75_0")
#set(BOOST_LIBRARYDIR "/home/hiisi/workspace/boost-1_75_0/lib")
set(Boost_USE_STATIC_LIBS ON)
set(Boost_DEBUG ON)
#set(Boost_COMPILER -emscripten-3.1.24)
#set(Boost_toolset emscripten-3.1.24)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME ON)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_DETAILED_FAILURE_MSG ON)
Set(Boost_LIB_PREFIX "lib")
find_package(Boost COMPONENTS program_options iostreams system)
#find_package(Boost)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIR})
endif()
This is how I feed it to make:
emcmake cmake . -DZLIB_INCLUDE_DIR=/home/hiisi/workspace/zlib -DZLIB_LIBRARY=/home/hiisi/workspace/zlib/libz.a
Here's the output of the above command:
configure: cmake . -DZLIB_INCLUDE_DIR=/home/hiisi/workspace/zlib -DZLIB_LIBRARY=/home/hiisi/workspace/zlib/libz.a -DCMAKE_TOOLCHAIN_FILE=/home/hiisi/workspace/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/home/hiisi/workspace/emsdk/node/14.18.2_64bit/bin/node;--experimental-wasm-threads
-- Found ZLIB: /home/hiisi/workspace/zlib/libz.a (found version "1.2.13")
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1688 ] _boost_TEST_VERSIONS = "1.78.0;1.78;1.77.0;1.77;1.76.0;1.76;1.75.0;1.75;1.74.0;1.74;1.73.0;1.73;1.72.0;1.72;1.71.0;1.71;1.70.0;1.70;1.69.0;1.69;1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;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/Modules/FindBoost.cmake:1689 ] Boost_USE_MULTITHREADED = "ON"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1690 ] Boost_USE_STATIC_LIBS = "ON"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1691 ] Boost_USE_STATIC_RUNTIME = "ON"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1692 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1693 ] Boost_NO_SYSTEM_PATHS = "ON"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1725 ] BOOST_ROOT = "/home/hiisi/workspace/boost-1_75_0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1726 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1727 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1728 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1729 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1730 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1818 ] location of version.hpp: /home/hiisi/workspace/boost-1_75_0/boost/version.hpp
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1858 ] Boost_VERSION = "1.75.0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1859 ] Boost_VERSION_STRING = "1.75.0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1860 ] Boost_VERSION_MACRO = "107500"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1861 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1862 ] Boost_VERSION_MINOR = "75"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1863 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1864 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1888 ] Boost_LIB_PREFIX = "lib"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1889 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "-clang16" (guessed)
-- [ /usr/share/cmake/Modules/FindBoost.cmake:1925 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2003 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2007 ] _boost_RELEASE_ABI_TAG = "-s"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2008 ] _boost_DEBUG_ABI_TAG = "-sd"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2068 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "/home/hiisi/workspace/boost-1_75_0/lib;/home/hiisi/workspace/boost-1_75_0/stage/lib;/home/hiisi/workspace/boost-1_75_0/lib;/home/hiisi/workspace/boost-1_75_0/../lib;/home/hiisi/workspace/boost-1_75_0/stage/lib;NO_CMAKE_SYSTEM_PATH;NO_SYSTEM_ENVIRONMENT_PATH"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2069 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "/home/hiisi/workspace/boost-1_75_0/lib;/home/hiisi/workspace/boost-1_75_0/stage/lib;/home/hiisi/workspace/boost-1_75_0/lib;/home/hiisi/workspace/boost-1_75_0/../lib;/home/hiisi/workspace/boost-1_75_0/stage/lib;NO_CMAKE_SYSTEM_PATH;NO_SYSTEM_ENVIRONMENT_PATH"
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2254 ] Searching for PROGRAM_OPTIONS_LIBRARY_RELEASE: libboost_program_options-clang16-mt-s-1_75;libboost_program_options-clang16-mt-s;libboost_program_options-clang16-mt-s;libboost_program_options-mt-s-1_75;libboost_program_options-mt-s;libboost_program_options-mt-s;libboost_program_options-mt;libboost_program_options
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2309 ] Searching for PROGRAM_OPTIONS_LIBRARY_DEBUG: libboost_program_options-clang16-mt-sd-1_75;libboost_program_options-clang16-mt-sd;libboost_program_options-clang16-mt-sd;libboost_program_options-mt-sd-1_75;libboost_program_options-mt-sd;libboost_program_options-mt-sd;libboost_program_options-mt;libboost_program_options
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2254 ] Searching for IOSTREAMS_LIBRARY_RELEASE: libboost_iostreams-clang16-mt-s-1_75;libboost_iostreams-clang16-mt-s;libboost_iostreams-clang16-mt-s;libboost_iostreams-mt-s-1_75;libboost_iostreams-mt-s;libboost_iostreams-mt-s;libboost_iostreams-mt;libboost_iostreams
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2309 ] Searching for IOSTREAMS_LIBRARY_DEBUG: libboost_iostreams-clang16-mt-sd-1_75;libboost_iostreams-clang16-mt-sd;libboost_iostreams-clang16-mt-sd;libboost_iostreams-mt-sd-1_75;libboost_iostreams-mt-sd;libboost_iostreams-mt-sd;libboost_iostreams-mt;libboost_iostreams
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2254 ] Searching for SYSTEM_LIBRARY_RELEASE: libboost_system-clang16-mt-s-1_75;libboost_system-clang16-mt-s;libboost_system-clang16-mt-s;libboost_system-mt-s-1_75;libboost_system-mt-s;libboost_system-mt-s;libboost_system-mt;libboost_system
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2309 ] Searching for SYSTEM_LIBRARY_DEBUG: libboost_system-clang16-mt-sd-1_75;libboost_system-clang16-mt-sd;libboost_system-clang16-mt-sd;libboost_system-mt-sd-1_75;libboost_system-mt-sd;libboost_system-mt-sd;libboost_system-mt;libboost_system
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2254 ] Searching for REGEX_LIBRARY_RELEASE: libboost_regex-clang16-mt-s-1_75;libboost_regex-clang16-mt-s;libboost_regex-clang16-mt-s;libboost_regex-mt-s-1_75;libboost_regex-mt-s;libboost_regex-mt-s;libboost_regex-mt;libboost_regex
-- [ /usr/share/cmake/Modules/FindBoost.cmake:2309 ] Searching for REGEX_LIBRARY_DEBUG: libboost_regex-clang16-mt-sd-1_75;libboost_regex-clang16-mt-sd;libboost_regex-clang16-mt-sd;libboost_regex-mt-sd-1_75;libboost_regex-mt-sd;libboost_regex-mt-sd;libboost_regex-mt;libboost_regex
-- Could NOT find Boost (missing: program_options iostreams system) (found version "1.75.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hiisi/workspace/minexmpl
Here's the directory listing of /home/hiisi/workspace/boost-1_75_0/lib:
cmake libboost_filesystem.a libboost_filesystem.bc libboost_iostreams.a libboost_iostreams.bc libboost_program_options.a libboost_program_options.bc
Those .a files were created by running emar q lib.a lib.bc command. Why is it that my zlib is being recognized but not boost? This is how I compiled boost:
emconfigure ./b2 toolset=emscripten link=static runtime-link=static threading=multi --prefix=/home/hiisi/workspace/boost-1_75_0 --with-program_options --with-iostreams --with-filesystem
And:
/b2 install --prefix=/home/hiisi/workspace/boost-1_75_0

you can try this:
find_package(Boost 1.75 REQUIRED COMPONENTS
program_options
iostreams
system)
if (NOT Boost_FOUND)
message("Not found Boost!")
elseif (Boost_FOUND)
message("Found Boost!"" Version:" ${Boost_VERSION})
include_directories(${Boost_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
endif()
And this is a link about CMake FindBoost.

Related

CMake can't find Boost::thread on Windows 10

I'm trying to build windows package of my Qt project.
The following is part of my CMakeList.txt file.
set (Boost_USE_STATIC_LIBS ON)
set (Boost_DEBUG ON)
set (BOOST_ROOT "C:\\Dev\\boost\\boost_1_78_0")
FIND_PACKAGE(Boost 1.70 REQUIRED)
FIND_PACKAGE(Boost REQUIRED COMPONENTS thread)
target_link_libraries(myAppName Boost::thread)
The output after I enter cmake .. in the myAppName\build is
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1657 ] _boost_TEST_VERSIONS = "1.75.0;1.75;1.74.0;1.74;1.73.0;1.73;1.72.0;1.72;1.71.0;1.71;1.70.0;1.70"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1658 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1659 ] Boost_USE_STATIC_LIBS = "ON"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1660 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1661 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1662 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1694 ] BOOST_ROOT = "C:\Dev\boost\boost_1_78_0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1695 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1696 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1697 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1698 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1699 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1771 ] _boost_INCLUDE_SEARCH_DIRS = "C:\Dev\boost\boost_1_78_0/include;C:\Dev\boost\boost_1_78_0;PATHS;C:/boost/include;C:/boost;/sw/local/include"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1772 ] _boost_PATH_SUFFIXES = "boost-1_75_0;boost_1_75_0;boost/boost-1_75_0;boost/boost_1_75_0;boost-1_75;boost_1_75;boost/boost-1_75;boost/boost_1_75;boost-1_74_0;boost_1_74_0;boost/boost-1_74_0;boost/boost_1_74_0;boost-1_74;boost_1_74;boost/boost-1_74;boost/boost_1_74;boost-1_73_0;boost_1_73_0;boost/boost-1_73_0;boost/boost_1_73_0;boost-1_73;boost_1_73;boost/boost-1_73;boost/boost_1_73;boost-1_72_0;boost_1_72_0;boost/boost-1_72_0;boost/boost_1_72_0;boost-1_72;boost_1_72;boost/boost-1_72;boost/boost_1_72;boost-1_71_0;boost_1_71_0;boost/boost-1_71_0;boost/boost_1_71_0;boost-1_71;boost_1_71;boost/boost-1_71;boost/boost_1_71;boost-1_70_0;boost_1_70_0;boost/boost-1_70_0;boost/boost_1_70_0;boost-1_70;boost_1_70;boost/boost-1_70;boost/boost_1_70"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1787 ] location of version.hpp: C:/Dev/boost/boost_1_78_0/boost/version.hpp
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1827 ] Boost_VERSION = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1828 ] Boost_VERSION_STRING = "1.78.0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1829 ] Boost_VERSION_MACRO = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1830 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1831 ] Boost_VERSION_MINOR = "78"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1832 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1833 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1857 ] Boost_LIB_PREFIX = ""
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1858 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "-gcc11" (guessed)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1894 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1972 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1976 ] _boost_RELEASE_ABI_TAG = "-"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1977 ] _boost_DEBUG_ABI_TAG = "-d"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2037 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2038 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- Found Boost: C:/Dev/boost/boost_1_78_0 (found suitable version "1.78.0", minimum required is "1.70")
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1657 ] _boost_TEST_VERSIONS = "1.75.0;1.75;1.74.0;1.74;1.73.0;1.73;1.72.0;1.72;1.71.0;1.71;1.70.0;1.70;1.69.0;1.69;1.68.0;1.68;1.67.0;1.67;1.66.0;1.66;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.20.0/Modules/FindBoost.cmake:1658 ] Boost_USE_MULTITHREADED = "TRUE"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1659 ] Boost_USE_STATIC_LIBS = "ON"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1660 ] Boost_USE_STATIC_RUNTIME = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1661 ] Boost_ADDITIONAL_VERSIONS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1662 ] Boost_NO_SYSTEM_PATHS = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1694 ] BOOST_ROOT = "C:\Dev\boost\boost_1_78_0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1695 ] ENV{BOOST_ROOT} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1696 ] BOOST_INCLUDEDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1697 ] ENV{BOOST_INCLUDEDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1698 ] BOOST_LIBRARYDIR = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1699 ] ENV{BOOST_LIBRARYDIR} = <unset>
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1787 ] location of version.hpp: C:/Dev/boost/boost_1_78_0/boost/version.hpp
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1827 ] Boost_VERSION = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1828 ] Boost_VERSION_STRING = "1.78.0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1829 ] Boost_VERSION_MACRO = "107800"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1830 ] Boost_VERSION_MAJOR = "1"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1831 ] Boost_VERSION_MINOR = "78"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1832 ] Boost_VERSION_PATCH = "0"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1833 ] Boost_VERSION_COUNT = "3"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1857 ] Boost_LIB_PREFIX = ""
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1858 ] Boost_NAMESPACE = "boost"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:953 ] _boost_COMPILER = "-gcc11" (guessed)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1894 ] _boost_MULTITHREADED = "-mt"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1972 ] _boost_ARCHITECTURE_TAG = "" (detected)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1976 ] _boost_RELEASE_ABI_TAG = "-"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1977 ] _boost_DEBUG_ABI_TAG = "-d"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2037 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2038 ] _boost_LIBRARY_SEARCH_DIRS_DEBUG = "C:\Dev\boost\boost_1_78_0/lib;C:\Dev\boost\boost_1_78_0/stage/lib;C:/Dev/boost/boost_1_78_0/lib;C:/Dev/boost/boost_1_78_0/../lib;C:/Dev/boost/boost_1_78_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib"
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
CMake Warning at /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1354 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:1476 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2086 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:51 (FIND_PACKAGE)
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-gcc11-mt-1_78;boost_thread-gcc11-mt;boost_thread-gcc11-mt;boost_thread-mt-1_78;boost_thread-mt;boost_thread-mt;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-gcc11-mt-d-1_78;boost_thread-gcc11-mt-d;boost_thread-gcc11-mt-d;boost_thread-mt-d-1_78;boost_thread-mt-d;boost_thread-mt-d;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for CHRONO_LIBRARY_RELEASE: boost_chrono-gcc11-mt-1_78;boost_chrono-gcc11-mt;boost_chrono-gcc11-mt;boost_chrono-mt-1_78;boost_chrono-mt;boost_chrono-mt;boost_chrono-mt;boost_chrono
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for CHRONO_LIBRARY_DEBUG: boost_chrono-gcc11-mt-d-1_78;boost_chrono-gcc11-mt-d;boost_chrono-gcc11-mt-d;boost_chrono-mt-d-1_78;boost_chrono-mt-d;boost_chrono-mt-d;boost_chrono-mt;boost_chrono
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc11-mt-1_78;boost_date_time-gcc11-mt;boost_date_time-gcc11-mt;boost_date_time-mt-1_78;boost_date_time-mt;boost_date_time-mt;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc11-mt-d-1_78;boost_date_time-gcc11-mt-d;boost_date_time-gcc11-mt-d;boost_date_time-mt-d-1_78;boost_date_time-mt-d;boost_date_time-mt-d;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2223 ] Searching for ATOMIC_LIBRARY_RELEASE: boost_atomic-gcc11-mt-1_78;boost_atomic-gcc11-mt;boost_atomic-gcc11-mt;boost_atomic-mt-1_78;boost_atomic-mt;boost_atomic-mt;boost_atomic-mt;boost_atomic
-- [ /usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2278 ] Searching for ATOMIC_LIBRARY_DEBUG: boost_atomic-gcc11-mt-d-1_78;boost_atomic-gcc11-mt-d;boost_atomic-gcc11-mt-d;boost_atomic-mt-d-1_78;boost_atomic-mt-d;boost_atomic-mt-d;boost_atomic-mt;boost_atomic
CMake Error at /usr/share/cmake-3.20.0/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: thread) (found version "1.78.0")
Call Stack (most recent call first):
/usr/share/cmake-3.20.0/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.20.0/Modules/FindBoost.cmake:2344 (find_package_handle_standard_args)
CMakeLists.txt:51 (FIND_PACKAGE)
I've tried precompiled version and gcc11 locally compiled version, same output.
I'm using gcc-11 now.
Also tried 1.74.0, similar results except the New Boost version may have incorrect or missing dependencies and imported targets warnings.
It seems that cmake didn't find thread which is the important package my project used.
It costs me a lot of time to deal with this.
Hoping that someone helps me solving this problem.

Perf on MIPS debug kernel, unable to enable frame_pointer

I am trying to use perf tool for MIPS & facing some trouble in getting back-stacks.
How can I enable FRAME_POINTER for mips ? I have DEBUG_KERNEL enabled, but it looks like -fno-omit-frame-pointer is not applicable for MIPS arch in kernel.
Does it mean frame pointer based stack unwinding with perf can't be achieved for MIPS ?
I don't see mips toolchain complaining about -fno-omit-frame-pointer flag
EDIT1
I am able to record perf events. Sample output for perf report
Report wouldn't help much without the stack unwinding.
# ./perf --version
perf version 5.6.rc2.gd04712cd3bd7
# uname -a
Linux localhost 3.14.28-1.19 #1 SMP Mon Feb 17 16:48:44 IST 2020 mips GNU/Linux
EDIT2
Perf features detected
Auto-detecting system features:
... dwarf: [ on ]
... dwarf_getlocations: [ on ]
... glibc: [ on ]
... gtk2: [ OFF ]
... libaudit: [ on ]
... libbfd: [ OFF ]
... libcap: [ OFF ]
... libelf: [ on ]
... libnuma: [ OFF ]
... numa_num_possible_cpus: [ OFF ]
... libperl: [ OFF ]
... libpython: [ OFF ]
... libcrypto: [ OFF ]
... libunwind: [ OFF ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ OFF ]
... bpf: [ OFF ]
... libaio: [ on ]
... libzstd: [ OFF ]
... disassembler-four-args: [ OFF ]
EDIT3
I see feature test for libunwind had failed
cat linux-5.6-rc2/tools/build/feature/test-libunwind.make.output
/tmp/ccQnV5jZ.o: In function `main':
test-libunwind.c:(.text+0x1c): undefined reference to `_Umips_create_addr_space'
test-libunwind.c:(.text+0x4c): undefined reference to `_Umips_init_remote'
test-libunwind.c:(.text+0x70): undefined reference to `_Umips_dwarf_search_unwind_table'
collect2: error: ld returned 1 exit status
If I see the makefile for feature tests libunwind linking is not done for MIPS.
EDIT4
Usual workflow
perf record -F 99 -ag -e cycles:u -- sleep 5
perf report
Attempt to use dwarf
# perf record -F 99 -ag --call-graph=dwarf -- sleep 10
Error:
The sys_perf_event_open() syscall returned with 89 (Function not implemented) for event (cycles).
/bin/dmesg | grep -i perf may provide additional information.
dmesg is empty

tegrahost_v2: Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed

I've built an image for Jetson TX2 module using yocto. Everything when fine for few days but now I get this error when I try to flash the device.
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
[ 0.0008 ] tegrasign_v2 --key None --getmode mode.txt
[ 0.0016 ] Assuming zero filled SBK key
[ 0.0016 ]
[ 0.0016 ] Generating RCM messages
[ 0.0023 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x18 --download rcm mb1_recovery_prod.bin 0 0
[ 0.0030 ] RCM 0 is saved as rcm_0.rcm
[ 0.0033 ] RCM 1 is saved as rcm_1.rcm
[ 0.0033 ] List of rcm files are saved in rcm_list.xml
[ 0.0033 ]
[ 0.0033 ] Signing RCM messages
[ 0.0040 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key
[ 0.0046 ] Assuming zero filled SBK key
[ 0.0076 ]
[ 0.0076 ] Copying signature to RCM mesages
[ 0.0083 ] tegrarcm_v2 --chip 0x18 --updatesig rcm_list_signed.xml
[ 0.0093 ]
[ 0.0093 ] Parsing partition layout
[ 0.0100 ] tegraparser_v2 --pt flash.xml.tmp
[ 0.0109 ]
[ 0.0109 ] Creating list of images to be signed
[ 0.0116 ] tegrahost_v2 --chip 0x18 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
[ 0.0124 ] Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed
[ 0.0161 ]
Error: Return value 4
Command tegrahost_v2 --chip 0x18 --partitionlayout flash.xml.bin --list images_list.xml zerosbk
Does this error ring a bell to anyone?
I am able to flash the board with JetPack.
Thanks,
-Damien
Just in case you never figured this out, it looks like
[ 0.0124 ] Stat for tegra186-quill-p3310-1000-c03-00-base.dtb failed
is the real error. Fix that and you should be good.

how is cmake's _boost_LIBRARY_SEARCH_DIRS set/configured/influenced? (boost libraries not found)

I worked through
CMake no longer finds static Boost libraries
and
CMake not finding Boost
and some of the other related questions.
I've the same problem, but none of the solutions are suitable for me.
running cmake -DBoost_DEBUG=ON . leads to
Building external libraries
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS = 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/local/share/cmake-2.8/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED = TRUE
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = ON
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME =
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS =
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Declared as CMake or Environmental Variables:
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:540 ] BOOST_ROOT =
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS = 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/local/share/cmake-2.8/Modules/FindBoost.cmake:639 ] location of version.hpp: /usr/local/include/boost-1_54/boost/version.hpp
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:663 ] version.hpp reveals boost 1.54.0
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER = -gcc43
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/local/share/cmake-2.8/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS = /usr/local/include/boost-1_54/lib;/usr/local/include/boost-1_54/../lib;/usr/local/include/boost-1_54/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
Boost version and boost headers are found, the static libraries aren't.
they are all located in /usr/local/lib64 but this path isn't included in _boost_LIBRARY_SEARCH_DIRS.
I'm using cmake version 2.8.12.2 on sles11 sp2 x86_64.
Question is: how is cmake's _boost_LIBRARY_SEARCH_DIRS set/configured/influenced?
UPDATE
In fact I had two problems, one solved by the answer below, the second was a wrong
guessed _boost_COMPILER = -gcc43
which I could solve via
SET( Boost_COMPILER -gcc48)
Make sure that the global property FIND_LIBRARY_USE_LIB64_PATHS is set to true before calling find_package(Boost), i.e.:
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
This should make the find_library call in CMake's boost module honor the /usr/local/lib64 directory.

cmake can't find boost thread

I'm trying to compile some project to js using emscripten. The project uses cmake as a build tool.
This is how I'm calling cmake:
cmake -DEMSCRIPTEN=1
-DCMAKE_TOOLCHAIN_FILE=~/Documents/emscripten/cmake/Platform/Emscripten_unix.cmake
-DCMAKE_MODULE_PATH=~/Documents/emscripten/cmake
-DCMAKE_BUILD_TYPE=Release
-G "Unix Makefiles"
-DRDK_BUILD_PYTHON_WRAPPERS=
-DBOOST_INCLUDEDIR=~/Documents/boost_1_53_0/boost
-DBOOST_LIBRARYDIR=~/Documents/boost_1_53_0/stage/lib
-DBoost_REGEX_LIBRARY=~/Documents/boost_1_53_0/stage/lib/libboost_regex.a
-DBOOST_ROOT=~/Documents/boost_1_53_0
-DBoost_NO_SYSTEM_PATHS=TRUE
-DBoost_USE_MULTITHREADED=FALSE
-DBoost_USE_STATIC_LIBS=OFF
-DBoost_USE_STATIC_RUNTIME=OFF
-DBoost_ADDITIONAL_VERSIONS="1.53.0"
-DBoost_DETAILED_FAILURE_MSG=TRUE
-DBoost_NO_BOOST_CMAKE=ON
-DBoost_DEBUG=TRUE
..
This is what I have in /home/mnowotka/Documents/boost_1_53_0/stage/lib directory:
ls -lh ~/Documents/boost_1_53_0/stage/lib
total 4.4M
-rw-rw-r-- 1 mnowotka mnowotka 2.6M Apr 11 10:49 libboost_regex.a
lrwxrwxrwx 1 mnowotka mnowotka 24 Apr 11 10:10 libboost_regex.so -> libboost_regex.so.1.53.0
-rw-rw-r-- 1 mnowotka mnowotka 1.9M Apr 11 10:10 libboost_regex.so.1.53.0
And this is what I'm getting from cmake:
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:667 ] Include debugging info:
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:669 ] _boost_INCLUDE_SEARCH_DIRS = /home/mnowotka/Documents/boost_1_53_0/boost;/home/mnowotka/Documents/boost_1_53_0/include;/home/mnowotka/Documents/boost_1_53_0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:671 ] _boost_PATH_SUFFIXES = boost-1_53_0;boost_1_53_0;boost-1_48_0;boost_1_48_0;boost-1_48;boost_1_48;boost-1_47_0;boost_1_47_0;boost-1_47;boost_1_47;boost-1_46_1;boost_1_46_1;boost-1_46_0;boost_1_46_0;boost-1_46;boost_1_46;boost-1_45_0;boost_1_45_0;boost-1_45;boost_1_45;boost-1_44_0;boost_1_44_0;boost-1_44;boost_1_44;boost-1_43_0;boost_1_43_0;boost-1_43;boost_1_43;boost-1_42_0;boost_1_42_0;boost-1_42;boost_1_42;boost-1_41_0;boost_1_41_0;boost-1_41;boost_1_41;boost-1_40_0;boost_1_40_0;boost-1_40;boost_1_40;boost-1_39_0;boost_1_39_0;boost-1_39;boost_1_39
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:696 ] location of version.hpp: /home/mnowotka/Documents/boost_1_53_0/boost/version.hpp
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:715 ] version.hpp reveals boost 1.53.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:808 ] guessed _boost_COMPILER =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:818 ] _boost_MULTITHREADED =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:861 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:863 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:906 ] _boost_LIBRARY_SEARCH_DIRS = /home/mnowotka/Documents/boost_1_53_0/stage/lib;/home/mnowotka/Documents/boost_1_53_0/lib;/home/mnowotka/Documents/boost_1_53_0/stage/lib;/home/mnowotka/Documents/boost_1_53_0/lib;/home/mnowotka/Documents/boost_1_53_0/../lib;/home/mnowotka/Documents/boost_1_53_0/stage/lib
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:1119 ] Boost_FOUND = TRUE
-- Boost version: 1.53.0
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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
-- Found BISON: /usr/bin/bison
-- Found FLEX: /usr/bin/flex
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:525 ] Boost not in cache
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:528 ] _boost_TEST_VERSIONS = 1.53.0;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
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:530 ] Boost_USE_MULTITHREADED = FALSE
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:532 ] Boost_USE_STATIC_LIBS = OFF
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:534 ] Boost_USE_STATIC_RUNTIME = OFF
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:536 ] Boost_ADDITIONAL_VERSIONS = 1.53.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Boost_NO_SYSTEM_PATHS = TRUE
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:606 ] Declared as CMake or Environmental Variables:
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:608 ] BOOST_ROOT = /home/mnowotka/Documents/boost_1_53_0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:610 ] BOOST_INCLUDEDIR = /home/mnowotka/Documents/boost_1_53_0/boost
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:612 ] BOOST_LIBRARYDIR = /home/mnowotka/Documents/boost_1_53_0/stage/lib
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:614 ] _boost_TEST_VERSIONS = 1.53.0;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
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:696 ] location of version.hpp: /home/mnowotka/Documents/boost_1_53_0/boost/version.hpp
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:715 ] version.hpp reveals boost 1.53.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:808 ] guessed _boost_COMPILER =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:818 ] _boost_MULTITHREADED =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:861 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:863 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:906 ] _boost_LIBRARY_SEARCH_DIRS = /home/mnowotka/Documents/boost_1_53_0/stage/lib;/home/mnowotka/Documents/boost_1_53_0/lib;/home/mnowotka/Documents/boost_1_53_0/stage/lib;/home/mnowotka/Documents/boost_1_53_0/lib;/home/mnowotka/Documents/boost_1_53_0/../lib;/home/mnowotka/Documents/boost_1_53_0/stage/lib
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:977 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-1_53;boost_regex;boost_regex-1_53;boost_regex;boost_regex
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:1009 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-d-1_53;boost_regex-d;boost_regex-d-1_53;boost_regex-d;boost_regex;boost_regex
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:1119 ] Boost_FOUND = FALSE
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1202 (message):
Unable to find the requested Boost libraries.
Boost version: 1.53.0
Boost include path: /home/mnowotka/Documents/boost_1_53_0
The following Boost libraries could not be found:
boost_regex
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
Code/GraphMol/SLNParse/CMakeLists.txt:4 (find_package)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_REGEX_LIBRARY (ADVANCED)
linked by target "testSLNParse" in directory /home/mnowotka/Documents/rdkit-code/Code/GraphMol/SLNParse
-- Configuring incomplete, errors occurred!
I have only one question: why?
What I'm doing wrong? This drives me crazy....
(BTW: it doesn't matter if I set Boost_USE_STATIC_LIBS and Boost_USE_STATIC_RUNTIME ON or OFF - it doesn't work either...)
You are aware, that Emscripten can currently only use modules (e.g. Boost, Boost-Regex) which source code it compiles? In other words, Emscripten can not use dynamic libraries or precompiled static ones!
So you have to add the sourcecode for Boost-Regex to your cmake file and build them together (I have not done cmake for quite a while so I cannot tell you how).
Or you could remove the check for Boost-Regex from cmake and hardcode the necessary references
Whatever you choose to do, you will have to build Boost-Regex with Emscripten, too!
As for Emscripten, you should really use Boost_USE_STATIC_LIBS=ON because dynamic libraries are currently not supported by Emscripten (see above).
Emscripten does also not support calls to pthread* or any concurrent handling. You should search for these things in your code.
Sorry to sound so negative, but currently using libraries with Emscripten is no piece of cake.

Resources