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] 2 profiles: -o:b "*":shared=False -o:h "*":shared=True doesn't properly work on macOS #10425

Closed
SpaceIm opened this issue Jan 25, 2022 · 8 comments
Assignees
Milestone

Comments

@SpaceIm
Copy link
Contributor

SpaceIm commented Jan 25, 2022

Environment Details (include every applicable attribute)

  • Operating System+version: macOS Monterey
  • Compiler+version: AppleClang 13
  • Conan version: 1.44.1
  • Python version: 3.9.10

Steps to reproduce (Include if Applicable)

conan install libcurl/7.80.0@ -o:b "*":shared=False -o:h "*":shared=True -pr:b default -pr:h default -b libcurl -b zlib -b missing

Logs (Executed commands with output) (Include/Attach if Applicable)

Build requirements of libcurl (conan-center recipe), like pkgconf & libtool are built whith shared=True when they have this option, while they should be built with shared=False.

Just the first lines of the log, to see 2 profiles and the build of pkgconf:

Click to expand log
Configuration (profile_host):
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13.0
os=Macos
[options]
*:shared=True
[build_requires]
[env]

Configuration (profile_build):
[settings]
arch=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13.0
os=Macos
[options]
*:shared=False
[build_requires]
[env]

libcurl/7.80.0: Not found in local cache, looking in remotes...
libcurl/7.80.0: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.70k]
Downloading conanfile.py completed [27.11k]
Downloading conan_export.tgz completed [0.23k]
Decompressing conan_export.tgz completed [0.00k]
libcurl/7.80.0: Downloaded recipe revision 116933f53e9a16e3fdc19318bb49dd0a
zlib/1.2.11: Not found in local cache, looking in remotes...
zlib/1.2.11: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.35k]
Downloading conanfile.py completed [5.76k]
Downloading conan_export.tgz completed [0.34k]
Decompressing conan_export.tgz completed [0.00k]
zlib/1.2.11: Downloaded recipe revision 683857dbd5377d65f26795d4023858f9
libtool/2.4.6: Not found in local cache, looking in remotes...
libtool/2.4.6: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.28k]
Downloading conanfile.py completed [9.40k]
Downloading conan_export.tgz completed [0.30k]
Decompressing conan_export.tgz completed [0.00k]
libtool/2.4.6: Downloaded recipe revision ffa5ebc2aea7977aefd32a43c2b46c66
automake/1.16.4: Not found in local cache, looking in remotes...
automake/1.16.4: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [1.58k]
Downloading conanfile.py completed [5.63k]
Downloading conan_export.tgz completed [0.38k]
Decompressing conan_export.tgz completed [0.00k]
automake/1.16.4: Downloaded recipe revision b1f2e6cc5a58827818859a5fecc00ac2
autoconf/2.71: Not found in local cache, looking in remotes...
autoconf/2.71: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [1.05k]
Downloading conanfile.py completed [4.46k]
Downloading conan_export.tgz completed [0.39k]
Decompressing conan_export.tgz completed [0.00k]
autoconf/2.71: Downloaded recipe revision a7e681fccf619b8eaf7089a22b58b0a0
m4/1.4.19: Not found in local cache, looking in remotes...
m4/1.4.19: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [1.28k]
Downloading conanfile.py completed [4.99k]
Downloading conan_export.tgz completed [0.31k]
Decompressing conan_export.tgz completed [0.00k]
m4/1.4.19: Downloaded recipe revision 7bf4b7de37a545f40f65aeb26e4f135f
pkgconf/1.7.4: Not found in local cache, looking in remotes...
pkgconf/1.7.4: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.41k]
Downloading conanfile.py completed [5.12k]
Downloading conan_export.tgz completed [0.37k]
Decompressing conan_export.tgz completed [0.00k]
pkgconf/1.7.4: Downloaded recipe revision 5e404aa82d3f26619bd22254e68a430b
meson/0.60.2: Not found in local cache, looking in remotes...
meson/0.60.2: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.10k]
Downloading conanfile.py completed [1.99k]
Downloading conan_export.tgz completed [0.24k]
Decompressing conan_export.tgz completed [0.00k]
meson/0.60.2: Downloaded recipe revision 5bc6d7c3bc8efe9b441d29d374eb56fa
ninja/1.10.2: Not found in local cache, looking in remotes...
ninja/1.10.2: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.51k]
Downloading conanfile.py completed [1.55k]
Downloading conan_export.tgz completed [0.25k]
Decompressing conan_export.tgz completed [0.00k]
ninja/1.10.2: Downloaded recipe revision 0ed34363d5683eb57a22bd2ccd7b62fc
gnu-config/cci.20201022: Not found in local cache, looking in remotes...
gnu-config/cci.20201022: Trying with 'conancenter'...
Downloading conanmanifest.txt completed [0.10k]
Downloading conanfile.py completed [2.11k]
Downloading conan_export.tgz completed [0.28k]
Decompressing conan_export.tgz completed [0.00k]
gnu-config/cci.20201022: Downloaded recipe revision 8cee5aa587f355f8fde822cf368805db
Installing package: libcurl/7.80.0
Requirements
    libcurl/7.80.0 from 'conancenter' - Downloaded
    zlib/1.2.11 from 'conancenter' - Downloaded
