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

[question] conan2: unnecessary build requirements #15657

Closed
1 task done
Nekto89 opened this issue Feb 13, 2024 · 11 comments · Fixed by #15885
Closed
1 task done

[question] conan2: unnecessary build requirements #15657

Nekto89 opened this issue Feb 13, 2024 · 11 comments · Fixed by #15885
Assignees
Labels
Milestone

Comments

@Nekto89
Copy link
Contributor

Nekto89 commented Feb 13, 2024

What is your question?

Hi! I'm generating conanfile.py from CMake in the form of:

from conan import ConanFile
from conan.tools.files import copy

class MyApp(ConanFile):
    name = "app"
    version = "1.0"
    settings = "os", "arch", "compiler", "build_type"

    def requirements(self):
        self.requires("otherpackage1/1.0.0@user/channel#4268a55b9703444e15b9181c6ddaad21", force=True)
        self.requires("otherpackage2/1.0.0@user/channel#53da7d5ae28714ca964ce485e280e1ff", force=True)
        self.requires("otherpackageN/1.0.0@user/channel#9bae105f97adc3e4b0db9d8c6ad965b8", force=True)

    def generate(self):
        for dep in self.dependencies.values():
            if len(dep.cpp_info.bindirs):
                copy(self, "*.dll", dep.cpp_info.bindirs[0], r"C:/app/build_folder/Binaries/Debug")
            if len(dep.cpp_info.libdirs):
                copy(self, "*.dylib*", dep.cpp_info.libdirs[0], r"C:/app/build_folder/Binaries/Debug")
                copy(self, "*.so*", dep.cpp_info.libdirs[0], r"C:/app/build_folder/Binaries/Debug")

I've noticed that conan2 installs build requirements even when already built package has been downloaded from remote or is already present in local cache. Is there a way to not download build requirements in this case? I think that conan 1.X didn't have this behavior.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@Nekto89
Copy link
Contributor Author

Nekto89 commented Feb 13, 2024

in profile I have overriden default build requirement with my own version. Example:

[tool_requires]
openssl/*: nasm/2.15.05@user/channel, strawberryperl/5.32.1.1@user/channel

@Nekto89
Copy link
Contributor Author

Nekto89 commented Feb 13, 2024

for some reason this behavior is affected by "--build=missing"

conanfile.py

from conan import ConanFile
from conan.tools.files import copy

class MyApp(ConanFile):
    name = "app"
    version = "1.0"
    settings = "os", "arch", "compiler", "build_type"

    def requirements(self):
        self.requires("openssl/3.0.13", force=True)

    def generate(self):
        pass

profile:

include(default)
[settings]
build_type=Debug
[tool_requires]
openssl/*: strawberryperl/5.32.1.1#a5101163f340aa2625d3732965b60279
conan export --version 5.32.1.1 C:\dev\conan\conan-center-index\recipes\strawberryperl\all

======== Exporting recipe to the cache ========
strawberryperl/5.32.1.1: Exporting package recipe: C:\dev\conan\conan-center-index\recipes\strawberryperl\all\conanfile.py
strawberryperl/5.32.1.1: exports: File 'conandata.yml' found. Exporting it...
strawberryperl/5.32.1.1: Copied 1 '.yml' file: conandata.yml
strawberryperl/5.32.1.1: Copied 1 '.py' file: conanfile.py
strawberryperl/5.32.1.1: Exported to cache folder: C:\Users\Nekto\.conan2\p\straw13cd871146bcc\e
strawberryperl/5.32.1.1: Exported: strawberryperl/5.32.1.1#a5101163f340aa2625d3732965b60279 (2024-02-13 11:35:29 UTC)

without --build=missing

conan install -pr:h profile -pr:b default -of output conanfile.py

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=193
os=Windows
[tool_requires]
openssl/*: strawberryperl/5.32.1.1

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
Graph root
    conanfile.py (app/1.0): C:\dev\conan\test_openssl\conanfile.py
Requirements
    openssl/3.0.13#7f175a90f2e6b24d5b9ce6b952794ffb - Cache
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6 - Cache
Build requirements
    nasm/2.15.05#058c93b2214a49ca1cfe9f8f26205568 - Cache
    strawberryperl/5.32.1.1#a5101163f340aa2625d3732965b60279 - Cache
Resolved version ranges
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
strawberryperl/5.32.1.1: Compatible package ID 522dcea5982a3f8a5b624c16477e47195da2f84f equal to the default package ID: Skipping it.
strawberryperl/5.32.1.1: Compatible package ID 522dcea5982a3f8a5b624c16477e47195da2f84f equal to the default package ID: Skipping it.
Requirements
    openssl/3.0.13#7f175a90f2e6b24d5b9ce6b952794ffb:c83dc783b9e6b48d1b3324829b64de5ab5b6d210#003902f258911431304077908303b012 - Cache
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:ed44dacde2751b398e4bf9441ff992a70c913c00#01d5d0755b5aba65c6d536259c02ad96 - Cache
Build requirements
Skipped binaries
    nasm/2.15.05, strawberryperl/5.32.1.1

======== Installing packages ========
zlib/1.3.1: Already installed! (1 of 2)
openssl/3.0.13: Already installed! (2 of 2)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.names' used in: zlib/1.3.1, openssl/3.0.13
WARN: deprecated:     'cpp_info.build_modules' used in: openssl/3.0.13
WARN: deprecated:     'env_info' used in: openssl/3.0.13

======== Finalizing install (deploy, generators) ========
conanfile.py (app/1.0): Calling generate()
conanfile.py (app/1.0): Generators folder: C:\dev\conan\test_openssl\output
conanfile.py (app/1.0): Generating aggregated env files
conanfile.py (app/1.0): Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
Install finished successfully

with --build=missing

conan install -pr:h profile -pr:b default -of output --build=missing conanfile.py

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=193
os=Windows
[tool_requires]
openssl/*: strawberryperl/5.32.1.1

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
Graph root
    conanfile.py (app/1.0): C:\dev\conan\test_openssl\conanfile.py
Requirements
    openssl/3.0.13#7f175a90f2e6b24d5b9ce6b952794ffb - Cache
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6 - Cache
Build requirements
    nasm/2.15.05#058c93b2214a49ca1cfe9f8f26205568 - Cache
    strawberryperl/5.32.1.1#a5101163f340aa2625d3732965b60279 - Cache
Resolved version ranges
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
strawberryperl/5.32.1.1: Compatible package ID 522dcea5982a3f8a5b624c16477e47195da2f84f equal to the default package ID: Skipping it.
Requirements
    openssl/3.0.13#7f175a90f2e6b24d5b9ce6b952794ffb:c83dc783b9e6b48d1b3324829b64de5ab5b6d210#003902f258911431304077908303b012 - Cache
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:ed44dacde2751b398e4bf9441ff992a70c913c00#01d5d0755b5aba65c6d536259c02ad96 - Cache
Build requirements
    strawberryperl/5.32.1.1#a5101163f340aa2625d3732965b60279:522dcea5982a3f8a5b624c16477e47195da2f84f - Build
Skipped binaries
    nasm/2.15.05

======== Installing packages ========

-------- Installing package strawberryperl/5.32.1.1 (1 of 3) --------
strawberryperl/5.32.1.1: Building from source
strawberryperl/5.32.1.1: Package strawberryperl/5.32.1.1:522dcea5982a3f8a5b624c16477e47195da2f84f
strawberryperl/5.32.1.1: Copying sources to build folder
strawberryperl/5.32.1.1: Building your package in C:\Users\Nekto\.conan2\p\b\straw5dd687b5a1670\b
strawberryperl/5.32.1.1: Generating aggregated env files
strawberryperl/5.32.1.1: Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
strawberryperl/5.32.1.1: Calling build()
strawberryperl/5.32.1.1: Downloading 158.9MB strawberry-perl-5.32.1.1-64bit-portable.zip
strawberryperl/5.32.1.1: Downloaded 120.7MB 75% strawberry-perl-5.32.1.1-64bit-portable.zip
strawberryperl/5.32.1.1: Unzipping 545.5MB, this can take a while
Unzipping 100 %
strawberryperl/5.32.1.1: Package '522dcea5982a3f8a5b624c16477e47195da2f84f' built
strawberryperl/5.32.1.1: Build folder C:\Users\Nekto\.conan2\p\b\straw5dd687b5a1670\b\build
strawberryperl/5.32.1.1: Generating the package
strawberryperl/5.32.1.1: Packaging in folder C:\Users\Nekto\.conan2\p\b\straw5dd687b5a1670\p
strawberryperl/5.32.1.1: Calling package()
strawberryperl/5.32.1.1: package(): Packaged 97 '.bat' files
strawberryperl/5.32.1.1: package(): Packaged 1428 '.pl' files
strawberryperl/5.32.1.1: package(): Packaged 563 files
strawberryperl/5.32.1.1: package(): Packaged 180 '.dll' files
strawberryperl/5.32.1.1: package(): Packaged 7 '.exe' files
strawberryperl/5.32.1.1: package(): Packaged 4204 '.pm' files
strawberryperl/5.32.1.1: package(): Packaged 1379 '.pod' files
strawberryperl/5.32.1.1: package(): Packaged 1 '.xml' file: ppm.xml
strawberryperl/5.32.1.1: package(): Packaged 14 '.txt' files
strawberryperl/5.32.1.1: package(): Packaged 4 '.a' files: Check.a, Utils.a, Declare.a, libperl532.a
strawberryperl/5.32.1.1: package(): Packaged 10 '.ix' files
strawberryperl/5.32.1.1: package(): Packaged 82 '.al' files
strawberryperl/5.32.1.1: package(): Packaged 3 '.bs' files: Streamer.bs, Map.bs, Layers.bs
strawberryperl/5.32.1.1: package(): Packaged 135 '.h' files
strawberryperl/5.32.1.1: package(): Packaged 1 '.xst' file: Driver.xst
strawberryperl/5.32.1.1: package(): Packaged 2 '.json' files: alien.json, alien.json
strawberryperl/5.32.1.1: package(): Packaged 2 '.words' files: README.linux.words, README2.linux.words
strawberryperl/5.32.1.1: package(): Packaged 2 '.c' files: sqlite3.c, dlrun.c
strawberryperl/5.32.1.1: package(): Packaged 2 '.ld' files: extralibs.ld, extralibs.ld
strawberryperl/5.32.1.1: package(): Packaged 1 '.conf' file: minicpan.conf
strawberryperl/5.32.1.1: package(): Packaged 1 '.dd' file: distroprefs.dd
strawberryperl/5.32.1.1: package(): Packaged 1 '.yml' file: distroprefs.yml
strawberryperl/5.32.1.1: package(): Packaged 6 '.e2x' files
strawberryperl/5.32.1.1: package(): Packaged 1 '.SKIP' file: MANIFEST.SKIP
strawberryperl/5.32.1.1: package(): Packaged 3 '.po' files: first-domain.utf-8.po, log-report.utf-8.po, nl_NL.po
strawberryperl/5.32.1.1: package(): Packaged 1 '.types' file: media.types
strawberryperl/5.32.1.1: package(): Packaged 1 '.db' file: types.db
strawberryperl/5.32.1.1: package(): Packaged 2 '.sample' files: Defaults.pm.sample, Defaults.pm.sample
strawberryperl/5.32.1.1: package(): Packaged 1 '.crt' file: server.crt
strawberryperl/5.32.1.1: package(): Packaged 1 '.key' file: server.key
strawberryperl/5.32.1.1: package(): Packaged 1 '.ico' file: favicon.ico
strawberryperl/5.32.1.1: package(): Packaged 8 '.png' files
strawberryperl/5.32.1.1: package(): Packaged 4 '.css' files: mojo.css, bootstrap.css, fontawesome.css, highlight-mojo-dark.css
strawberryperl/5.32.1.1: package(): Packaged 4 '.js' files: bootstrap.js, highlight.min.js, mojolicious.min.js, jquery.js
strawberryperl/5.32.1.1: package(): Packaged 3 '.eot' files: fa-brands-400.eot, fa-regular-400.eot, fa-solid-900.eot
strawberryperl/5.32.1.1: package(): Packaged 3 '.svg' files: fa-brands-400.svg, fa-regular-400.svg, fa-solid-900.svg
strawberryperl/5.32.1.1: package(): Packaged 3 '.ttf' files: fa-brands-400.ttf, fa-regular-400.ttf, fa-solid-900.ttf
strawberryperl/5.32.1.1: package(): Packaged 3 '.woff' files: fa-brands-400.woff, fa-regular-400.woff, fa-solid-900.woff
strawberryperl/5.32.1.1: package(): Packaged 3 '.woff2' files: fa-brands-400.woff2, fa-regular-400.woff2, fa-solid-900.woff2
strawberryperl/5.32.1.1: package(): Packaged 3 '.ep' files: debug.html.ep, exception.html.ep, not_found.html.ep
strawberryperl/5.32.1.1: package(): Packaged 1 '.pem' file: cacert.pem
strawberryperl/5.32.1.1: package(): Packaged 1 '.cfg' file: libnet.cfg
strawberryperl/5.32.1.1: package(): Packaged 3 '.pc' files: GuiTest.pc, cFile.pc, cRegistry.pc
strawberryperl/5.32.1.1: package(): Packaged 22 '.enc' files
strawberryperl/5.32.1.1: package(): Packaged 1 '.msg' file: Japanese_Encodings.msg
strawberryperl/5.32.1.1: package(): Packaged 1 '.ini' file: ParserDetails.ini
strawberryperl/5.32.1.1: package(): Packaged 1 '.rtf' file: License.rtf
strawberryperl/5.32.1.1: Created package revision a365b3810f698e2f0a00fbeece022903
strawberryperl/5.32.1.1: Package '522dcea5982a3f8a5b624c16477e47195da2f84f' created
strawberryperl/5.32.1.1: Full package reference: strawberryperl/5.32.1.1#a5101163f340aa2625d3732965b60279:522dcea5982a3f8a5b624c16477e47195da2f84f#a365b3810f698e2f0a00fbeece022903
strawberryperl/5.32.1.1: Package folder C:\Users\Nekto\.conan2\p\b\straw5dd687b5a1670\p
zlib/1.3.1: Already installed! (2 of 3)
openssl/3.0.13: Already installed! (3 of 3)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.names' used in: zlib/1.3.1, openssl/3.0.13
WARN: deprecated:     'cpp_info.build_modules' used in: openssl/3.0.13
WARN: deprecated:     'env_info' used in: openssl/3.0.13

======== Finalizing install (deploy, generators) ========
conanfile.py (app/1.0): Calling generate()
conanfile.py (app/1.0): Generators folder: C:\dev\conan\test_openssl\output
conanfile.py (app/1.0): Generating aggregated env files
conanfile.py (app/1.0): Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
Install finished successfully

@memsharded memsharded self-assigned this Feb 13, 2024
@memsharded
Copy link
Member

I've noticed that conan2 installs build requirements even when already built package has been downloaded from remote or is already present in local cache.

Conan 2 doesn't install build_requirements it install only the recipes for the build-requires, but not the binaries if the binaries are not needed.
This is necessary for several reasons, including the computation of the package_id, that in Conan 2.0 can be affected by build_requires, and the creation, storage and usage of lockfile files, that need to be complete including build-requires or they can fail later because of the gaps.

Downloading the recipes is very fast, it shouldn't have any big impact on the performance.

The case for --build=missing is also expected. The binary for strawberryperl for the current configuration is missing, in the first case, the compatibility has managed to find a compatible binary, but the actual binary matching the configuration is missing, so if you provide --build=missing, then strawberryperl will be built from source.

def generate(self):

As a hint, Conan 2.0 has provided the deploy() method again, if you are deploying to system paths like C:..., probably a deploy() is better, as you have control whether you want to execute it or not.

@Nekto89
Copy link
Contributor Author

Nekto89 commented Feb 13, 2024

I've noticed that conan2 installs build requirements even when already built package has been downloaded from remote or is already present in local cache.

Conan 2 doesn't install build_requirements it install only the recipes for the build-requires, but not the binaries if the binaries are not needed. This is necessary for several reasons, including the computation of the package_id, that in Conan 2.0 can be affected by build_requires, and the creation, storage and usage of lockfile files, that need to be complete including build-requires or they can fail later because of the gaps.

Downloading the recipes is very fast, it shouldn't have any big impact on the performance.

The case for --build=missing is also expected. The binary for strawberryperl for the current configuration is missing, in the first case, the compatibility has managed to find a compatible binary, but the actual binary matching the configuration is missing, so if you provide --build=missing, then strawberryperl will be built from source.

def generate(self):

As a hint, Conan 2.0 has provided the deploy() method again, if you are deploying to system paths like C:..., probably a deploy() is better, as you have control whether you want to execute it or not.

So with --build=missing the only way to not build build_requirements is to upload them to remote? Even if I used them only once for building package that was uploaded to remote?

As for generate\deploy - this conanfile.py is generated on the fly multiple times during CMake generation with different sets of packages and I always deploy dlls so there is probably no difference.

@memsharded
Copy link
Member

So with --build=missing the only way to not build build_requirements is to upload them to remote? Even if I used them only once for building package that was uploaded to remote?

Yes, uploading the binaries used to build other packages to the server is a very good practice regarding reproducibility and traceability, not to say that it is very likely that it can be reused later, to build the next openssl version, that might have exactly the same build-requires, and it won't need to rebuild it again.

@Nekto89
Copy link
Contributor Author

Nekto89 commented Feb 13, 2024

So with --build=missing the only way to not build build_requirements is to upload them to remote? Even if I used them only once for building package that was uploaded to remote?

Yes, uploading the binaries used to build other packages to the server is a very good practice regarding reproducibility and traceability, not to say that it is very likely that it can be reused later, to build the next openssl version, that might have exactly the same build-requires, and it won't need to rebuild it again.

The strange thing is that I don't have binaries for b2/4.10.1 on my remote but with the same approach conan skips building b2 while successfully downloading binaries for boost.

@Nekto89
Copy link
Contributor Author

Nekto89 commented Feb 13, 2024

After looking at conan list "*/*:*#*"

