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

[boost] System-wide FindBoost.cmake used for builds #93

Closed
SSE4 opened this issue Sep 25, 2019 · 2 comments
Closed

[boost] System-wide FindBoost.cmake used for builds #93

SSE4 opened this issue Sep 25, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@SSE4
Copy link
Contributor

SSE4 commented Sep 25, 2019

moved from https://github.com/conan-community/community/issues/156, by @rdeterre

Description of Problem, Request, or Question

Using the cmake_paths conan generator with boost::log 1.69.0, CMake warns that "New Boost version may have incorrect or missing dependencies and imported targets" on a Fedora 29 machine (full log below). The warning comes from the system-wide FindBoost.cmake file, which is still version 1.66 on this system. Shouldn't the conan boost package include FindBoost.cmake directly?

Package Details (Include if Applicable)

  • Package Name/Version: boost/1.69.0
  • Operating System: Linux
  • Operation System Version: Fedora 29
  • Compiler+version: clang-7
  • Conan version: conan 1.12.3
  • Python version: python 3.7.2

Steps to reproduce (Include if Applicable)

Build a package with the following files:

conanfile.py:

from conans import ConanFile, CMake
from conans.tools import vcvars
import os

class BoostIssueConan(ConanFile):
    name = "boost-issue"

    requires = "boost/1.69.0@conan/stable"

    settings = "os", "compiler", "build_type", "arch"
    generators = "cmake_paths"

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()

CMakeLists.txt

project(boost-issue)

include(${CMAKE_BINARY_DIR}/conan_paths.cmake)

find_package(Boost 1.69.0 REQUIRED COMPONENTS log)
add_executable(boost-issue main.cpp)
target_link_libraries(boost-issue PRIVATE Boost::log)

main.cpp

#include <boost/log/trivial.hpp>

namespace keywords = boost::log::keywords;

int main()
{
  BOOST_LOG_TRIVIAL(info) << "An informational severity message";
}

Build logs (Include if Available)

[rdeterre@localhost build]$ conan install .. && conan build ..
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=7.0
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
CC=clang
CXX=clang++
conanfile.py (boost-issue/None@None/None): Installing package
Requirements
    boost/1.69.0@conan/stable from 'conan-center' - Cache
    bzip2/1.0.6@conan/stable from 'conan-center' - Cache
    zlib/1.2.11@conan/stable from 'conan-center' - Cache
Packages
    boost/1.69.0@conan/stable:cabba3b08559858fc9c32b2017ab7a3cb8781a5e - Cache
    bzip2/1.0.6@conan/stable:35437353b857392790f3121d268b1db3fb9a09b0 - Cache
    zlib/1.2.11@conan/stable:35437353b857392790f3121d268b1db3fb9a09b0 - Cache

bzip2/1.0.6@conan/stable: Already installed!
zlib/1.2.11@conan/stable: Already installed!
boost/1.69.0@conan/stable: Already installed!
boost/1.69.0@conan/stable: 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_math_tr1l', 'boost_unit_test_framework', 'boost_stacktrace_noop', 'boost_stacktrace_basic', 'boost_math_tr1', 'boost_math_c99f', 'boost_log_setup', 'boost_math_c99l', 'boost_math_tr1f', 'boost_math_c99', 'boost_stacktrace_addr2line']
boost/1.69.0@conan/stable: Package folder: /home/rdeterre/.conan/data/boost/1.69.0/conan/stable/package/cabba3b08559858fc9c32b2017ab7a3cb8781a5e
conanfile.py (boost-issue/None@None/None): Generator cmake_paths created conan_paths.cmake
conanfile.py (boost-issue/None@None/None): Generator txt created conanbuildinfo.txt
conanfile.py (boost-issue/None@None/None): Generated conaninfo.txt
conanfile.py (boost-issue/None@None/None): Generated graphinfo
conanfile.py (boost-issue/None@None/None): Running build()
-- The C compiler identification is Clang 7.0.1
-- The CXX compiler identification is Clang 7.0.1
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- 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/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (find_package)


CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:847 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindBoost.cmake:959 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake/Modules/FindBoost.cmake:1618 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:5 (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.69.0
-- Found the following Boost libraries:
--   log
--   date_time
--   log_setup
--   system
--   filesystem
--   thread
--   regex
--   chrono
--   atomic
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_DATAROOTDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR
    CMAKE_INSTALL_LIBEXECDIR
    CMAKE_INSTALL_OLDINCLUDEDIR
    CMAKE_INSTALL_SBINDIR
    CONAN_COMPILER
    CONAN_COMPILER_VERSION
    CONAN_CXX_FLAGS
    CONAN_C_FLAGS
    CONAN_EXPORTED
    CONAN_IN_LOCAL_CACHE
    CONAN_LIBCXX
    CONAN_SHARED_LINKER_FLAGS


-- Build files have been written to: /home/rdeterre/boost-issue/build
Scanning dependencies of target boost-issue
[ 50%] Building CXX object CMakeFiles/boost-issue.dir/main.o
[100%] Linking CXX executable boost-issue
[100%] Built target boost-issue
@jgsogo
Copy link
Contributor

jgsogo commented Jul 17, 2020

Hi! Is this issue still valid? Maybe it was related to the casing in the FindBoost.cmake file?

Thanks!

artem-kamyshev pushed a commit to artem-kamyshev/conan-center-index that referenced this issue Sep 28, 2020
@perseoGI
Copy link
Contributor

perseoGI commented Sep 2, 2024

Hi there! 👋
I'm closing this issue as boost/1.69.0 is not more supported and the recipe has suffer plenty of changes.
If the issue remains, do not hesitate to reopen this issue or creating a new one.
Happy coding 🐸

@perseoGI perseoGI closed this as completed Sep 2, 2024
datalogics-robb pushed a commit to datalogics-robb/conan-center-index that referenced this issue Sep 3, 2024
Steal the patch from conan-center-index that fixes our libiconv
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

No branches or pull requests

4 participants