Packages
    libcurl/7.80.0:6b4c8314e132d9b68b5f48c40d4df883034ce8b3 - Build
    zlib/1.2.11:bda713dd3b257827c8d11a06ac9d824038871572 - Build
Build requirements
    autoconf/2.71 from 'conancenter' - Downloaded
    automake/1.16.4 from 'conancenter' - Downloaded
    gnu-config/cci.20201022 from 'conancenter' - Downloaded
    libtool/2.4.6 from 'conancenter' - Downloaded
    m4/1.4.19 from 'conancenter' - Downloaded
    meson/0.60.2 from 'conancenter' - Downloaded
    ninja/1.10.2 from 'conancenter' - Downloaded
    pkgconf/1.7.4 from 'conancenter' - Downloaded
Build requirements packages
    autoconf/2.71:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
    automake/1.16.4:3c28ba69276b46fd46e9c2060ba991d725ccab43 - Download
    gnu-config/cci.20201022:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
    libtool/2.4.6:2d1097d0a07e0fd22fb66460fae7c4f88ab883f3 - Build
    m4/1.4.19:801752c0480319b8e090188c566245a78e9abcf4 - Download
    meson/0.60.2:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
    ninja/1.10.2:801752c0480319b8e090188c566245a78e9abcf4 - Download
    pkgconf/1.7.4:bda713dd3b257827c8d11a06ac9d824038871572 - Build