build requirements that downloaded only recipe:

  • b2 - no binaries on remote
  • meson - no binaries on remote
  • nasm - remote contains binaries that were prepared by conan1. OS: Windows Architecture: x86_64 Build Type: Release Compiler: Any
  • ninja - same as nasm.
  • pkgconf - no binaries on remote

build requirements that downloaded recipe and were built from source:

  • cmake - remote contains binaries that were prepared by conan1. OS: Windows Architecture: x86_64 Build Type: Any Compiler: Any
  • msys2 - remote contains binaries that were prepared by conan1. OS: Windows Architecture: x86_64 Build Type: Any Compiler: Any
  • strawberryperl - remote contains binaries that were prepared by conan1. OS: Windows Architecture: x86_64 Build Type: Any Compiler: Any

Maybe build type in settings somehow affects this? Or package_type? Second list doesn't use any compiler information.

@Nekto89
Copy link
Contributor Author

Nekto89 commented Feb 13, 2024

just checked - if I do the same with nasm that is also used in openssl - nasm isn't being built
conanfile.py

from conan import ConanFile
from conan.tools.files import copy

class MyApp(ConanFile):
    name = "app"
    version = "1.0"
    settings = "os", "arch", "compiler", "build_type"

    def requirements(self):
        self.requires("openssl/3.0.13", force=True)

    def generate(self):
        pass

