conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.17k stars 974 forks source link

[question] Test and documentation of a header-only package #12614

Closed Becheler closed 1 year ago

Becheler commented 1 year ago

I am trying to package a header-only library, but I encounter a two main problems.

At least this works: Local testing and documentation

First, I succeeded to get these command work and do what I want them to do:

conan install conan/conanfile.py --build=missing --install-folder=build -pr:b=conan/profiles/clang_13 -pr:h=conan/profiles/clang_13
cd build
cmake -D CMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake ..
cmake --build .
ctest
make docs

The dependencies are successfully installed on my mac, the tests are built, run and I can generate the documentation with doxygen.

Problem 1: dependencies conflict between OS

Even if I like running things locally for testing, I also happen to use Github workflows that run on Ubuntu 22.04. In this case, the previous commands fail, and so I had to tweak the dependencies versions in my conan/conanfile.py, where I ended up with these lines:

    # zlib overriden because conflict on ubuntu 22.04 (gh-actions)
    #requires = "boost/1.80.0", "gdal/3.5.2", "zlib/1.2.13"
    # on my Macos Monterey clang 13
    requires = "boost/[>1.75 <1.80]", "gdal/[>=3.4.0]"

How to do that properly with Conan?

Problem 2: Creating the package fails

I would like to make the package available on Artifactory. I would like the packaging method to build and run the unit tests. So I tried to run conan create ./conan demo/testing -pr:b=conan/profiles/clang_13 -pr:h=conan/profiles/clang_13. It fails with the following error:

quetzal-CoaTL/0.1@demo/testing: Generator 'CMakeDeps' calling 'generate()'
quetzal-CoaTL/0.1@demo/testing: Calling generate()
quetzal-CoaTL/0.1@demo/testing: Aggregating env generators
quetzal-CoaTL/0.1@demo/testing: Calling build()
CMake Error: The source directory "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
quetzal-CoaTL/0.1@demo/testing: 
quetzal-CoaTL/0.1@demo/testing: ERROR: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' build failed
quetzal-CoaTL/0.1@demo/testing: WARN: Build folder /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
ERROR: quetzal-CoaTL/0.1@demo/testing: Error in build() method, line 33
    cmake.configure()
    ConanException: Error 1 while executing cd '/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="apple-clang" -DCONAN_COMPILER_VERSION="13" -DCONAN_LIBCXX="libc++" -DCMAKE_INSTALL_PREFIX="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_PREFIX_PATH="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_MODULE_PATH="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source'

I tried to modify the generate and the build functions, but without success: I do not understand what causes this behavior. Any idea?

Here is my conanfile.py:

from conans import ConanFile, CMake
from conan.tools.cmake import CMakeDeps

class QuetzalCoaTLConan(ConanFile):
    name = "quetzal-CoaTL"
    url = "https://github.com/Quetzal-framework/quetzal-CoaTL"
    license = "GPLv3"
    description = "Quetzal Coalescence Template Library"
    version = "0.1"
    settings = "os", "compiler", "arch", "build_type"
    exports_sources = "include/*", "CMakeLists.txt", "test/*", "cmake/*", "docs/*"
    no_copy_source = True
    generators = "cmake", "CMakeToolchain", "CMakeDeps"
    # zlib overriden because conflict on ubuntu 22.04 (gh-actions)
    #requires = "boost/1.80.0", "gdal/3.5.2", "zlib/1.2.13"
    # on Macos Monterey clang 13
    requires = "boost/[>1.75 <1.80]", "gdal/[>=3.4.0]"

    # by default, the config files (xxx-config.cmake) files are not generated: see generate()
    tool_requires = "cmake/3.22.0", "doxygen/1.9.2"

    # run after the installation of the dependency graph, but before build() method
    def generate(self):
        # generate one xxxx-config.cmake file per dependency
        cmake = CMakeDeps(self)
        # generate the config files for the tool require
        cmake.build_context_activated = ["cmake/3.22.0", "doxygen/1.9.2"]
        cmake.generate()

    # this is not building a library, just tests
    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()
        # run CTest, launch binaries, etc
        cmake.test(output_on_failure=True)

    def package(self):
        self.copy("*.h")

    def package_id(self):
        self.info.clear()

Thanks!

memsharded commented 1 year ago

Hi @Becheler

It seems you are mixing the new generators like CMakeDeps with the legacy CMake wrapper from conans import CMake. You should be using the new wrapper too: from conan.tools.cmake import CMake. Please have a look at: https://docs.conan.io/en/latest/reference/conanfile/tools.html. Also do not use the cmake generator together with the new one, you should use the CMakeToolchain one instead.

conan/conanfile.txt,

You meant conanfile.py here, didn't you?

cmake.build_context_activated = ["cmake/3.22.0", "doxygen/1.9.2"]

Not necessary, not even recommended to activate cmake/3.22.0. That means it will generate a cmake-config.cmake to locate cmake executable, but at this point, you will be running cmake already, so not useful.

Please try those changes and let us know.

Becheler commented 1 year ago

Thank you @memsharded ! :) I (tried to) follow your advise and came up with this conanfile.py:

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps

class QuetzalCoaTLConan(ConanFile):
    name = "quetzal-CoaTL"
    url = "https://github.com/Quetzal-framework/quetzal-CoaTL"
    license = "GPLv3"
    description = "Quetzal Coalescence Template Library"
    version = "0.1"
    settings = "os", "compiler", "arch", "build_type"
    exports_sources = "include/*", "CMakeLists.txt", "test/*", "cmake/*", "docs/*"
    no_copy_source = True
    generators = "CMakeToolchain", "CMakeDeps"
    # zlib overriden because conflict on ubuntu 22.04 (gh-actions)
    #requires = "boost/1.80.0", "gdal/3.5.2", "zlib/1.2.13"
    # on Macos Monterey clang 13
    requires = "boost/[>1.75 <1.80]", "gdal/[>=3.4.0]"

    # by default, the config files (xxx-config.cmake) files are not generated: see generate()
    tool_requires = "doxygen/1.9.2"

    # run after the installation of the dependency graph, but before build() method
    def generate(self):
        # generate the config files for the tool require
        deps = CMakeDeps(self)
        deps.build_context_activated = ["doxygen/1.9.2"]
        deps.generate()
        # generate toolchain files for -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
        toolchain = CMakeToolchain(self)
        toolchain.generate()

    def package(self):
        self.copy("*.h")

    def package_id(self):
        self.info.clear()

Is it how it is supposed to be defined? As I am reproducing the documentation example about how too package a header-only library with unit tests (see https://docs.conan.io/en/latest/howtos/header_only.html) I could not find how to properly redefine these lines:

    def build(self):
        cmake = CMake(self)
        cmake.configure()
        cmake.build()
        cmake.test(output_on_failure=True)

I wonder if this is why the include files are not found in the conan create call.

memsharded commented 1 year ago

I wonder if this is why the include files are not found in the conan create call.

It could be that the self.copy("*.h") is not copying correctly the headers. You can paste here the output, it should have some messages summarizing what has been copied. It is also possible to inspect the final package folders, if you read the output and go to your disk package folder, you should be able to package the navigated files.

In any case, it is also recommended to modernize that self.copy() to copy(self, ... which will be more explicit, requiring to define src folder (typically something from self.build_folder) and dst folder (typically something with self.package_folder).

Please check that regarding the final packaged artifacts and let us know.

Regarding the build() method, the only thing that has changed is the .test(). You can import from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, and use all the same, except cmake.test(), because output_on_failure=True has been removed (you can control it externally with an env-var CTEST_OUTPUT_ON_FAILURE in your profile, for example in [buildenv] section)

Becheler commented 1 year ago

Yes, I inspected the location but nothing was there. Here is the output:

quetzal-CoaTL/0.1@demo/testing: Applying build-requirement: doxygen/1.9.2
quetzal-CoaTL/0.1@demo/testing: Applying build-requirement: xapian-core/1.4.19
quetzal-CoaTL/0.1@demo/testing: Applying build-requirement: zlib/1.2.12
quetzal-CoaTL/0.1@demo/testing: Applying build-requirement: libuuid/1.0.3
quetzal-CoaTL/0.1@demo/testing: WARN: Build folder is dirty, removing it: /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@demo/testing: Configuring sources in /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source
quetzal-CoaTL/0.1@demo/testing: Building your package in /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@demo/testing: Generator 'CMakeDeps' calling 'generate()'
quetzal-CoaTL/0.1@demo/testing: Generator 'CMakeToolchain' calling 'generate()'
quetzal-CoaTL/0.1@demo/testing: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release'
quetzal-CoaTL/0.1@demo/testing: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
quetzal-CoaTL/0.1@demo/testing: Calling generate()
quetzal-CoaTL/0.1@demo/testing: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release'
quetzal-CoaTL/0.1@demo/testing: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
quetzal-CoaTL/0.1@demo/testing: Aggregating env generators
quetzal-CoaTL/0.1@demo/testing: Calling build()
quetzal-CoaTL/0.1@demo/testing: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source"
CMake Warning:
  Ignoring extra path from command line:

   "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source"

CMake Error: The source directory "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
quetzal-CoaTL/0.1@demo/testing: 
quetzal-CoaTL/0.1@demo/testing: ERROR: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' build failed
quetzal-CoaTL/0.1@demo/testing: WARN: Build folder /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
ERROR: quetzal-CoaTL/0.1@demo/testing: Error in build() method, line 35
    cmake.configure()
    ConanException: Error 1 while executing cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source"

I am not sure to understand the modernization of the example code, that is what you meant by:

In any case, it is also recommended to modernize that self.copy() to copy(self, ... which will be more explicit, requiring to define src folder (typically something from self.build_folder) and dst folder (typically something with self.package_folder).

What I got is:

    def package(self):
        copy(self, "*.h")

How/why should I insert the src and dst folder? Again, thanks for your help :)

memsharded commented 1 year ago

well, yes, in this output, as the build() fails, it is expected that no package will be created, that only make sense to inspect if the process gets to the package() and it outputs that it is packaging the artifacts.

For the copy(), the docs are in https://docs.conan.io/en/latest/reference/conanfile/tools/files/basic.html#conan-tools-files-copy, you might want to do something like:

copy(self, "*.h", src=self.source_folder, dst=self.package_folder)

But that should take into account the relative layout, as the headers seems to be in the include subfolder, you can make sure that no other temporary or test header is packages, using something like this:

copy(self, "*.h", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")

Also, if your library is template heavy with .hxx files or the like, you might want to use *.h* as pattern.

But the first step is to get the build passing. I'd recommend to do step by step, one thing at a time:

Regarging your failure, don't you have the CMakeLists.txt inside /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/demo/testing/source?

Which CMake version, just in case?

Becheler commented 1 year ago

Hi again 👻

cmake --version
cmake version 3.24.2

I had a problem of a conanfile.py not being located at the root folder 😮‍💨 The following conanfile.py in the root folder works:

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake
from conan.tools.files import copy
import os

class QuetzalCoaTLConan(ConanFile):

    name              = "quetzal-CoaTL"
    url                   = "https://github.com/Quetzal-framework/quetzal-CoaTL"
    license            = "GPLv3"
    description     = "Coalescence library for C++"
    version            = "0.1"

    settings        = "os", "compiler", "arch", "build_type"
    exports_sources = "include/*", "CMakeLists.txt", "test/*", "cmake/*", "docs/*"
    no_copy_source  = True

    requires        = "boost/[>1.75 <1.80]", "gdal/[>=3.4.0]"     # on Macos Monterey clang 13
    #requires       = "boost/1.80.0", "gdal/3.5.2", "zlib/1.2.13" # on Ubuntu 22.04 for gh-actions

    # def generate(self):
    #     tc = CMakeToolchain(self)
    #     tc.generate()
    #     deps = CMakeDeps(self)
    #     deps.generate()
    #
    # def build(self): # this is not building a library, just tests
    #     cmake = CMake(self)
    #     cmake.configure()
    #     cmake.build()
    #     cmake.test()

    def package(self):
        copy(self, "*.h*",
            src=os.path.join(self.source_folder, "include"),
            dst=os.path.join(self.package_folder, "include"))

    def package_id(self):
        self.info.clear()

the command conan create . test/demo -pr:b=conan/profiles/clang_13 --test-folder=conan/test_package generate the following output:

(base) arnaudbecheler@arnauds-MacBook-Pro quetzal-CoaTL % conan create . test/demo -pr:b=conan/profiles/clang_13 --test-folder=conan/test_package
Exporting package recipe
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 77 '.h' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 3 '.txt' files: CMakeLists.txt, CMakeLists.txt, CMakeLists.txt
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 22 '.cpp' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.csv' file: standard_format_data.csv
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 3 '.tif' files: bio12.tif, bio1.tif, europe_temp.tif
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.in' file: quetzalConfig.cmake.in
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 14 '.md' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 7 '.png' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 2 '.html' files: header.html, header.html
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 5 '.css' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 4 files: LICENSE, .gitignore, .git, Doxyfile
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 4 '.js' files: doxygen-awesome-paragraph-link.js, doxygen-awesome-fragment-copy-button.js, doxygen-awesome-darkmode-toggle.js, toggle-alternative-theme.js
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 2 '.svg' files: logo.drawio.svg, theme-variants.drawio.svg
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 2 '.hpp' files: example.hpp, subclass-example.hpp
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.gif' file: fancy_scrollbars_webkit.gif
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.yaml' file: publish.yaml
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 3 '.pdf' files: SFS.pdf, bioxx.pdf, Wright-FIsher-Model.pdf
quetzal-CoaTL/0.1@test/demo: A new conanfile.py version was exported
quetzal-CoaTL/0.1@test/demo: Folder: /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/export
quetzal-CoaTL/0.1@test/demo: Using the exported files summary hash as the recipe revision: 450b6960281c31d689d394653c3fc61d 
quetzal-CoaTL/0.1@test/demo: Package recipe modified in export, forcing source folder removal
quetzal-CoaTL/0.1@test/demo: Use the --keep-source, -k option to skip it
quetzal-CoaTL/0.1@test/demo: Exported revision: 450b6960281c31d689d394653c3fc61d
Configuration (profile_host):
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

Configuration (profile_build):
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

WARN: libgeotiff/1.7.1: requirement libtiff/4.3.0 overridden by gdal/3.5.2 to libtiff/4.4.0 
WARN: libgeotiff/1.7.1: requirement proj/9.0.0 overridden by gdal/3.5.2 to proj/9.0.1 
WARN: proj/9.0.1: requirement sqlite3/3.38.5 overridden by libgeotiff/1.7.1 to sqlite3/3.39.3 
WARN: proj/9.0.1: requirement libtiff/4.3.0 overridden by libgeotiff/1.7.1 to libtiff/4.4.0 
bzip2/1.0.8: Main binary package '04a1cd7b8d0e23ed1028e44c0af8793aa780b953' missing. Using compatible package '2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589'
geos/3.11.0: Main binary package '373090b96925f0f60e662d96de23000d876d7e38' missing. Using compatible package '9e5342f7b11cdab33324fa4390b0c74b50a7c5d5'
jbig/20160605: Main binary package '38021ecd3e7633d3dc1e3f732ef8299e7f7606df' missing. Using compatible package '333106d89ea0e397b8d07f777351d990d7294cff'
json-c/0.16: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libbacktrace/cci.20210118: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libdeflate/1.12: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libiconv/1.17: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libjpeg/9e: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libwebp/1.2.4: Main binary package 'cdf22c69b4ded939d355e28636ef16da8ef357b4' missing. Using compatible package '308c5571a05200415fe5c9c6f8646dc038e978cd'
sqlite3/3.39.3: Main binary package '5f40ac879d737941a8c80d13bf97466b42125917' missing. Using compatible package '509c6f4636dec8645bfd459c6049cbef21b8ce1b'
xz_utils/5.2.5: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
zlib/1.2.12: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
zstd/1.5.2: Main binary package '730f6fa15d7dd036e45ab9c2ddeba72c3a5b2670' missing. Using compatible package '29c13c3349c6850cc905f19384cd71df20f5ae02'
libcurl/7.83.1: Main binary package '4f40e4271c7f6988192052975167d0eba3c0a96b' missing. Using compatible package 'fa13ebc657c10d1702cc94ab9750b4b5b89fe4ea'
libpng/1.6.38: Main binary package 'af1408c69c1f5972dca0d739d6d30022056a98d8' missing. Using compatible package 'd3500a8154832cbdef2b3c64b5ea936fb3db8fae'
libtiff/4.4.0: Main binary package '05fb554635bf2c7c73c59dd35e18d8edbfcb08b2' missing. Using compatible package 'ac75da022c290e07d960efdc8ca30d23b2ac84bc'
quetzal-CoaTL/0.1@test/demo: Forced build from source
Version ranges solved
    Version range '>1.75 <1.80' required by 'quetzal-CoaTL/0.1@test/demo' resolved to 'boost/1.79.0' in local cache
    Version range '>=3.4.0' required by 'quetzal-CoaTL/0.1@test/demo' resolved to 'gdal/3.5.2' in local cache

quetzal-CoaTL/0.1@test/demo (test package): Installing package
Requirements
    boost/1.79.0 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    gdal/3.5.2 from 'conancenter' - Cache
    geos/3.11.0 from 'conancenter' - Cache
    giflib/5.2.1 from 'conancenter' - Cache
    jbig/20160605 from 'conancenter' - Cache
    json-c/0.16 from 'conancenter' - Cache
    libbacktrace/cci.20210118 from 'conancenter' - Cache
    libcurl/7.83.1 from 'conancenter' - Cache
    libdeflate/1.12 from 'conancenter' - Cache
    libgeotiff/1.7.1 from 'conancenter' - Cache
    libiconv/1.17 from 'conancenter' - Cache
    libjpeg/9e from 'conancenter' - Cache
    libpng/1.6.38 from 'conancenter' - Cache
    libtiff/4.4.0 from 'conancenter' - Cache
    libwebp/1.2.4 from 'conancenter' - Cache
    nlohmann_json/3.10.5 from 'conancenter' - Cache
    proj/9.0.1 from 'conancenter' - Cache
    qhull/8.0.1 from 'conancenter' - Cache
    quetzal-CoaTL/0.1@test/demo from local cache - Cache
    sqlite3/3.39.3 from 'conancenter' - Cache
    xz_utils/5.2.5 from 'conancenter' - Cache
    zlib/1.2.12 from 'conancenter' - Cache
    zstd/1.5.2 from 'conancenter' - Cache
Packages
    boost/1.79.0:69549d56630ee45c5f4ae29091105007d38fa02c - Cache
    bzip2/1.0.8:2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589 - Cache
    gdal/3.5.2:874a3c39a3b11c696f2dbb67b4bf62b63d5069b4 - Cache
    geos/3.11.0:9e5342f7b11cdab33324fa4390b0c74b50a7c5d5 - Cache
    giflib/5.2.1:205c5c478b529f9916970283391f4bed149d6193 - Cache
    jbig/20160605:333106d89ea0e397b8d07f777351d990d7294cff - Cache
    json-c/0.16:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libbacktrace/cci.20210118:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libcurl/7.83.1:fa13ebc657c10d1702cc94ab9750b4b5b89fe4ea - Cache
    libdeflate/1.12:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libgeotiff/1.7.1:7e30964e48196cd81036a75ac0d3181c4a87a7ff - Cache
    libiconv/1.17:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libjpeg/9e:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libpng/1.6.38:d3500a8154832cbdef2b3c64b5ea936fb3db8fae - Cache
    libtiff/4.4.0:ac75da022c290e07d960efdc8ca30d23b2ac84bc - Cache
    libwebp/1.2.4:308c5571a05200415fe5c9c6f8646dc038e978cd - Cache
    nlohmann_json/3.10.5:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    proj/9.0.1:692004dec9d43aabd05c9eb2f030eaebf292fcd6 - Cache
    qhull/8.0.1:e98cc99c78f8ae352930d807a85fc7d6df891023 - Cache
    quetzal-CoaTL/0.1@test/demo:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Build
    sqlite3/3.39.3:509c6f4636dec8645bfd459c6049cbef21b8ce1b - Cache
    xz_utils/5.2.5:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    zlib/1.2.12:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    zstd/1.5.2:29c13c3349c6850cc905f19384cd71df20f5ae02 - Cache

Installing (downloading, building) binaries...
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/bzip2/1.0.8/_/_/package/2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589/bin
geos/3.11.0: Already installed!
geos/3.11.0: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/geos/3.11.0/_/_/package/9e5342f7b11cdab33324fa4390b0c74b50a7c5d5/bin
giflib/5.2.1: Already installed!
giflib/5.2.1: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/giflib/5.2.1/_/_/package/205c5c478b529f9916970283391f4bed149d6193/bin
jbig/20160605: Already installed!
jbig/20160605: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/jbig/20160605/_/_/package/333106d89ea0e397b8d07f777351d990d7294cff/bin
json-c/0.16: Already installed!
libbacktrace/cci.20210118: Already installed!
libdeflate/1.12: Already installed!
libiconv/1.17: Already installed!
libiconv/1.17: Appending PATH environment var: /Users/arnaudbecheler/.conan/data/libiconv/1.17/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/bin
libjpeg/9e: Already installed!
libwebp/1.2.4: Already installed!
nlohmann_json/3.10.5: Already installed!
qhull/8.0.1: Already installed!
qhull/8.0.1: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/qhull/8.0.1/_/_/package/e98cc99c78f8ae352930d807a85fc7d6df891023/bin
sqlite3/3.39.3: Already installed!
sqlite3/3.39.3: Appending PATH env var with : /Users/arnaudbecheler/.conan/data/sqlite3/3.39.3/_/_/package/509c6f4636dec8645bfd459c6049cbef21b8ce1b/bin
xz_utils/5.2.5: Already installed!
zlib/1.2.12: Already installed!
zstd/1.5.2: Already installed!
boost/1.79.0: Already installed!
libcurl/7.83.1: Already installed!
libpng/1.6.38: Already installed!
libtiff/4.4.0: Already installed!
proj/9.0.1: Already installed!
proj/9.0.1: Prepending to PROJ_LIB environment variable: /Users/arnaudbecheler/.conan/data/proj/9.0.1/_/_/package/692004dec9d43aabd05c9eb2f030eaebf292fcd6/res
proj/9.0.1: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/proj/9.0.1/_/_/package/692004dec9d43aabd05c9eb2f030eaebf292fcd6/bin
libgeotiff/1.7.1: Already installed!
gdal/3.5.2: Already installed!
gdal/3.5.2: Prepending to GDAL_DATA environment variable: /Users/arnaudbecheler/.conan/data/gdal/3.5.2/_/_/package/874a3c39a3b11c696f2dbb67b4bf62b63d5069b4/res/gdal
quetzal-CoaTL/0.1@test/demo: WARN: Build folder is dirty, removing it: /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@test/demo: Configuring sources in /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/source
quetzal-CoaTL/0.1@test/demo: Building your package in /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@test/demo: Generator txt created conanbuildinfo.txt
quetzal-CoaTL/0.1@test/demo: Aggregating env generators
quetzal-CoaTL/0.1@test/demo: Calling build()
quetzal-CoaTL/0.1@test/demo: WARN: This conanfile has no build step
quetzal-CoaTL/0.1@test/demo: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' built
quetzal-CoaTL/0.1@test/demo: Build folder /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@test/demo: Generated conaninfo.txt
quetzal-CoaTL/0.1@test/demo: Generated conanbuildinfo.txt
quetzal-CoaTL/0.1@test/demo: Generating the package
quetzal-CoaTL/0.1@test/demo: Package folder /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@test/demo: Calling package()
quetzal-CoaTL/0.1@test/demo: Copied 77 '.h' files
quetzal-CoaTL/0.1@test/demo package(): Packaged 77 '.h' files
quetzal-CoaTL/0.1@test/demo: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' created
quetzal-CoaTL/0.1@test/demo: Created package revision 43f4705802a64661f4ac385e1093d89d
quetzal-CoaTL/0.1@test/demo (test package): Generator txt created conanbuildinfo.txt
quetzal-CoaTL/0.1@test/demo (test package): Generator cmake created conanbuildinfo.cmake
quetzal-CoaTL/0.1@test/demo (test package): Aggregating env generators
quetzal-CoaTL/0.1@test/demo (test package): Generated conaninfo.txt
quetzal-CoaTL/0.1@test/demo (test package): Generated graphinfo
Using lockfile: '/Users/arnaudbecheler/dev/research/Quetzal-framework/quetzal-CoaTL/conan/test_package/build/b082d55f7b94d2207a86e2dcec4e176c51e78a3a/conan.lock'
Using cached profile from lockfile
quetzal-CoaTL/0.1@test/demo (test package): Calling build()
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: Adjusting output directories
-- Conan: Using cmake targets configuration
-- Library boost_contract found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_contract.a
-- Library boost_coroutine found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_coroutine.a
-- Library boost_context found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_context.a
-- Library boost_iostreams found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_iostreams.a
-- Library boost_locale found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_locale.a
-- Library boost_log_setup found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_log_setup.a
-- Library boost_log found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_log.a
-- Library boost_filesystem found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_filesystem.a
-- Library boost_program_options found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_program_options.a
-- Library boost_random found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_random.a
-- Library boost_regex found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_regex.a
-- Library boost_stacktrace_addr2line found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_stacktrace_addr2line.a
-- Library boost_stacktrace_backtrace found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_stacktrace_backtrace.a
-- Library boost_stacktrace_basic found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_stacktrace_basic.a
-- Library boost_stacktrace_noop found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_stacktrace_noop.a
-- Library boost_timer found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_timer.a
-- Library boost_type_erasure found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_type_erasure.a
-- Library boost_thread found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_thread.a
-- Library boost_atomic found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_atomic.a
-- Library boost_chrono found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_chrono.a
-- Library boost_container found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_container.a
-- Library boost_date_time found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_date_time.a
-- Library boost_unit_test_framework found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_unit_test_framework.a
-- Library boost_prg_exec_monitor found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_prg_exec_monitor.a
-- Library boost_test_exec_monitor found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_test_exec_monitor.a
-- Library boost_exception found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_exception.a
-- Library boost_wserialization found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_wserialization.a
-- Library boost_serialization found /Users/arnaudbecheler/.conan/data/boost/1.79.0/_/_/package/69549d56630ee45c5f4ae29091105007d38fa02c/lib/libboost_serialization.a
-- Library gdal found /Users/arnaudbecheler/.conan/data/gdal/3.5.2/_/_/package/874a3c39a3b11c696f2dbb67b4bf62b63d5069b4/lib/libgdal.a
-- Library bz2 found /Users/arnaudbecheler/.conan/data/bzip2/1.0.8/_/_/package/2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589/lib/libbz2.a
-- Library backtrace found /Users/arnaudbecheler/.conan/data/libbacktrace/cci.20210118/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libbacktrace.a
-- Library iconv found /Users/arnaudbecheler/.conan/data/libiconv/1.17/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libiconv.a
-- Library charset found /Users/arnaudbecheler/.conan/data/libiconv/1.17/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libcharset.a
-- Library json-c found /Users/arnaudbecheler/.conan/data/json-c/0.16/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libjson-c.a
-- Library geotiff found /Users/arnaudbecheler/.conan/data/libgeotiff/1.7.1/_/_/package/7e30964e48196cd81036a75ac0d3181c4a87a7ff/lib/libgeotiff.a
-- Library geos_c found /Users/arnaudbecheler/.conan/data/geos/3.11.0/_/_/package/9e5342f7b11cdab33324fa4390b0c74b50a7c5d5/lib/libgeos_c.a
-- Library geos found /Users/arnaudbecheler/.conan/data/geos/3.11.0/_/_/package/9e5342f7b11cdab33324fa4390b0c74b50a7c5d5/lib/libgeos.a
-- Library gif found /Users/arnaudbecheler/.conan/data/giflib/5.2.1/_/_/package/205c5c478b529f9916970283391f4bed149d6193/lib/libgif.a
-- Library png found /Users/arnaudbecheler/.conan/data/libpng/1.6.38/_/_/package/d3500a8154832cbdef2b3c64b5ea936fb3db8fae/lib/libpng.a
-- Library qhullstatic_r found /Users/arnaudbecheler/.conan/data/qhull/8.0.1/_/_/package/e98cc99c78f8ae352930d807a85fc7d6df891023/lib/libqhullstatic_r.a
-- Library proj found /Users/arnaudbecheler/.conan/data/proj/9.0.1/_/_/package/692004dec9d43aabd05c9eb2f030eaebf292fcd6/lib/libproj.a
-- Library tiffxx found /Users/arnaudbecheler/.conan/data/libtiff/4.4.0/_/_/package/ac75da022c290e07d960efdc8ca30d23b2ac84bc/lib/libtiffxx.a
-- Library tiff found /Users/arnaudbecheler/.conan/data/libtiff/4.4.0/_/_/package/ac75da022c290e07d960efdc8ca30d23b2ac84bc/lib/libtiff.a
-- Library sqlite3 found /Users/arnaudbecheler/.conan/data/sqlite3/3.39.3/_/_/package/509c6f4636dec8645bfd459c6049cbef21b8ce1b/lib/libsqlite3.a
-- Library curl found /Users/arnaudbecheler/.conan/data/libcurl/7.83.1/_/_/package/fa13ebc657c10d1702cc94ab9750b4b5b89fe4ea/lib/libcurl.a
-- Library z found /Users/arnaudbecheler/.conan/data/zlib/1.2.12/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libz.a
-- Library deflate found /Users/arnaudbecheler/.conan/data/libdeflate/1.12/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libdeflate.a
-- Library lzma found /Users/arnaudbecheler/.conan/data/xz_utils/5.2.5/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/liblzma.a
-- Library jpeg found /Users/arnaudbecheler/.conan/data/libjpeg/9e/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/lib/libjpeg.a
-- Library jbig found /Users/arnaudbecheler/.conan/data/jbig/20160605/_/_/package/333106d89ea0e397b8d07f777351d990d7294cff/lib/libjbig.a
-- Library zstd found /Users/arnaudbecheler/.conan/data/zstd/1.5.2/_/_/package/29c13c3349c6850cc905f19384cd71df20f5ae02/lib/libzstd.a
-- Library webpdecoder found /Users/arnaudbecheler/.conan/data/libwebp/1.2.4/_/_/package/308c5571a05200415fe5c9c6f8646dc038e978cd/lib/libwebpdecoder.a
-- Library webpdemux found /Users/arnaudbecheler/.conan/data/libwebp/1.2.4/_/_/package/308c5571a05200415fe5c9c6f8646dc038e978cd/lib/libwebpdemux.a
-- Library webpmux found /Users/arnaudbecheler/.conan/data/libwebp/1.2.4/_/_/package/308c5571a05200415fe5c9c6f8646dc038e978cd/lib/libwebpmux.a
-- Library webp found /Users/arnaudbecheler/.conan/data/libwebp/1.2.4/_/_/package/308c5571a05200415fe5c9c6f8646dc038e978cd/lib/libwebp.a
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: C++ stdlib: libc++
-- 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

-- Build files have been written to: /Users/arnaudbecheler/dev/research/Quetzal-framework/quetzal-CoaTL/conan/test_package/build/b082d55f7b94d2207a86e2dcec4e176c51e78a3a
[ 50%] Building CXX object CMakeFiles/unit-test.dir/main.cpp.o
[100%] Linking CXX executable bin/unit-test
[100%] Built target unit-test
quetzal-CoaTL/0.1@test/demo (test package): Running test()

However, uncommenting the generate and build methods lead to:

(base) arnaudbecheler@arnauds-MacBook-Pro quetzal-CoaTL % conan create . test/demo -pr:b=conan/profiles/clang_13 --test-folder=conan/test_package
Exporting package recipe
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 77 '.h' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 3 '.txt' files: CMakeLists.txt, CMakeLists.txt, CMakeLists.txt
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 22 '.cpp' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.csv' file: standard_format_data.csv
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 3 '.tif' files: bio12.tif, bio1.tif, europe_temp.tif
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.in' file: quetzalConfig.cmake.in
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 14 '.md' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 7 '.png' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 2 '.html' files: header.html, header.html
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 5 '.css' files
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 4 files: LICENSE, .gitignore, .git, Doxyfile
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 4 '.js' files: doxygen-awesome-paragraph-link.js, doxygen-awesome-fragment-copy-button.js, doxygen-awesome-darkmode-toggle.js, toggle-alternative-theme.js
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 2 '.svg' files: logo.drawio.svg, theme-variants.drawio.svg
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 2 '.hpp' files: example.hpp, subclass-example.hpp
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.gif' file: fancy_scrollbars_webkit.gif
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 1 '.yaml' file: publish.yaml
quetzal-CoaTL/0.1@test/demo exports_sources: Copied 3 '.pdf' files: SFS.pdf, bioxx.pdf, Wright-FIsher-Model.pdf
quetzal-CoaTL/0.1@test/demo: A new conanfile.py version was exported
quetzal-CoaTL/0.1@test/demo: Folder: /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/export
quetzal-CoaTL/0.1@test/demo: Using the exported files summary hash as the recipe revision: 2aa770f7db4b8b367fc2a502e194e975 
quetzal-CoaTL/0.1@test/demo: Package recipe modified in export, forcing source folder removal
quetzal-CoaTL/0.1@test/demo: Use the --keep-source, -k option to skip it
quetzal-CoaTL/0.1@test/demo: Removing the local binary packages from different recipe revisions
quetzal-CoaTL/0.1@test/demo: Exported revision: 2aa770f7db4b8b367fc2a502e194e975
Configuration (profile_host):
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

Configuration (profile_build):
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

WARN: libgeotiff/1.7.1: requirement libtiff/4.3.0 overridden by gdal/3.5.2 to libtiff/4.4.0 
WARN: libgeotiff/1.7.1: requirement proj/9.0.0 overridden by gdal/3.5.2 to proj/9.0.1 
WARN: proj/9.0.1: requirement sqlite3/3.38.5 overridden by libgeotiff/1.7.1 to sqlite3/3.39.3 
WARN: proj/9.0.1: requirement libtiff/4.3.0 overridden by libgeotiff/1.7.1 to libtiff/4.4.0 
bzip2/1.0.8: Main binary package '04a1cd7b8d0e23ed1028e44c0af8793aa780b953' missing. Using compatible package '2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589'
geos/3.11.0: Main binary package '373090b96925f0f60e662d96de23000d876d7e38' missing. Using compatible package '9e5342f7b11cdab33324fa4390b0c74b50a7c5d5'
jbig/20160605: Main binary package '38021ecd3e7633d3dc1e3f732ef8299e7f7606df' missing. Using compatible package '333106d89ea0e397b8d07f777351d990d7294cff'
json-c/0.16: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libbacktrace/cci.20210118: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libdeflate/1.12: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libiconv/1.17: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libjpeg/9e: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
libwebp/1.2.4: Main binary package 'cdf22c69b4ded939d355e28636ef16da8ef357b4' missing. Using compatible package '308c5571a05200415fe5c9c6f8646dc038e978cd'
sqlite3/3.39.3: Main binary package '5f40ac879d737941a8c80d13bf97466b42125917' missing. Using compatible package '509c6f4636dec8645bfd459c6049cbef21b8ce1b'
xz_utils/5.2.5: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
zlib/1.2.12: Main binary package 'e98cc99c78f8ae352930d807a85fc7d6df891023' missing. Using compatible package '095512ed878f14a09dd732e9f6868729dd437529'
zstd/1.5.2: Main binary package '730f6fa15d7dd036e45ab9c2ddeba72c3a5b2670' missing. Using compatible package '29c13c3349c6850cc905f19384cd71df20f5ae02'
libcurl/7.83.1: Main binary package '4f40e4271c7f6988192052975167d0eba3c0a96b' missing. Using compatible package 'fa13ebc657c10d1702cc94ab9750b4b5b89fe4ea'
libpng/1.6.38: Main binary package 'af1408c69c1f5972dca0d739d6d30022056a98d8' missing. Using compatible package 'd3500a8154832cbdef2b3c64b5ea936fb3db8fae'
libtiff/4.4.0: Main binary package '05fb554635bf2c7c73c59dd35e18d8edbfcb08b2' missing. Using compatible package 'ac75da022c290e07d960efdc8ca30d23b2ac84bc'
quetzal-CoaTL/0.1@test/demo: Forced build from source
Version ranges solved
    Version range '>1.75 <1.80' required by 'quetzal-CoaTL/0.1@test/demo' resolved to 'boost/1.79.0' in local cache
    Version range '>=3.4.0' required by 'quetzal-CoaTL/0.1@test/demo' resolved to 'gdal/3.5.2' in local cache

quetzal-CoaTL/0.1@test/demo (test package): Installing package
Requirements
    boost/1.79.0 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    gdal/3.5.2 from 'conancenter' - Cache
    geos/3.11.0 from 'conancenter' - Cache
    giflib/5.2.1 from 'conancenter' - Cache
    jbig/20160605 from 'conancenter' - Cache
    json-c/0.16 from 'conancenter' - Cache
    libbacktrace/cci.20210118 from 'conancenter' - Cache
    libcurl/7.83.1 from 'conancenter' - Cache
    libdeflate/1.12 from 'conancenter' - Cache
    libgeotiff/1.7.1 from 'conancenter' - Cache
    libiconv/1.17 from 'conancenter' - Cache
    libjpeg/9e from 'conancenter' - Cache
    libpng/1.6.38 from 'conancenter' - Cache
    libtiff/4.4.0 from 'conancenter' - Cache
    libwebp/1.2.4 from 'conancenter' - Cache
    nlohmann_json/3.10.5 from 'conancenter' - Cache
    proj/9.0.1 from 'conancenter' - Cache
    qhull/8.0.1 from 'conancenter' - Cache
    quetzal-CoaTL/0.1@test/demo from local cache - Cache
    sqlite3/3.39.3 from 'conancenter' - Cache
    xz_utils/5.2.5 from 'conancenter' - Cache
    zlib/1.2.12 from 'conancenter' - Cache
    zstd/1.5.2 from 'conancenter' - Cache
Packages
    boost/1.79.0:69549d56630ee45c5f4ae29091105007d38fa02c - Cache
    bzip2/1.0.8:2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589 - Cache
    gdal/3.5.2:874a3c39a3b11c696f2dbb67b4bf62b63d5069b4 - Cache
    geos/3.11.0:9e5342f7b11cdab33324fa4390b0c74b50a7c5d5 - Cache
    giflib/5.2.1:205c5c478b529f9916970283391f4bed149d6193 - Cache
    jbig/20160605:333106d89ea0e397b8d07f777351d990d7294cff - Cache
    json-c/0.16:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libbacktrace/cci.20210118:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libcurl/7.83.1:fa13ebc657c10d1702cc94ab9750b4b5b89fe4ea - Cache
    libdeflate/1.12:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libgeotiff/1.7.1:7e30964e48196cd81036a75ac0d3181c4a87a7ff - Cache
    libiconv/1.17:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libjpeg/9e:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    libpng/1.6.38:d3500a8154832cbdef2b3c64b5ea936fb3db8fae - Cache
    libtiff/4.4.0:ac75da022c290e07d960efdc8ca30d23b2ac84bc - Cache
    libwebp/1.2.4:308c5571a05200415fe5c9c6f8646dc038e978cd - Cache
    nlohmann_json/3.10.5:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    proj/9.0.1:692004dec9d43aabd05c9eb2f030eaebf292fcd6 - Cache
    qhull/8.0.1:e98cc99c78f8ae352930d807a85fc7d6df891023 - Cache
    quetzal-CoaTL/0.1@test/demo:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Build
    sqlite3/3.39.3:509c6f4636dec8645bfd459c6049cbef21b8ce1b - Cache
    xz_utils/5.2.5:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    zlib/1.2.12:095512ed878f14a09dd732e9f6868729dd437529 - Cache
    zstd/1.5.2:29c13c3349c6850cc905f19384cd71df20f5ae02 - Cache

Installing (downloading, building) binaries...
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/bzip2/1.0.8/_/_/package/2b8e4ed96946ad0a4cd2c6e1e01636aa2a421589/bin
geos/3.11.0: Already installed!
geos/3.11.0: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/geos/3.11.0/_/_/package/9e5342f7b11cdab33324fa4390b0c74b50a7c5d5/bin
giflib/5.2.1: Already installed!
giflib/5.2.1: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/giflib/5.2.1/_/_/package/205c5c478b529f9916970283391f4bed149d6193/bin
jbig/20160605: Already installed!
jbig/20160605: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/jbig/20160605/_/_/package/333106d89ea0e397b8d07f777351d990d7294cff/bin
json-c/0.16: Already installed!
libbacktrace/cci.20210118: Already installed!
libdeflate/1.12: Already installed!
libiconv/1.17: Already installed!
libiconv/1.17: Appending PATH environment var: /Users/arnaudbecheler/.conan/data/libiconv/1.17/_/_/package/095512ed878f14a09dd732e9f6868729dd437529/bin
libjpeg/9e: Already installed!
libwebp/1.2.4: Already installed!
nlohmann_json/3.10.5: Already installed!
qhull/8.0.1: Already installed!
qhull/8.0.1: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/qhull/8.0.1/_/_/package/e98cc99c78f8ae352930d807a85fc7d6df891023/bin
sqlite3/3.39.3: Already installed!
sqlite3/3.39.3: Appending PATH env var with : /Users/arnaudbecheler/.conan/data/sqlite3/3.39.3/_/_/package/509c6f4636dec8645bfd459c6049cbef21b8ce1b/bin
xz_utils/5.2.5: Already installed!
zlib/1.2.12: Already installed!
zstd/1.5.2: Already installed!
boost/1.79.0: Already installed!
libcurl/7.83.1: Already installed!
libpng/1.6.38: Already installed!
libtiff/4.4.0: Already installed!
proj/9.0.1: Already installed!
proj/9.0.1: Prepending to PROJ_LIB environment variable: /Users/arnaudbecheler/.conan/data/proj/9.0.1/_/_/package/692004dec9d43aabd05c9eb2f030eaebf292fcd6/res
proj/9.0.1: Appending PATH environment variable: /Users/arnaudbecheler/.conan/data/proj/9.0.1/_/_/package/692004dec9d43aabd05c9eb2f030eaebf292fcd6/bin
libgeotiff/1.7.1: Already installed!
gdal/3.5.2: Already installed!
gdal/3.5.2: Prepending to GDAL_DATA environment variable: /Users/arnaudbecheler/.conan/data/gdal/3.5.2/_/_/package/874a3c39a3b11c696f2dbb67b4bf62b63d5069b4/res/gdal
quetzal-CoaTL/0.1@test/demo: Configuring sources in /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/source
quetzal-CoaTL/0.1@test/demo: Building your package in /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
quetzal-CoaTL/0.1@test/demo: Generator txt created conanbuildinfo.txt
quetzal-CoaTL/0.1@test/demo: Calling generate()
quetzal-CoaTL/0.1@test/demo: Preset 'release' added to CMakePresets.json. Invoke it manually using 'cmake --preset release'
quetzal-CoaTL/0.1@test/demo: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
quetzal-CoaTL/0.1@test/demo: Aggregating env generators
quetzal-CoaTL/0.1@test/demo: Calling build()
quetzal-CoaTL/0.1@test/demo: CMake command: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/source"
-- Using Conan toolchain: /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:35 (include):
  include could not find requested file:

    /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conanbuildinfo.cmake

CMake Error at CMakeLists.txt:36 (conan_basic_setup):
  Unknown CMake command "conan_basic_setup".

-- Configuring incomplete, errors occurred!
See also "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/CMakeFiles/CMakeOutput.log".
See also "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/CMakeFiles/CMakeError.log".
quetzal-CoaTL/0.1@test/demo: 
quetzal-CoaTL/0.1@test/demo: ERROR: Package '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9' build failed
quetzal-CoaTL/0.1@test/demo: WARN: Build folder /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
ERROR: quetzal-CoaTL/0.1@test/demo: Error in build() method, line 29
    cmake.configure()
    ConanException: Error 1 while executing cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/source"
memsharded commented 1 year ago

A few issues:

Becheler commented 1 year ago

Wonderful! The tests are successfully built! 💯 However they fail running 😓

quetzal-CoaTL/0.1@test/demo: CMake command: cmake --build "/Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9" '--target' 'test' '--' '-j10'
Running tests...
Test project /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
    Start  1: FuzzyPartition_test
Failed to change working directory to /Users/arnaudbecheler/.conan/data/quetzal-CoaTL/0.1/test/demo/build/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin : No such file or directory
 1/22 Test  #1: FuzzyPartition_test ..............***Not Run   0.00 sec

But the tests build and pass when I manually call (from the root folder)

cd build
cmake ..
cmake --build .
ctest

The test/CMakeList.txt snippet controlling tests is the following:

file(GLOB TEST_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} unit_test/*.cpp)
foreach(testSrc ${TEST_SRCS})
  # Extract the filename without an extension (NAME_WE)
  get_filename_component(testName ${testSrc} NAME_WE)
  # Add compile target
  add_executable(${testName} ${testSrc})
  # Link to targets and dependencies
  target_link_libraries(${testName} boost::boost GDAL::GDAL)
  # Specifies include directories to use when compiling the target
  target_include_directories(
    ${testName} PRIVATE
    $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>)
  # Add it to test execution
  add_test(
    NAME ${testName}
    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin ### <------ HERE !!!
    COMMAND ${testName} )
endforeach(testSrc)

Should I specify a working directory manually in the case of a Conan-run test? (To the risk of repeating myself: thanks again for your help 🙏🏽 🙏🏽 🙏🏽 )

Becheler commented 1 year ago

The problem seemed to be the structure of my repo. I ended up reproducing the https://github.com/mpusz/units repo structure, since they use conan, and in less than 30 minutes everything worked! 💯 😂