Installing (downloading, building) binaries...
gnu-config/cci.20201022: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conancenter'
Downloading conanmanifest.txt completed [0.21k]
Downloading conaninfo.txt completed [0.15k]
Downloading conan_package.tgz completed [24.61k]
Decompressing conan_package.tgz completed [0.00k]
gnu-config/cci.20201022: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
gnu-config/cci.20201022: Downloaded package revision 7134872adb6c63ccb1ead1ca29e9cbf3
m4/1.4.19: Retrieving package 801752c0480319b8e090188c566245a78e9abcf4 from remote 'conancenter'
Downloading conanmanifest.txt completed [0.15k]
Downloading conaninfo.txt completed [0.32k]
Downloading conan_package.tgz completed [161.66k]
Decompressing conan_package.tgz completed [0.00k]
m4/1.4.19: Package installed 801752c0480319b8e090188c566245a78e9abcf4
m4/1.4.19: Downloaded package revision 9b845b66bf115e3afea1db62111d366c
ninja/1.10.2: Retrieving package 801752c0480319b8e090188c566245a78e9abcf4 from remote 'conancenter'
Downloading conanmanifest.txt completed [0.15k]
Downloading conaninfo.txt completed [0.32k]
Downloading conan_package.tgz completed [120.62k]
Decompressing conan_package.tgz completed [0.00k]
ninja/1.10.2: Package installed 801752c0480319b8e090188c566245a78e9abcf4
ninja/1.10.2: Downloaded package revision a9c252f1df2b3e6551a7834686a51326
autoconf/2.71: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conancenter'
Downloading conanmanifest.txt completed [3.88k]
Downloading conaninfo.txt completed [0.32k]
Downloading conan_package.tgz completed [586.95k]
Decompressing conan_package.tgz completed [0.00k]
autoconf/2.71: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
autoconf/2.71: Downloaded package revision 4c45e2e95a7f1bfe681f25bac7b329b3
meson/0.60.2: Retrieving package 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 from remote 'conancenter'
Downloading conanmanifest.txt completed [48.97k]
Downloading conaninfo.txt completed [0.20k]
Downloading conan_package.tgz completed [3091.73k]
Decompressing conan_package.tgz completed [0.00k]
meson/0.60.2: Package installed 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
meson/0.60.2: Downloaded package revision f790ac6c326903b06ee2bd1171dfbafe
automake/1.16.4: Retrieving package 3c28ba69276b46fd46e9c2060ba991d725ccab43 from remote 'conancenter'
Downloading conanmanifest.txt completed [7.30k]
Downloading conaninfo.txt completed [0.33k]
Downloading conan_package.tgz completed [469.88k]
Decompressing conan_package.tgz completed [0.00k]
automake/1.16.4: Package installed 3c28ba69276b46fd46e9c2060ba991d725ccab43
automake/1.16.4: Downloaded package revision d4ed639c5a43d1bdb78a183ccfa0d1b2
gnu-config/cci.20201022: Appending PATH environment variable: /Users/spaceim/.conan/data/gnu-config/cci.20201022/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
gnu-config/cci.20201022: WARN: Lib folder doesn't exist, can't collect libraries: /Users/spaceim/.conan/data/gnu-config/cci.20201022/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
m4/1.4.19: Appending PATH environment variable: /Users/spaceim/.conan/data/m4/1.4.19/_/_/package/801752c0480319b8e090188c566245a78e9abcf4/bin
m4/1.4.19: Setting M4 environment variable: /Users/spaceim/.conan/data/m4/1.4.19/_/_/package/801752c0480319b8e090188c566245a78e9abcf4/bin/m4
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
ninja/1.10.2: WARN: Lib folder doesn't exist, can't collect libraries: /Users/spaceim/.conan/data/ninja/1.10.2/_/_/package/801752c0480319b8e090188c566245a78e9abcf4/lib
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
Downloading conan_sources.tgz completed [1.13k]
Decompressing conan_sources.tgz completed [0.00k]
[HOOK - conan-center.py] pre_source(): [IMMUTABLE SOURCES (KB-H010)] OK
zlib/1.2.11: Configuring sources in /Users/spaceim/.conan/data/zlib/1.2.11/_/_/source
Downloading zlib-1.2.11.tar.gz completed [593.46k]

