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

[bug] conanfile.txt: option pattern not applied to transitive libs #13854

Closed
SpaceIm opened this issue May 9, 2023 · 1 comment · Fixed by #13855
Closed

[bug] conanfile.txt: option pattern not applied to transitive libs #13854

SpaceIm opened this issue May 9, 2023 · 1 comment · Fixed by #13855
Assignees
Milestone

Comments

@SpaceIm
Copy link
Contributor

SpaceIm commented May 9, 2023

Environment details

  • Operating System+version: macOS Ventura
  • Compiler+version: apple-clang 14
  • Conan version: 2.0.4
  • Python version: 3.11.3

Steps to reproduce

conanfile.txt

[requires]
openssl/3.1.0

[options]
*:shared=True

cmd:

conan install . -b missing

openssl is built as shared but zlib (transitive dependency) as static, while it should be shared also.

Logs

======== Computing dependency graph ========
Graph root
    conanfile.txt: /Users/spaceim/Documents/Personnel/test/conanfile.txt
Requirements
    openssl/3.1.0#25925a18588e030e406a15da96c4d32b - Cache
    zlib/1.2.13#e377bee636333ae348d51ca90874e353 - Cache

======== Computing necessary packages ========
Requirements
    openssl/3.1.0#25925a18588e030e406a15da96c4d32b:82a8b44db97934bb74165dbec6d129cf01e5571e - Build
    zlib/1.2.13#e377bee636333ae348d51ca90874e353:6fe7fa69f760aee504e0be85c12b2327c716f9e7 - Build

======== Installing packages ========
zlib/1.2.13: WARN: Trying to remove corrupted source folder
zlib/1.2.13: WARN: This can take a while for big packages
zlib/1.2.13: Calling source() in /Users/spaceim/.conan2/p/zlib15353192ba4c5/s/src
Downloading zlib-1.2.13.tar.gz

-------- Installing package zlib/1.2.13 (1 of 2) --------
zlib/1.2.13: Building from source
zlib/1.2.13: Package zlib/1.2.13:6fe7fa69f760aee504e0be85c12b2327c716f9e7
zlib/1.2.13: Copying sources to build folder
zlib/1.2.13: Building your package in /Users/spaceim/.conan2/p/t/zlib2aa73292db782/b
zlib/1.2.13: Calling generate()
zlib/1.2.13: Generators folder: /Users/spaceim/.conan2/p/t/zlib2aa73292db782/b/build/Release/generators
zlib/1.2.13: CMakeToolchain generated: conan_toolchain.cmake
zlib/1.2.13: CMakeToolchain generated: CMakePresets.json
zlib/1.2.13: CMakeToolchain generated: ../../../src/CMakeUserPresets.json
zlib/1.2.13: Generating aggregated env files
zlib/1.2.13: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
zlib/1.2.13: Calling build()
zlib/1.2.13: Running CMake.configure()
zlib/1.2.13: RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="/Users/spaceim/.conan2/p/t/zlib2aa73292db782/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/spaceim/.conan2/p/t/zlib2aa73292db782/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/spaceim/.conan2/p/t/zlib2aa73292db782/b/src"
-- Using Conan toolchain: /Users/spaceim/.conan2/p/t/zlib2aa73292db782/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
@memsharded
Copy link
Member

Thanks very much for reporting @SpaceIm

This seems a bug in conanfile.txt/py options initialization
It works well with the CLI or profile equivalent -o *:shared=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants