Skip to content

[package] qt/6.7.3: host libb2 may be used #26551

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

Closed
fnadeau opened this issue Feb 7, 2025 · 0 comments
Closed

[package] qt/6.7.3: host libb2 may be used #26551

fnadeau opened this issue Feb 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@fnadeau
Copy link
Contributor

fnadeau commented Feb 7, 2025

Description

If host has libb2 installed, build will go through but example will fail to link due to missing system lib in link command.

Note: shared build works but makes them less shareable since libb2 is not declared as dependency.

Package and Environment Details

  • Package Name/Version: qt/6.7.3
  • Operating System+version: Arch
  • Compiler+version: GCC 14.2.1 20240910
  • Docker image: archlinux/base-devel
  • Conan version: conan 2.11.0
  • Python version: Python 3.13.1

Conan profile

Host profile:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu20
compiler.libcxx=libstdc++11
compiler.version=14
os=Linux

Build profile:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu20
compiler.libcxx=libstdc++11
compiler.version=14
os=Linux

Steps to reproduce

docker run -it --rm archlinux/base-devel bash
pacman -Syu python-virtualenv libb2 git cmake ninja libglvnd xkeyboard-config
cd
python -m venv conan
source conan/bin/activate
pip install conan
git clone https://github.com/conan-io/conan-center-index.git
conan profile detect
conan create conan-center-index/recipes/qt/6.x.x/conanfile.py --version 6.7.3 --build=missing -c tools.system.package_manager:mode=install
conan create conan-center-index/recipes/qt/6.x.x/conanfile.py --version 6.7.3 --build=missing -c tools.system.package_manager:mode=install -o='qt/*:shared=True'

Logs

Fail when shared=False

qt/6.7.3 (test package): Running CMake.build()
qt/6.7.3 (test package): RUN: cmake --build "/root/conan-center-index/recipes/qt/6.x.x/test_package/build/gcc-14-x86_64-gnu17-release" -- -j8
[  0%] Built target test_package_autogen_timestamp_deps
[ 14%] Automatic MOC for target test_package
[ 14%] Built target test_package_autogen
[ 28%] Automatic RCC for example.qrc
[ 57%] Building CXX object CMakeFiles/test_package.dir/test_package_autogen/mocs_compilation.cpp.o
[ 71%] Building CXX object CMakeFiles/test_package.dir/test_package_autogen/EWIEGA46WW/qrc_example.cpp.o
[ 71%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o
[ 85%] Linking CXX executable test_package
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHash::QCryptographicHash(QCryptographicHash::Algorithm)':
qcryptographichash.cpp:(.text._ZN18QCryptographicHashC2ENS_9AlgorithmE+0x1a7): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN18QCryptographicHashC2ENS_9AlgorithmE+0x1bf): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHash::reset()':
qcryptographichash.cpp:(.text._ZN18QCryptographicHash5resetEv+0x137): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN18QCryptographicHash5resetEv+0x14f): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHashPrivate::State::State(QCryptographicHash::Algorithm)':
qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5StateC2EN18QCryptographicHash9AlgorithmE+0x12c): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5StateC2EN18QCryptographicHash9AlgorithmE+0x144): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHashPrivate::reset()':
qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5resetEv+0x134): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5resetEv+0x14c): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHashPrivate::State::reset(QCryptographicHash::Algorithm)':
qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5State5resetEN18QCryptographicHash9AlgorithmE+0x12c): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5State5resetEN18QCryptographicHash9AlgorithmE+0x144): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHashPrivate::State::addData(QCryptographicHash::Algorithm, QByteArrayView)':
qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5State7addDataEN18QCryptographicHash9AlgorithmE14QByteArrayView+0x26c): undefined reference to `blake2s_update'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5State7addDataEN18QCryptographicHash9AlgorithmE14QByteArrayView+0x29c): undefined reference to `blake2b_update'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHashPrivate::State::finalizeUnchecked(QCryptographicHash::Algorithm, QSmallByteArray<64ul>&)':
qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5State17finalizeUncheckedEN18QCryptographicHash9AlgorithmER15QSmallByteArrayILm64EE+0x333): undefined reference to `blake2b_final'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN25QCryptographicHashPrivate5State17finalizeUncheckedEN18QCryptographicHash9AlgorithmER15QSmallByteArrayILm64EE+0x3ee): undefined reference to `blake2s_final'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QCryptographicHash::hash(QByteArrayView, QCryptographicHash::Algorithm)':
qcryptographichash.cpp:(.text._ZN18QCryptographicHash4hashE14QByteArrayViewNS_9AlgorithmE+0x122): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN18QCryptographicHash4hashE14QByteArrayViewNS_9AlgorithmE+0x1d2): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QMessageAuthenticationCode::QMessageAuthenticationCode(QCryptographicHash::Algorithm, QByteArrayView)':
qcryptographichash.cpp:(.text._ZN26QMessageAuthenticationCodeC2EN18QCryptographicHash9AlgorithmE14QByteArrayView+0x1f3): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN26QMessageAuthenticationCodeC2EN18QCryptographicHash9AlgorithmE14QByteArrayView+0x213): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QMessageAuthenticationCode::setKey(QByteArrayView)':
qcryptographichash.cpp:(.text._ZN26QMessageAuthenticationCode6setKeyE14QByteArrayView+0x1d3): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN26QMessageAuthenticationCode6setKeyE14QByteArrayView+0x1f3): undefined reference to `blake2s_init'
/usr/sbin/ld: /root/.conan2/p/b/qt43dd1400c7b5c/p/lib/libQt6Core.a(qcryptographichash.cpp.o): in function `QMessageAuthenticationCode::hash(QByteArrayView, QByteArrayView, QCryptographicHash::Algorithm)':
qcryptographichash.cpp:(.text._ZN26QMessageAuthenticationCode4hashE14QByteArrayViewS0_N18QCryptographicHash9AlgorithmE+0x14c): undefined reference to `blake2b_init'
/usr/sbin/ld: qcryptographichash.cpp:(.text._ZN26QMessageAuthenticationCode4hashE14QByteArrayViewS0_N18QCryptographicHash9AlgorithmE+0x214): undefined reference to `blake2s_init'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/test_package.dir/build.make:197: test_package] Error 1
make[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/test_package.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

ERROR: qt/6.7.3 (test package): Error in build() method, line 37
        cmake.build()
        ConanException: Error 2 while executing


Link to system lib when using shared

qt/6.7.3 (test package): Running CMake.build()
qt/6.7.3 (test package): RUN: cmake --build "/root/conan-center-index/recipes/qt/6.x.x/test_package/build/gcc-14-x86_64-gnu17-release" -- -j8
[  0%] Built target test_package_autogen_timestamp_deps
[ 14%] Automatic MOC for target test_package
[ 14%] Built target test_package_autogen
[ 28%] Automatic RCC for example.qrc
[ 71%] Building CXX object CMakeFiles/test_package.dir/test_package_autogen/EWIEGA46WW/qrc_example.cpp.o
[ 71%] Building CXX object CMakeFiles/test_package.dir/test_package_autogen/mocs_compilation.cpp.o
[ 71%] Building CXX object CMakeFiles/test_package.dir/test_package.cpp.o
[ 85%] Linking CXX executable test_package
[100%] Built target test_package


======== Testing the package: Executing test ========
qt/6.7.3 (test package): Running test()
qt/6.7.3 (test package): RUN: ./test_package
Resource content: "Hello World From Resource\n"
"Hello World!"

(conan) [root@94a01ddae8eb ~]# cd conan-center-index/recipes/
(conan) [root@94a01ddae8eb recipes]# ldd qt/6.x.x/test_package/build/gcc-14-x86_64-gnu17-release/test_package | grep libb2
        libb2.so.1 => /usr/lib/libb2.so.1 (0x00007212d8aa7000)
(conan) [root@94a01ddae8eb recipes]# 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant