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

folly: migrate to Conan v2 #21109

Closed
wants to merge 68 commits into from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Nov 14, 2023

Continues from #15726.

kexianda and others added 30 commits November 14, 2023 09:33
* bumpup to v20221031.00
* conan v2 support
* only include needed boost components, not all the boost components, to
  avoid  static link order issue in some cases.
* remove cmake version limitation
…hecks pass, but default_cppstd is lower than minimal_cppstd
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
… min_cppstd, set min_cppstd if the compiler supports it
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Which in turn sets FOLLY_BOOST_LINK_STATIC, which ends up setting Boost_USE_STATIC_LIBS
@conan-center-bot

This comment has been minimized.

@valgur
Copy link
Contributor Author

valgur commented Jan 23, 2024

Good job, @Hopobcn! :)

@ghost ghost mentioned this pull request Feb 11, 2024
3 tasks
@@ -0,0 +1,39 @@
# Set the dependency flags expected by https://github.com/facebook/folly/blob/v2023.12.18.00/CMake/folly-deps.cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like handling this here rather than in a lot of patches :D And the link to that folly script is really useful

@@ -0,0 +1,39 @@
# Set the dependency flags expected by https://github.com/facebook/folly/blob/v2023.12.18.00/CMake/folly-deps.cmake

macro(custom_find_package name var)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I suggest package_name as a variable name, and variable_prefix for var? Took me a while to work out what was happening - just a minor comment, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed parameters (and refactored the implementation to avoid setting variables if we should not to)

NO_DEFAULT_PATH
PATHS ${CMAKE_PREFIX_PATH}
)
set(${var}_FOUND TRUE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some of these - the _FOUND variable will already be set by the call to find package, at least for those where the variable prefix and the package name are the same (LZ4 and ZLIB) -

and for some of the other variables, I think they're already set with exactly the same name already by some logic in the recipe? e.g. for OpenSSL I think there's a custom cmake file being loaded that sets the variables with the upper case OPENSSL_ prefix -

I'd like to work out exactly for which ones the expected variables are not there, rather than doing it for all the dependencies? I also want to see if there's a chance that it could all be handled by clever use of the attributes of cmakedeps in the generate() method

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done this modification to conan_deps.cmake:

function(custom_find_package package_name variable_prefix)
    find_package(${package_name} ${ARGN}
        # Allow only Conan packages
        NO_DEFAULT_PATH
        PATHS ${CMAKE_PREFIX_PATH}
    )
    
    list(APPEND FROM FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE_DIR LIBRARIES LIBRARIES LIBRARIES DEFINITIONS)
    list(APPEND TO   FOUND VERSION VERSION_STRING INCLUDE_DIRS INCLUDE_DIR INCLUDE     LIB       LIBRARY   LIBRARIES DEFINITIONS)

    foreach (from_substr to_substr IN ZIP_LISTS FROM TO)
        set(from_var ${package_name}_${from_substr})
        set(to_var   ${variable_prefix}_${to_substr})
        if (NOT DEFINED ${from_var})
            message("${from_var} is not defined! skip!")
            continue()
        endif()
        if (DEFINED ${to_var})
            if (${${to_var}} STREQUAL ${${from_var}})
                continue()
            endif()
            message("${to_var} is already defined! Overriding contents!")
        endif()
        message("${to_var} = ${${from_var}}")
        set(${to_var} ${${from_var}})
    endforeach()
endfunction()

With this I can print you this (jump at the end for a TLTR):

  • BZip2 -> BZIP2:
-- Conan: Target declared 'BZip2::BZip2'
-- Conan: Including build module from '/home/pfarre/.conan/data/bzip2/1.0.8/_/_/package/05fe625add2cba4c5464d877deeedbb8388b813f/lib/cmake/conan-official-bzip2-variables.cmake'
BZIP2_FOUND is already defined! Overriding contents!
BZIP2_FOUND = 1
BZIP2_VERSION = 1.0.8
BZIP2_INCLUDE = /home/pfarre/.conan/data/bzip2/1.0.8/_/_/package/05fe625add2cba4c5464d877deeedbb8388b813f/include
BZIP2_LIB = BZip2::BZip2
BZIP2_LIBRARY = BZip2::BZip2
BZip2_DEFINITIONS is not defined! skip!
  • Backtrace -> BACTRACE
-- Could NOT find Backtrace (missing: Backtrace_DIR)
BACKTRACE_FOUND = 0
Backtrace_VERSION is not defined! skip!
Backtrace_VERSION_STRING is not defined! skip!
Backtrace_INCLUDE_DIRS is not defined! skip!
Backtrace_INCLUDE_DIR is not defined! skip!
Backtrace_INCLUDE_DIR is not defined! skip!
Backtrace_LIBRARIES is not defined! skip!
Backtrace_LIBRARIES is not defined! skip!
Backtrace_LIBRARIES is not defined! skip!
Backtrace_DEFINITIONS is not defined! skip!
  • DoubleConversion -> DOUBLE_CONVERSION
-- Conan: Target declared 'double-conversion::double-conversion'
DOUBLE_CONVERSION_FOUND = 1
DOUBLE_CONVERSION_VERSION = 3.3.0
DOUBLE_CONVERSION_VERSION_STRING = 3.3.0
DOUBLE_CONVERSION_INCLUDE_DIRS = /home/pfarre/.conan/data/double-conversion/3.3.0/_/_/package/40d6f47071c6e7d55d23d8d37e309f1b81b9e0aa/include
DOUBLE_CONVERSION_INCLUDE_DIR = /home/pfarre/.conan/data/double-conversion/3.3.0/_/_/package/40d6f47071c6e7d55d23d8d37e309f1b81b9e0aa/include
DOUBLE_CONVERSION_INCLUDE = /home/pfarre/.conan/data/double-conversion/3.3.0/_/_/package/40d6f47071c6e7d55d23d8d37e309f1b81b9e0aa/include
DOUBLE_CONVERSION_LIB = double-conversion::double-conversion
DOUBLE_CONVERSION_LIBRARY = double-conversion::double-conversion
DOUBLE_CONVERSION_LIBRARIES = double-conversion::double-conversion
DoubleConversion_DEFINITIONS is not defined! skip!
  • Gflags -> LIBGFLAGS
-- Conan: Target declared 'gflags::gflags'
LIBGFLAGS_FOUND = 1
LIBGFLAGS_VERSION = 2.2.2
LIBGFLAGS_VERSION_STRING = 2.2.2
LIBGFLAGS_INCLUDE_DIRS = /home/pfarre/.conan/data/gflags/2.2.2/_/_/package/1ca36814323e09ecb80e8016216d8afe1334e697/include
LIBGFLAGS_INCLUDE_DIR = /home/pfarre/.conan/data/gflags/2.2.2/_/_/package/1ca36814323e09ecb80e8016216d8afe1334e697/include
LIBGFLAGS_INCLUDE = /home/pfarre/.conan/data/gflags/2.2.2/_/_/package/1ca36814323e09ecb80e8016216d8afe1334e697/include
LIBGFLAGS_LIB = gflags::gflags
LIBGFLAGS_LIBRARY = gflags::gflags
LIBGFLAGS_LIBRARIES = gflags::gflags
Gflags_DEFINITIONS is not defined! skip!
  • Glog -> GLOG
    (it didn't define vars?)
-- Conan: Target declared 'glog::glog'
GLOG_FOUND = 1
GLOG_VERSION = 0.6.0
GLOG_VERSION_STRING = 0.6.0
GLOG_INCLUDE_DIRS = /home/pfarre/.conan/data/glog/0.6.0/_/_/package/7745497e7cd696edfa81909583dc72e094cda85b/include
GLOG_INCLUDE_DIR = /home/pfarre/.conan/data/glog/0.6.0/_/_/package/7745497e7cd696edfa81909583dc72e094cda85b/include
GLOG_INCLUDE = /home/pfarre/.conan/data/glog/0.6.0/_/_/package/7745497e7cd696edfa81909583dc72e094cda85b/include
GLOG_LIB = glog::glog
GLOG_LIBRARY = glog::glog
GLOG_LIBRARIES = glog::glog
GLOG_DEFINITIONS = -DGFLAGS_DLL_DECLARE_FLAG=;-DGFLAGS_DLL_DEFINE_FLAG=
  • LZ4 -> LZ4
-- Conan: Target declared 'LZ4::lz4_static'
LZ4_INCLUDE = /home/pfarre/.conan/data/lz4/1.9.4/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
LZ4_LIB = LZ4::lz4_static
LZ4_LIBRARY = LZ4::lz4_static
LZ4_DEFINITIONS is not defined! skip!
  • LibAIO -> LIBAIO
-- Could NOT find LibAIO (missing: LibAIO_DIR)
LIBAIO_FOUND = 0
LibAIO_VERSION is not defined! skip!
LibAIO_VERSION_STRING is not defined! skip!
LibAIO_INCLUDE_DIRS is not defined! skip!
LibAIO_INCLUDE_DIR is not defined! skip!
LibAIO_INCLUDE_DIR is not defined! skip!
LibAIO_LIBRARIES is not defined! skip!
LibAIO_LIBRARIES is not defined! skip!
LibAIO_LIBRARIES is not defined! skip!
LibAIO_DEFINITIONS is not defined! skip!
  • LibDwarf -> LIBDWARF
-- Conan: Target declared 'libdwarf::libdwarf'
-- Conan: Target declared 'libelf::libelf'
LIBDWARF_FOUND = 1
LIBDWARF_VERSION = 20191104
LIBDWARF_VERSION_STRING = 20191104
LIBDWARF_INCLUDE_DIRS = /home/pfarre/.conan/data/libdwarf/20191104/_/_/package/a5894b121f8a353492b0650ca04675d95b582c57/include
LIBDWARF_INCLUDE_DIR = /home/pfarre/.conan/data/libdwarf/20191104/_/_/package/a5894b121f8a353492b0650ca04675d95b582c57/include
LIBDWARF_INCLUDE = /home/pfarre/.conan/data/libdwarf/20191104/_/_/package/a5894b121f8a353492b0650ca04675d95b582c57/include
LIBDWARF_LIB = libdwarf::libdwarf
LIBDWARF_LIBRARY = libdwarf::libdwarf
LIBDWARF_LIBRARIES = libdwarf::libdwarf
LibDwarf_DEFINITIONS is not defined! skip!
  • LibEvent -> LIBEVENT
-- Conan: Component target declared 'libevent::core'
-- Conan: Component target declared 'libevent::extra'
-- Conan: Component target declared 'libevent::openssl'
-- Conan: Component target declared 'libevent::pthreads'
-- Conan: Target declared 'libevent::libevent'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from '/home/pfarre/.conan/data/openssl/3.2.1/_/_/package/23397964b45185c7d5b424947827549f978ec261/lib/cmake/conan-official-openssl-variables.cmake'
LIBEVENT_FOUND = 1
LIBEVENT_VERSION = 2.1.12
LIBEVENT_VERSION_STRING = 2.1.12
LIBEVENT_INCLUDE_DIRS = /home/pfarre/.conan/data/libevent/2.1.12/_/_/package/a9d27319757cc726377f14f70a3fd3e754ce52e1/include
LIBEVENT_INCLUDE_DIR = /home/pfarre/.conan/data/libevent/2.1.12/_/_/package/a9d27319757cc726377f14f70a3fd3e754ce52e1/include
LIBEVENT_INCLUDE = /home/pfarre/.conan/data/libevent/2.1.12/_/_/package/a9d27319757cc726377f14f70a3fd3e754ce52e1/include
LIBEVENT_LIB = libevent::libevent
LIBEVENT_LIBRARY = libevent::libevent
LIBEVENT_LIBRARIES = libevent::libevent
LibEvent_DEFINITIONS is not defined! skip!
  • libLZMA -> LIBLZMA
-- Conan: Including build module from '/home/pfarre/.conan/data/xz_utils/5.4.5/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/lib/cmake/conan-official-xz_utils-variables.cmake'
LIBLZMA_FOUND is already defined! Overriding contents!
LIBLZMA_FOUND = 1
LIBLZMA_VERSION = 5.4.5
LIBLZMA_INCLUDE_DIR = /home/pfarre/.conan/data/xz_utils/5.4.5/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
LIBLZMA_INCLUDE = /home/pfarre/.conan/data/xz_utils/5.4.5/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
LIBLZMA_LIB = LibLZMA::LibLZMA
LIBLZMA_LIBRARY = LibLZMA::LibLZMA
LIBLZMA_DEFINITIONS = -DLZMA_API_STATIC
  • LibUnwind -> LIBUNWIND
LIBUNWIND_FOUND = 1
LIBUNWIND_VERSION = 1.7.2
LIBUNWIND_VERSION_STRING = 1.7.2
LIBUNWIND_INCLUDE_DIRS = /home/pfarre/.conan/data/libunwind/1.7.2/_/_/package/b93bd04e1b2047f2d89e8012d4fb0c09a8652401/include
LIBUNWIND_INCLUDE_DIR = /home/pfarre/.conan/data/libunwind/1.7.2/_/_/package/b93bd04e1b2047f2d89e8012d4fb0c09a8652401/include
LIBUNWIND_INCLUDE = /home/pfarre/.conan/data/libunwind/1.7.2/_/_/package/b93bd04e1b2047f2d89e8012d4fb0c09a8652401/include
LIBUNWIND_LIB = libunwind::libunwind
LIBUNWIND_LIBRARY = libunwind::libunwind
LIBUNWIND_LIBRARIES = libunwind::libunwind
LibUnwind_DEFINITIONS is not defined! skip!
  • LibUring -> LIBURING
-- Could NOT find LibUring (missing: LibUring_DIR)
LIBURING_FOUND = 0
LibUring_VERSION is not defined! skip!
LibUring_VERSION_STRING is not defined! skip!
LibUring_INCLUDE_DIRS is not defined! skip!
LibUring_INCLUDE_DIR is not defined! skip!
LibUring_INCLUDE_DIR is not defined! skip!
LibUring_LIBRARIES is not defined! skip!
LibUring_LIBRARIES is not defined! skip!
LibUring_LIBRARIES is not defined! skip!
LibUring_DEFINITIONS is not defined! skip!
  • Libiberty -> LIBIBERTY
-- Conan: Target declared 'libiberty::libiberty'
LIBIBERTY_FOUND = 1
LIBIBERTY_VERSION = 9.1.0
LIBIBERTY_VERSION_STRING = 9.1.0
LIBIBERTY_INCLUDE_DIRS = /home/pfarre/.conan/data/libiberty/9.1.0/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
LIBIBERTY_INCLUDE_DIR = /home/pfarre/.conan/data/libiberty/9.1.0/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
LIBIBERTY_INCLUDE = /home/pfarre/.conan/data/libiberty/9.1.0/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
LIBIBERTY_LIB = libiberty::libiberty
LIBIBERTY_LIBRARY = libiberty::libiberty
LIBIBERTY_LIBRARIES = libiberty::libiberty
Libiberty_DEFINITIONS is not defined! skip!
  • Libsodium -> LIBSODIUM
-- Conan: Target declared 'libsodium::libsodium'
LIBSODIUM_FOUND = 1
LIBSODIUM_VERSION = 1.0.19
LIBSODIUM_VERSION_STRING = 1.0.19
LIBSODIUM_INCLUDE_DIRS = /home/pfarre/.conan/data/libsodium/1.0.19/_/_/package/c7639d9fb8d67cdbfccdedc743b29929f98af2e3/include
LIBSODIUM_INCLUDE_DIR = /home/pfarre/.conan/data/libsodium/1.0.19/_/_/package/c7639d9fb8d67cdbfccdedc743b29929f98af2e3/include
LIBSODIUM_INCLUDE = /home/pfarre/.conan/data/libsodium/1.0.19/_/_/package/c7639d9fb8d67cdbfccdedc743b29929f98af2e3/include
LIBSODIUM_LIB = libsodium::libsodium
LIBSODIUM_LIBRARY = libsodium::libsodium
LIBSODIUM_LIBRARIES = libsodium::libsodium
LIBSODIUM_DEFINITIONS = -DSODIUM_STATIC
  • OpenSSL -> OPENSSL
-- Conan: Including build module from '/home/pfarre/.conan/data/openssl/3.2.1/_/_/package/23397964b45185c7d5b424947827549f978ec261/lib/cmake/conan-official-openssl-variables.cmake'
OPENSSL_FOUND is already defined! Overriding contents!
OPENSSL_FOUND = 1
OPENSSL_VERSION_STRING = 3.2.1
OPENSSL_INCLUDE_DIRS = /home/pfarre/.conan/data/openssl/3.2.1/_/_/package/23397964b45185c7d5b424947827549f978ec261/include
OPENSSL_INCLUDE = /home/pfarre/.conan/data/openssl/3.2.1/_/_/package/23397964b45185c7d5b424947827549f978ec261/include
OPENSSL_LIB = openssl::openssl
OPENSSL_LIBRARY = openssl::openssl
OpenSSL_DEFINITIONS is not defined! skip!
  • Snappy -> SNAPPY
-- Conan: Component target declared 'Snappy::snappy'
SNAPPY_FOUND = 1
SNAPPY_VERSION = 1.1.10
SNAPPY_VERSION_STRING = 1.1.10
SNAPPY_INCLUDE_DIRS = /home/pfarre/.conan/data/snappy/1.1.10/_/_/package/ccd3114d169373507f7cbb1403e32d9b76dc09b1/include
SNAPPY_INCLUDE_DIR = /home/pfarre/.conan/data/snappy/1.1.10/_/_/package/ccd3114d169373507f7cbb1403e32d9b76dc09b1/include
SNAPPY_INCLUDE = /home/pfarre/.conan/data/snappy/1.1.10/_/_/package/ccd3114d169373507f7cbb1403e32d9b76dc09b1/include
SNAPPY_LIB = Snappy::snappy
SNAPPY_LIBRARY = Snappy::snappy
SNAPPY_LIBRARIES = Snappy::snappy
Snappy_DEFINITIONS is not defined! skip!
  • ZLIB -> ZLIB
ZLIB_INCLUDE = /home/pfarre/.conan/data/zlib/1.3.1/_/_/package/6f0ae28ca544f91304c1896fc1416e4c911fe941/include
ZLIB_LIB = ZLIB::ZLIB
ZLIB_LIBRARY = ZLIB::ZLIB
ZLIB_DEFINITIONS is not defined! skip!
  • Zstd -> ZSTD
-- Conan: Component target declared 'zstd::libzstd_static'
ZSTD_FOUND = 1
ZSTD_VERSION = 1.5.5
ZSTD_VERSION_STRING = 1.5.5
ZSTD_INCLUDE_DIRS = /home/pfarre/.conan/data/zstd/1.5.5/_/_/package/d1c83ac8db72543a3dc9ce5e00f4142069d63ebe/include
ZSTD_INCLUDE_DIR = /home/pfarre/.conan/data/zstd/1.5.5/_/_/package/d1c83ac8db72543a3dc9ce5e00f4142069d63ebe/include
ZSTD_INCLUDE = /home/pfarre/.conan/data/zstd/1.5.5/_/_/package/d1c83ac8db72543a3dc9ce5e00f4142069d63ebe/include
ZSTD_LIB = zstd::libzstd_static
ZSTD_LIBRARY = zstd::libzstd_static
ZSTD_LIBRARIES = zstd::libzstd_static
Zstd_DEFINITIONS is not defined! skip!
-- Conan: Component target declared 'fmt::fmt'
  • fmt -> FMT
-- Conan: Component target declared 'fmt::fmt'
FMT_FOUND = 1
FMT_VERSION = 10.1.1
FMT_VERSION_STRING = 10.1.1
FMT_INCLUDE_DIRS = /home/pfarre/.conan/data/fmt/10.1.1/_/_/package/c4e6c752a545fedbdfb7d7dae848a2445bcdc818/include
FMT_INCLUDE_DIR = /home/pfarre/.conan/data/fmt/10.1.1/_/_/package/c4e6c752a545fedbdfb7d7dae848a2445bcdc818/include
FMT_INCLUDE = /home/pfarre/.conan/data/fmt/10.1.1/_/_/package/c4e6c752a545fedbdfb7d7dae848a2445bcdc818/include
FMT_LIB = fmt::fmt
FMT_LIBRARY = fmt::fmt
FMT_LIBRARIES = fmt::fmt
fmt_DEFINITIONS is not defined! skip!

(sorry for the verbosity)

Observations:

  1. Overriding contents! only appears for _FOUND (due TRUE and 1 differences) but not for any other value, we should not be overriding existing values
  2. Only those optional libraries not provided by requirements() (liburing, libaio, bactrace) are skipped (And folly skips them too)

Looking at https://docs.conan.io/1/reference/conanfile/tools/cmake/cmakedeps.html#properties the only way I see to tweak/define cmake variables aliases (like _LIB, _LIBRARY from _LIBRARIES) would be to define cmake_build_modules on the fly. Not sure if it's worth it if we have to end-up putting the same contents as in conan_deps.cmake

Also we are already telling CMakeDeps (via deps.set_property("<pkg>", "cmake_file_name", "FollyExpectedValue") to generate specific cmake config files with what folly expects.


TLTR

  1. Currently we're telling CMakeDeps to use specific cmake_file_name(s) to match what Folly expects (to avoid introducing more patches).
  2. But folly-deps.cmake instead of propagating targets it defines CMake variables (in uppercase).
  3. conan_deps.cmake is trying to massage the variables that Conan presents for folly-deps.cmake to consume (and minimize patches).

# See the License for the specific language governing permissions and
# limitations under the License.

-set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate that this patch was already there - but it's a good opportunity to check why it's here in the first place. There's nothing wrong with -g - it's still optimized binaries in Release mode. Either way, not related to this PR if this was already there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess it's that is an attempt at producing a pure Release package without debug symbols. We can consider this a concious decision by Folly and remove the pactch if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say it disrespects the user's expectations for Release, since -O with -g is what RelWithDebInfo build type is for. On the other hand, it would be better addressed upstream rather than on CCI, so I'm in favor of dropping this patch.

else()
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to remove the test_v1_package folder from the PR - it's not required anymore.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(sorry I've been disconnected for a while) are test_v1_packages being removed already? Is there any problem if I keep it for this recipe?

I personally cannot migrate to Conan 2 yet and having a test_v1_package would be handy for me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hopobcn You still can use CMakeToolchain and CMakeDeps generators in Conan 1.x. They are much better than older cmake and cmake_find_package. Docs: https://docs.conan.io/1/reference/conanfile/tools/cmake/cmaketoolchain.html

Copy link
Contributor

@Hopobcn Hopobcn Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uilianries yes we use Conan 1.x with CMakeToolchain/CMakeDeps already but in the past I had problems trying to use test_package with conan 1.x CMakeToolchain/CMakeDeps so we use test_v1_package mainly. Our blockers are setting up new infrastructure for Conan 2 (artifactory remotes, docker images) [easy], CLI changes to be applied at couple of tens of projects (cryface)... and that we have to catch-up with latest CCI (cryface x100).
Edit: All of that while the migration to Conan 2x not being a major goal of the organization :-(

@valgur
Copy link
Contributor Author

valgur commented Feb 20, 2024

@Hopobcn pinging just in case you missed the PR comments.

@conan-center-bot conan-center-bot added Failed Version conflict There is a version conflict when solving the dependencies graph labels Apr 4, 2024
@conan-center-bot

This comment has been minimized.

@Hopobcn Hopobcn force-pushed the folly-modernization-followup branch from cc6f285 to 8f81d79 Compare April 4, 2024 16:02
@Hopobcn
Copy link
Contributor

Hopobcn commented Apr 4, 2024

No idea how to solve

    Version conflict: glog/0.6.0->libunwind/1.8.0, folly/2023.12.18.00->libunwind/1.7.2.
ERROR: Version conflict: glog/0.6.0->libunwind/1.8.0, folly/2023.12.18.00->libunwind/1.7.2.

Tried applying https://docs.conan.io/2.0/tutorial/versioning/conflicts.html#resolving-conflicts (tested with self.requires("libunwind/1.8.0", override=True) but it didn't work)

@conan-center-bot

This comment has been minimized.

@uilianries uilianries linked an issue May 7, 2024 that may be closed by this pull request
@conan-center-bot conan-center-bot removed the Version conflict There is a version conflict when solving the dependencies graph label May 27, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 5 (0c8f174095c9e58d69fc0af46b162161c1ba358b):

  • folly/2022.10.31.00:
    CI failed to create some packages (All logs)

    Logs for packageID d70dbb2412abb0ac969892835e172596af8fa895:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    folly:shared=False
    
    [...]
    Call Stack (most recent call first):
      /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/build/Release/generators/GflagsConfig.cmake:16 (include)
      CMake/folly-deps.cmake:55 (find_package)
      CMakeLists.txt:132 (include)
    
    
    CMake Warning at /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/build/Release/generators/LZ4Targets.cmake:25 (message):
      Target name 'lz4::lz4' already exists.
    Call Stack (most recent call first):
      /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/build/Release/generators/LZ4Config.cmake:16 (include)
      CMake/folly-deps.cmake:107 (find_package)
      CMakeLists.txt:132 (include)
    
    
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0042
    
    
    In file included from /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/src/folly/CancellationToken.h:365,
                     from /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/src/folly/CancellationToken.cpp:17:
    /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/src/folly/CancellationToken-inl.h:23:10: fatal error: glog/logging.h: No such file or directory
       23 | #include <glog/logging.h>
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    In file included from /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/src/folly/Conv.cpp:17:
    /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/src/folly/Conv.h:120:10: fatal error: double-conversion/double-conversion.h: No such file or directory
      120 | #include <double-conversion/double-conversion.h> // V8 JavaScript implementation
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [CMakeFiles/folly_base.dir/folly/CancellationToken.cpp.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** [CMakeFiles/folly_base.dir/folly/Conv.cpp.o] Error 1
    make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
    make: *** [all] Error 2
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    WARN: boost/1.84.0: requirement zlib/[>=1.2.11 <2] overridden by folly/2022.10.31.00 to zlib/1.3.1 
    WARN: libunwind/1.8.0: requirement zlib/[>=1.2.11 <2] overridden by glog/0.7.0 to zlib/1.3.1 
    WARN: libevent/2.1.12: requirement openssl/[>=1.1 <4] overridden by folly/2022.10.31.00 to openssl/3.2.1 
    WARN: openssl/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by libevent/2.1.12 to zlib/1.3.1 
    WARN: libdwarf/0.9.1: requirement zlib/[>=1.2.11 <2] overridden by folly/2022.10.31.00 to zlib/1.3.1 
    folly/2022.10.31.00: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    folly/2022.10.31.00: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    folly/2022.10.31.00: ERROR: Package 'd70dbb2412abb0ac969892835e172596af8fa895' build failed
    folly/2022.10.31.00: WARN: Build folder /home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/build/Release
    ERROR: folly/2022.10.31.00: Error in build() method, line 244
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build "/home/conan/workspace/prod-v1/bsr/49827/ebeef/.conan/data/folly/2022.10.31.00/_/_/build/d70dbb2412abb0ac969892835e172596af8fa895/build/Release" '--' '-j3'
    
  • folly/2024.05.27.00:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 5 (0c8f174095c9e58d69fc0af46b162161c1ba358b):

  • folly/2024.05.27.00:
    CI failed to create some packages (All logs)

    Logs for packageID 19aad02e7bcde9d3fbbdf9543401dd5244840bf4:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    -- Performing Test COMPILER_HAS_F_COROUTINES
    -- Performing Test COMPILER_HAS_F_COROUTINES - Success
    -- GCC has support for C++ coroutines, setting flag for Folly build.
    -- arch x86_64-linux-gnu matches x86_64, building SSE4.2 version of base64
    -- Performing Test COMPILER_HAS_M_PCLMUL
    -- Performing Test COMPILER_HAS_M_PCLMUL - Success
    -- compiler has flag pclmul, setting compile flag for /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/external/fast-crc32/avx512_crc32c_v8s3x4.cpp;/home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/external/fast-crc32/sse_crc32c_v8s3x3.cpp;/home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/hash/detail/ChecksumDetail.cpp;/home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/hash/detail/Crc32CombineDetail.cpp;/home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/hash/detail/Crc32cDetail.cpp
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        CMAKE_POLICY_DEFAULT_CMP0042
    
    
    -- Build files have been written to: /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/build/Release
    
    folly/2024.05.27.00: Running CMake.build()
    folly/2024.05.27.00: RUN: cmake --build "/home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/build/Release" -- -j3
    Scanning dependencies of target folly_base
    [  0%] Building CXX object CMakeFiles/folly_base.dir/folly/CancellationToken.cpp.o
    [  0%] Building CXX object CMakeFiles/folly_base.dir/folly/ClockGettimeWrappers.cpp.o
    [  1%] Building CXX object CMakeFiles/folly_base.dir/folly/Conv.cpp.o
    In file included from /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/Conv.cpp:17:
    /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/Conv.h:124:10: fatal error: double-conversion/double-conversion.h: No such file or directory
      124 | #include <double-conversion/double-conversion.h> // V8 JavaScript implementation
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    CMakeFiles/folly_base.dir/build.make:88: recipe for target 'CMakeFiles/folly_base.dir/folly/Conv.cpp.o' failed
    make[2]: *** [CMakeFiles/folly_base.dir/folly/Conv.cpp.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    In file included from /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/CancellationToken.h:365,
                     from /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/CancellationToken.cpp:17:
    /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/src/folly/CancellationToken-inl.h:23:10: fatal error: glog/logging.h: No such file or directory
       23 | #include <glog/logging.h>
          |          ^~~~~~~~~~~~~~~~
    compilation terminated.
    CMakeFiles/folly_base.dir/build.make:62: recipe for target 'CMakeFiles/folly_base.dir/folly/CancellationToken.cpp.o' failed
    make[2]: *** [CMakeFiles/folly_base.dir/folly/CancellationToken.cpp.o] Error 1
    CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/folly_base.dir/all' failed
    make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
    
    folly/2024.05.27.00: ERROR: 
    Package '19aad02e7bcde9d3fbbdf9543401dd5244840bf4' build failed
    folly/2024.05.27.00: WARN: Build folder /home/conan/workspace/prod-v2/bsr/44171/eabdd/p/b/follye657602c2430e/b/build/Release
    ERROR: folly/2024.05.27.00: Error in build() method, line 244
    	cmake.build()
    	ConanException: Error 2 while executing
    
  • folly/2022.10.31.00:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@valgur
Copy link
Contributor Author

valgur commented May 30, 2024

#24165

@valgur valgur closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[request] <folly>/<v2024.05.02.00>
7 participants