[HOOK - conan-center.py] post_source(): [LIBCXX MANAGEMENT (KB-H011)] OK
[HOOK - conan-center.py] post_source(): [CPPSTD MANAGEMENT (KB-H022)] OK
zlib/1.2.11: Copying sources to build folder
zlib/1.2.11: Building your package in /Users/spaceim/.conan/data/zlib/1.2.11/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572
zlib/1.2.11: Generator cmake created conanbuildinfo.cmake
zlib/1.2.11: Aggregating env generators
[HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] 'fPIC' option not found
[HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK
zlib/1.2.11: Calling build()
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Renaming
--     /Users/spaceim/.conan/data/zlib/1.2.11/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/zconf.h
-- to 'zconf.h.included' because this file is included with zlib
-- but CMake generates it automatically in the build directory.
-- 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/spaceim/.conan/data/zlib/1.2.11/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/build_subfolder
[17/17] Creating library symlink lib/libz.1.dylib lib/libz.dylib
zlib/1.2.11: Package 'bda713dd3b257827c8d11a06ac9d824038871572' built
zlib/1.2.11: Build folder /Users/spaceim/.conan/data/zlib/1.2.11/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572
zlib/1.2.11: Generated conaninfo.txt
zlib/1.2.11: Generated conanbuildinfo.txt
zlib/1.2.11: Generating the package
zlib/1.2.11: Package folder /Users/spaceim/.conan/data/zlib/1.2.11/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572
zlib/1.2.11: Calling package()
[HOOK - conan-center.py] post_package(): [PACKAGE LICENSE (KB-H012)] OK
[HOOK - conan-center.py] post_package(): [DEFAULT PACKAGE LAYOUT (KB-H013)] OK
[HOOK - conan-center.py] post_package(): [MATCHING CONFIGURATION (KB-H014)] OK
[HOOK - conan-center.py] post_package(): [SHARED ARTIFACTS (KB-H015)] OK
[HOOK - conan-center.py] post_package(): [PC-FILES (KB-H020)] OK
[HOOK - conan-center.py] post_package(): [CMAKE-MODULES-CONFIG-FILES (KB-H016)] OK
[HOOK - conan-center.py] post_package(): [PDB FILES NOT ALLOWED (KB-H017)] OK
[HOOK - conan-center.py] post_package(): [LIBTOOL FILES PRESENCE (KB-H018)] OK
[HOOK - conan-center.py] post_package(): [MS RUNTIME FILES (KB-H021)] OK
zlib/1.2.11 package(): Packaged 1 file: LICENSE
zlib/1.2.11 package(): Packaged 2 '.h' files: zlib.h, zconf.h
zlib/1.2.11 package(): Packaged 3 '.dylib' files: libz.dylib, libz.1.2.11.dylib, libz.1.dylib
zlib/1.2.11: Package 'bda713dd3b257827c8d11a06ac9d824038871572' created
zlib/1.2.11: Created package revision 9fe0f666d27ffe57f061ad22e8c84076
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
autoconf/2.71: Appending PATH env var with : /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
autoconf/2.71: Setting AC_MACRODIR to /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/share/autoconf
autoconf/2.71: Setting AUTOCONF to /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autoconf
autoconf/2.71: Setting AUTORECONF to /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autoreconf
autoconf/2.71: Setting AUTOHEADER to /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autoheader
autoconf/2.71: Setting AUTOM4TE to /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autom4te
autoconf/2.71: Setting AUTOM4TE_PERLLIBDIR to /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/share/autoconf
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
autoconf/2.71: WARN: Lib folder doesn't exist, can't collect libraries: /Users/spaceim/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
meson/0.60.2: Appending PATH environment variable: /Users/spaceim/.conan/data/meson/0.60.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
meson/0.60.2: WARN: Lib folder doesn't exist, can't collect libraries: /Users/spaceim/.conan/data/meson/0.60.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/lib
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
automake/1.16.4: Appending PATH environment variable:: /Users/spaceim/.conan/data/automake/1.16.4/_/_/package/3c28ba69276b46fd46e9c2060ba991d725ccab43/bin
automake/1.16.4: Appending ACLOCAL environment variable with: /Users/spaceim/.conan/data/automake/1.16.4/_/_/package/3c28ba69276b46fd46e9c2060ba991d725ccab43/bin/aclocal
automake/1.16.4: Setting AUTOMAKE_DATADIR to /Users/spaceim/.conan/data/automake/1.16.4/_/_/package/3c28ba69276b46fd46e9c2060ba991d725ccab43/res
automake/1.16.4: Setting AUTOMAKE_LIBDIR to /Users/spaceim/.conan/data/automake/1.16.4/_/_/package/3c28ba69276b46fd46e9c2060ba991d725ccab43/res/automake-1.16
automake/1.16.4: Setting AUTOMAKE_PERLLIBDIR to /Users/spaceim/.conan/data/automake/1.16.4/_/_/package/3c28ba69276b46fd46e9c2060ba991d725ccab43/res/automake-1.16
automake/1.16.4: Setting AUTOMAKE to /Users/spaceim/.conan/data/automake/1.16.4/_/_/package/3c28ba69276b46fd46e9c2060ba991d725ccab43/bin/automake
automake/1.16.4: Append M4 include directories to AUTOMAKE_CONAN_INCLUDES environment variable
[HOOK - conan-center.py] post_package_info(): [CMAKE FILE NOT IN BUILD FOLDERS (KB-H019)] OK
[HOOK - conan-center.py] post_package_info(): [LIBRARY DOES NOT EXIST (KB-H054)] OK
pkgconf/1.7.4: Applying build-requirement: meson/0.60.2
pkgconf/1.7.4: Applying build-requirement: ninja/1.10.2
Downloading conan_sources.tgz completed [1.17k]
Decompressing conan_sources.tgz completed [0.00k]
[HOOK - conan-center.py] pre_source(): [IMMUTABLE SOURCES (KB-H010)] OK
pkgconf/1.7.4: Configuring sources in /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/source
Downloading pkgconf-1.7.4.tar.xz completed [287.00k]

[HOOK - conan-center.py] post_source(): [LIBCXX MANAGEMENT (KB-H011)] OK
[HOOK - conan-center.py] post_source(): [CPPSTD MANAGEMENT (KB-H022)] OK
pkgconf/1.7.4: Copying sources to build folder
pkgconf/1.7.4: Building your package in /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572
pkgconf/1.7.4: Generator txt created conanbuildinfo.txt
pkgconf/1.7.4: Aggregating env generators
[HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] 'fPIC' option not found
[HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK
pkgconf/1.7.4: Calling build()
The Meson build system
Version: 0.60.2
Source dir: /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder
Build dir: /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/build_subfolder
Build type: native build
Project name: pkgconf
Project version: 1.7.4
C compiler for the host machine: ccache cc (clang 13.0.0 "Apple clang version 13.0.0 (clang-1300.0.29.30)")
C linker for the host machine: cc ld64 711
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.h using configuration
Build targets in project: 2

pkgconf 1.7.4

  User defined options
    backend        : ninja
    bindir         : bin
    buildtype      : release
    default_library: shared
    includedir     : include
    libdir         : lib
    libexecdir     : bin
    prefix         : /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572
    sbindir        : bin
    sharedstatedir : /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/bin/share
    tests          : False

Found ninja-1.10.2 at /Users/spaceim/.conan/data/ninja/1.10.2/_/_/package/801752c0480319b8e090188c566245a78e9abcf4/bin/ninja
ninja: Entering directory `/Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/build_subfolder'
[20/20] Linking target pkgconf
pkgconf/1.7.4: Package 'bda713dd3b257827c8d11a06ac9d824038871572' built
pkgconf/1.7.4: Build folder /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572
pkgconf/1.7.4: Generated conaninfo.txt
pkgconf/1.7.4: Generated conanbuildinfo.txt
pkgconf/1.7.4: Generating the package
pkgconf/1.7.4: Package folder /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572
pkgconf/1.7.4: Calling package()
ninja: Entering directory `/Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/build_subfolder'
[0/1] Installing files.
Installing libpkgconf.3.dylib to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/lib
Installing pkgconf to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/bin
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/libpkgconf/libpkgconf.h to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/include/pkgconf/libpkgconf
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/libpkgconf/stdinc.h to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/include/pkgconf/libpkgconf
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/libpkgconf/iter.h to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/include/pkgconf/libpkgconf
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/libpkgconf/bsdstubs.h to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/include/pkgconf/libpkgconf
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/libpkgconf/libpkgconf-api.h to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/include/pkgconf/libpkgconf
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/man/pkgconf.1 to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/man/man1
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/man/pkg.m4.7 to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/man/man7
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/man/pc.5 to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/man/man5
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/man/pkgconf-personality.5 to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/man/man5
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/build_subfolder/meson-private/libpkgconf.pc to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/lib/pkgconfig
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/pkg.m4 to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/aclocal
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/AUTHORS to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/doc/pkgconf
Installing /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/build/bda713dd3b257827c8d11a06ac9d824038871572/source_subfolder/README.md to /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/share/doc/pkgconf
[HOOK - conan-center.py] post_package(): [PACKAGE LICENSE (KB-H012)] OK
[HOOK - conan-center.py] post_package(): [DEFAULT PACKAGE LAYOUT (KB-H013)] OK
[HOOK - conan-center.py] post_package(): [MATCHING CONFIGURATION (KB-H014)] OK
[HOOK - conan-center.py] post_package(): [SHARED ARTIFACTS (KB-H015)] OK
[HOOK - conan-center.py] post_package(): [PC-FILES (KB-H020)] OK
[HOOK - conan-center.py] post_package(): [CMAKE-MODULES-CONFIG-FILES (KB-H016)] OK
[HOOK - conan-center.py] post_package(): [PDB FILES NOT ALLOWED (KB-H017)] OK
[HOOK - conan-center.py] post_package(): [LIBTOOL FILES PRESENCE (KB-H018)] OK
[HOOK - conan-center.py] post_package(): [MS RUNTIME FILES (KB-H021)] OK
pkgconf/1.7.4 package(): Packaged 2 files: pkgconf, COPYING
pkgconf/1.7.4 package(): Packaged 1 '.m4' file: pkg.m4
pkgconf/1.7.4 package(): Packaged 5 '.h' files
pkgconf/1.7.4 package(): Packaged 2 '.dylib' files: libpkgconf.3.dylib, libpkgconf.dylib
pkgconf/1.7.4: Package 'bda713dd3b257827c8d11a06ac9d824038871572' created
pkgconf/1.7.4: Created package revision f65e9a1966c5001314eaa01f16e391f6
pkgconf/1.7.4: Appending PATH env var: /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/bin
pkgconf/1.7.4: Setting PKG_CONFIG env var: /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/bin/pkgconf
pkgconf/1.7.4: Appending AUTOMAKE_CONAN_INCLUDES env var: /Users/spaceim/.conan/data/pkgconf/1.7.4/_/_/package/bda713dd3b257827c8d11a06ac9d824038871572/bin/aclocal
@memsharded
Copy link
Member

Yes, this is a known issue, I think this is the case in https://github.com/conan-io/conan/pull/9839/files too.

We don't plan to fix it in 1.X, too risky. It should be fixed already in 2.0.

@iiknd
Copy link

iiknd commented Jan 28, 2022

This issue looks the same? #10332

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Feb 7, 2022

Yes, this is a known issue, I think this is the case in https://github.com/conan-io/conan/pull/9839/files too.

We don't plan to fix it in 1.X, too risky. It should be fixed already in 2.0.

Just to clarify: it means that -o:b doesn't work at all in conan 1.X (not just with *:<option>), and -o:h overrides all options of build context regardless of -o:b values? And to make it work, I have to enable conan v2 even if I use 2 profiles already in conan v1?

Actually, even with CONAN_V2_MODE environment variable defined, it doesn't work:

conanfile.txt

[requires]
bzip2/1.0.8
[build_requires]
bzip2/1.0.8

(default value of bzip2:build_executable is True)

conan install . -pr:b default -pr:h default -o:b bzip2:build_executable=True -o:h bzip2:build_executable=False -b missing

=> create only 1 package without executable. build context bzip2:build_executable option is ignored.

conan install . -pr:b default -pr:h default -o:b bzip2:build_executable=False -b missing

=> create only 1 package with executable. build context bzip2:build_executable option is ignored again.

@AlexRamallo
Copy link

Now that Conan 2.0 was released, I decided to try and test if this was finally working, but it still seems to be broken. At least on Conan 2.0.1, the build profile options are getting ignored, and only the host profile is used.

It's possible I'm just doing something wrong, so here's a repo to reproduce the problem. (that uses a fork of the flatbuffers recipe from conan center to add the flatc option).

I'm not sure if this counts as a bug or a feature request, since this issue is the closest thing to documentation showing how to use separate options...making me think it was never officially meant to be supported?

@memsharded
Copy link
Member

Hi @AlexRamallo

I don't think this is the case, I'd say this works fine. You can have a look at our tests in

def test_different_options_values_profile():
(that test and the following ones). They are testing exactly that scenario:

  • same requirement both in build and host context
  • different options for the build and host context

Everything is looking good. Lets try to have a look to your project

@memsharded
Copy link
Member

Running your project I get:

Build requirements
    flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23 - Cache

...

Requirements
    flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:1d9e144f36cc2a36c062e7269975b076ac60ce52 - Build
Build requirements
    flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:731f170d8cf06cc754c6fe19feef9f5a6f6ad04c - Build

That looks good, one different package_id for each build and host context.
Furthermore, if we check those binaries:

$ conan list flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:1d9e144f36cc2a36c062e7269975b076ac60
ce52                                                                                                                                                          
Local Cache                                                                                                                                                   
  flatbuffers                                                                                                                                                 
    flatbuffers/23.1.21                                                                                                                                       
      revisions                                                                                                                                               
        d02cf76b6b6fb708ea53425b4579fb23 (2023-03-07 14:30:26 UTC)                                                                                            
          packages                                                                                                                                            
            1d9e144f36cc2a36c062e7269975b076ac60ce52                                                                                                          
              info                                                                                                                                            
                settings                                                                                                                                      
                  arch: x86_64                                                                                                                                
                  build_type: Release                                                                                                                         
                  compiler: gcc                                                                                                                               
                  compiler.cppstd: gnu17                                                                                                                      
                  compiler.libcxx: libstdc++11                                                                                                                
                  compiler.version: 11                                                                                                                        
                  os: Linux                                                                                                                                   
                options                                                                                                                                       
                  fPIC: True                                                                                                                                  
                  flatc: False                                                                                                                                
                  header_only: False                                                                                                                          
                  shared: False                                                                                                                               
$ conan list flatbuffers/23.1.21#d02cf76b6b6fb708ea53425b4579fb23:731f170d8cf06cc754c6fe19feef9f5a6f6a
d04c                                                                                                                                                          
Local Cache                                                                                                                                                   
  flatbuffers                                                                                                                                                 
    flatbuffers/23.1.21                                                                                                                                       
      revisions                                                                                                                                               
        d02cf76b6b6fb708ea53425b4579fb23 (2023-03-07 14:30:26 UTC)                                                                                            
          packages                                                                                                                                            
            731f170d8cf06cc754c6fe19feef9f5a6f6ad04c                                                                                                          
              info                                                                                                                                            
                settings                                                                                                                                      
                  arch: x86_64                                                                                                                                
                  build_type: Release                                                                                                                         
                  compiler: gcc                                                                                                                               
                  compiler.cppstd: gnu17                                                                                                                      
                  compiler.libcxx: libstdc++11                                                                                                                
                  compiler.version: 11                                                                                                                        
                  os: Linux                                                                                                                                   
                options                                                                                                                                       
                  fPIC: True                                                                                                                                  
                  flatc: True                                                                                                                                 
                  header_only: False                                                                                                                          
                  shared: False                                                                                                                               

We can see each one has the correct option.flatc value. I'd say it is working fine.

@memsharded memsharded added this to the 2.0.2 milestone Mar 7, 2023
@AlexRamallo
Copy link

You're absolutely right! After some more digging, I found this issue which looks like a better fit for the error I was encountering.

The issue was that the test repo wasn't generating info for the cmake modules in the build context (also the flatbuffers recipe declares the flatc cmake modules even if it isn't built, so that was confusing).

The fix was to change some settings in CMakeDeps to force it to generate configs for the build context:

	def generate(self):
		CMakeToolchain(self).generate()
		cmake = CMakeDeps(self)
		cmake.build_context_activated = ["flatbuffers"]
		cmake.build_context_suffix = {"flatbuffers": "_BUILD"}
		cmake.build_context_build_modules = ["flatbuffers"]
		cmake.generate()

...and then load the separate build config using the "flatbuffers_BUILD" name in cmake.

I also tested it using the -o:b/-o:h flags instead of dual profiles, and it worked the same. So it seems this issue no longer exists in Conan 2.0. Awesome!!

@memsharded
Copy link
Member

Excellent! :)

Thanks very much for reporting and the feedback, closing the issue as solved then.

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

No branches or pull requests

4 participants