profile

include(default)
[settings]
build_type=Release
[tool_requires]
openssl/*: nasm/2.15.05@user/channel

conan remove -c "*"

conan export --version 2.15.05 --user user --channel channel C:\dev\conan\conan-center-index\recipes\nasm\all

======== Exporting recipe to the cache ========
nasm/2.15.05@user/channel: Exporting package recipe: C:\dev\conan\conan-center-index\recipes\nasm\all\conanfile.py
nasm/2.15.05@user/channel: exports: File 'conandata.yml' found. Exporting it...
nasm/2.15.05@user/channel: Calling export_sources()
nasm/2.15.05@user/channel: Copied 1 '.yml' file: conandata.yml
nasm/2.15.05@user/channel: Copied 1 '.py' file: conanfile.py
nasm/2.15.05@user/channel: Copied 1 '.patch' file: 2.15.05-0001-disable-newly-integrated-dependency-tracking.patch
nasm/2.15.05@user/channel: Exported to cache folder: C:\Users\Nekto\.conan2\p\nasm7a1c5bece99aa\e
nasm/2.15.05@user/channel: Exported: nasm/2.15.05@user/channel#53a041f093283fa430d442e20908c43d (2024-02-13 16:31:01 UTC)
conan install -pr:h profile -pr:b default -of output --build=missing conanfile.py

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows
[tool_requires]
openssl/*: nasm/2.15.05@user/channel

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows


======== Computing dependency graph ========
openssl/3.0.13: Not found in local cache, looking in remotes...
openssl/3.0.13: Checking remote: conancenter
openssl/3.0.13: Downloaded recipe revision 7f175a90f2e6b24d5b9ce6b952794ffb
zlib/1.3.1: Not found in local cache, looking in remotes...
zlib/1.3.1: Checking remote: conancenter
zlib/1.3.1: Downloaded recipe revision af8f2ef3d8e0fddf1975281d7fe43bf6
strawberryperl/5.32.1.1: Not found in local cache, looking in remotes...
strawberryperl/5.32.1.1: Checking remote: conancenter
strawberryperl/5.32.1.1: Downloaded recipe revision 8f83d05a60363a422f9033e52d106b47
Graph root
    conanfile.py (app/1.0): C:\dev\conan\test_openssl2\conanfile.py
Requirements
    openssl/3.0.13#7f175a90f2e6b24d5b9ce6b952794ffb - Downloaded (conancenter)
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6 - Downloaded (conancenter)
Build requirements
    nasm/2.15.05@user/channel#53a041f093283fa430d442e20908c43d - Cache
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Downloaded (conancenter)
Resolved version ranges
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
Requirements
    openssl/3.0.13#7f175a90f2e6b24d5b9ce6b952794ffb:7bf4a82e5cf616ada8790a5909e1c4aad873c3a1#8663c21809065c00fb435208044b7aed - Download (conancenter)
    zlib/1.3.1#af8f2ef3d8e0fddf1975281d7fe43bf6:7bfde258ff4f62f75668d0896dbddedaa7480a0f#6c7e76f69e587ea5ef21eef7e7596bb1 - Download (conancenter)
Build requirements
Skipped binaries
    nasm/2.15.05@user/channel, strawberryperl/5.32.1.1

======== Installing packages ========

-------- Downloading 2 packages --------
zlib/1.3.1: Retrieving package 7bfde258ff4f62f75668d0896dbddedaa7480a0f from remote 'conancenter'
zlib/1.3.1: Package installed 7bfde258ff4f62f75668d0896dbddedaa7480a0f
zlib/1.3.1: Downloaded package revision 6c7e76f69e587ea5ef21eef7e7596bb1
openssl/3.0.13: Retrieving package 7bf4a82e5cf616ada8790a5909e1c4aad873c3a1 from remote 'conancenter'
openssl/3.0.13: Downloading 17.5MB conan_package.tgz
openssl/3.0.13: Decompressing 17.5MB conan_package.tgz
openssl/3.0.13: Package installed 7bf4a82e5cf616ada8790a5909e1c4aad873c3a1
openssl/3.0.13: Downloaded package revision 8663c21809065c00fb435208044b7aed
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.names' used in: openssl/3.0.13, zlib/1.3.1
WARN: deprecated:     'cpp_info.build_modules' used in: openssl/3.0.13
WARN: deprecated:     'env_info' used in: openssl/3.0.13

======== Finalizing install (deploy, generators) ========
conanfile.py (app/1.0): Calling generate()
conanfile.py (app/1.0): Generators folder: C:\dev\conan\test_openssl2\output
conanfile.py (app/1.0): Generating aggregated env files
conanfile.py (app/1.0): Generated aggregated env files: ['conanbuild.bat', 'conanrun.bat']
Install finished successfully

image

@memsharded
Copy link
Member

Ok, thanks for the extensive report and details.

I think there is something in the binary compatibility management that is affecting, and it could only be affecting some packages, like those that define compiler.cppstd for example. I have to take a closer look and investigate this, thanks!

@memsharded
Copy link
Member

memsharded commented Mar 17, 2024

I have finally managed to reproduce this, thanks very much for the feedback and details!

It happens when there are multiple repeated tool_requires, but not when there is a single one, that was the reason it was not obvious to reproduce.
I am submitting a fix for it in #15885

@memsharded
Copy link
Member

#15885 merged, this will be in next 2.2

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 a pull request may close this issue.

2 participants