-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Botan3 support #9322
Copy link
Copy link
Closed
Description
Overview
I am using keepassxc 2.7.4 and try to build it against Botan3.
Applying #8994 works fine, but building with -D KPXC_DEV_BOTAN3=ON yields the following error:
[109/368] Building CXX object src/keeshare/CMakeFiles/keeshare.dir/ShareExport.cpp.o
FAILED: src/keeshare/CMakeFiles/keeshare.dir/ShareExport.cpp.o
/usr/bin/ccache /usr/bin/c++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEPRECATED_WARNINGS -DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -I/home/pkgmk/work/keepassxc/src/build/src/keeshare/keesh
are_autogen/include -I/home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src -I/home/pkgmk/work/keepassxc/src/build/src -I/home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src/zxcvbn -I/home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src/keeshare -I/home/pkgmk/work
/keepassxc/src/build/src/keeshare -isystem /usr/include/botan-3 -isystem /usr/include/PCSC -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGu
i -O2 -march=x86-64 -fno-common -fopenmp -Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute -fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-vi
rtual -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror=format-security -Wcast-align -fsized-deallocation -Wno-deprecated-declarations -O2 -march=x86-64 -std=gnu++20 -fPIC -fPIC -MD -MT src/keeshare/CMakeFiles/keeshare.dir/ShareExport.cpp.o -MF src/keeshare/CM
akeFiles/keeshare.dir/ShareExport.cpp.o.d -o src/keeshare/CMakeFiles/keeshare.dir/ShareExport.cpp.o -c /home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src/keeshare/ShareExport.cpp
../keepassxc-2.7.4/src/keeshare/ShareExport.cpp: In function 'bool {anonymous}::signData(const QByteArray&, const KeeShareSettings::Key&, QString&)':
../keepassxc-2.7.4/src/keeshare/ShareExport.cpp:144:67: error: no matching function for call to 'Botan::PK_Signer::PK_Signer(Botan::Private_Key&, const char [15])'
144 | Botan::PK_Signer signer(*key.key, "EMSA3(SHA-256)");
| ^
In file included from ../keepassxc-2.7.4/src/keeshare/ShareExport.cpp:29:
/usr/include/botan-3/botan/pubkey.h:178:7: note: candidate: 'Botan::PK_Signer::PK_Signer(const Botan::Private_Key&, Botan::RandomNumberGenerator&, std::string_view, Botan::Signature_Format, std::string_view)'
178 | PK_Signer(const Private_Key& key,
| ^~~~~~~~~
/usr/include/botan-3/botan/pubkey.h:178:7: note: candidate expects 5 arguments, 2 provided
[111/368] Building CXX object src/fdosecrets/CMakeFiles/fdosecrets.dir/widgets/AccessControlDialog.cpp.o
../keepassxc-2.7.4/src/fdosecrets/widgets/AccessControlDialog.cpp: In lambda function:
../keepassxc-2.7.4/src/fdosecrets/widgets/AccessControlDialog.cpp:104:57: warning: implicit capture of 'this' via '[=]' is deprecated in C++20 [-Wdeprecated]
../keepassxc-2.7.4/src/fdosecrets/widgets/AccessControlDialog.cpp:104:57: note: add explicit 'this' or '*this' capture
[124/368] Building CXX object src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o
FAILED: src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o
/usr/bin/ccache /usr/bin/c++ -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEPRECATED_WARNINGS -DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -I/home/pkgmk/work/keepassxc/src/build/src/
fdosecrets/fdosecrets_autogen/include -I/home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src -I/home/pkgmk/work/keepassxc/src/build/src -I/home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src/zxcvbn -I/home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src/fdosecret
s -I/home/pkgmk/work/keepassxc/src/build/src/fdosecrets -isystem /usr/include/botan-3 -isystem /usr/include/PCSC -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem
/usr/include/qt5/QtGui -isystem /usr/include/qt5/QtDBus -O2 -march=x86-64 -fno-common -fopenmp -Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute -fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-str
ong -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror=format-security -Wcast-align -fsized-deallocation -Wno-deprecated-declarations -O2 -march=x86-64 -std=gnu++20 -fPIC -fPIC -MD -MT src/fdosecrets/CMak
eFiles/fdosecrets.dir/objects/SessionCipher.cpp.o -MF src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o.d -o src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o -c /home/pkgmk/work/keepassxc/src/keepassxc-2.7.4/src/fdose
crets/objects/SessionCipher.cpp
../keepassxc-2.7.4/src/fdosecrets/objects/SessionCipher.cpp: In constructor 'FdoSecrets::DhIetf1024Sha256Aes128CbcPkcs7::DhIetf1024Sha256Aes128CbcPkcs7(const QByteArray&)':
../keepassxc-2.7.4/src/fdosecrets/objects/SessionCipher.cpp:43:113: error: invalid use of incomplete type 'class Botan::DL_Group'
43 | m_privateKey.reset(new Botan::DH_PrivateKey(*randomGen()->getRng(), Botan::DL_Group("modp/ietf/1024")));
| ^
In file included from ../keepassxc-2.7.4/src/fdosecrets/objects/SessionCipher.cpp:26:
/usr/include/botan-3/botan/dh.h:17:7: note: forward declaration of 'class Botan::DL_Group'
17 | class DL_Group;
| ^~~~~~~~
[126/368] Building CXX object src/fdosecrets/CMakeFiles/fdosecrets.dir/dbus/DBusMgr.cpp.o
ninja: build stopped: subcommand failed.
=======> ERROR: Building '/home/pkgmk/packages/keepassxc#2.7.4-2.pkg.tar.xz' failed.
Steps to Reproduce
from a clean source checkout, tag 2.7.4, apply #8994 and attempt to build with -D KPXC_DEV_BOTAN3=ON
fwiw: a checkout of current HEAD of develop fails with a different error:
[139/349] Building CXX object src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o
FAILED: src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o
/usr/bin/ccache /usr/bin/c++ -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEPRECATED_WARNINGS -DQT_NO_EXCEPTIONS -DQT_STRICT_ITERATORS -DQT_WIDGETS_LIB -I/usr/ports/crux-contrib/keepassxc/build/src/fdosecrets/fdosecrets_autogen/include -I/usr/ports/crux-contrib/keepassxc/keepassxc-develop/src -I/usr/ports/crux-contrib/keepassxc/build/src -I/usr/ports/crux-contrib/keepassxc/keepassxc-develop/src/zxcvbn -I/usr/ports/crux-contrib/keepassxc/keepassxc-develop/src/fdosecrets -I/usr/ports/crux-contrib/keepassxc/build/src/fdosecrets -isystem /usr/include/botan-3 -isystem /usr/include/PCSC -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtDBus -fno-common -fopenmp -Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long -Wformat=2 -Wmissing-format-attribute -fvisibility=hidden -fvisibility-inlines-hidden -fstack-protector-strong -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Werror=format-security -Wcast-align -fsized-deallocation -Wno-deprecated-declarations -O2 -march=x86-64 -std=gnu++20 -fPIC -fPIC -MD -MT src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o -MF src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o.d -o src/fdosecrets/CMakeFiles/fdosecrets.dir/objects/SessionCipher.cpp.o -c /usr/ports/crux-contrib/keepassxc/keepassxc-develop/src/fdosecrets/objects/SessionCipher.cpp
/usr/ports/crux-contrib/keepassxc/keepassxc-develop/src/fdosecrets/objects/SessionCipher.cpp: In constructor 'FdoSecrets::DhIetf1024Sha256Aes128CbcPkcs7::DhIetf1024Sha256Aes128CbcPkcs7(const QByteArray&)':
/usr/ports/crux-contrib/keepassxc/keepassxc-develop/src/fdosecrets/objects/SessionCipher.cpp:43:113: error: invalid use of incomplete type 'class Botan::DL_Group'
43 | m_privateKey.reset(new Botan::DH_PrivateKey(*randomGen()->getRng(), Botan::DL_Group("modp/ietf/1024")));
| ^
In file included from /usr/ports/crux-contrib/keepassxc/keepassxc-develop/src/fdosecrets/objects/SessionCipher.cpp:26:
/usr/include/botan-3/botan/dh.h:17:7: note: forward declaration of 'class Botan::DL_Group'
17 | class DL_Group;
| ^~~~~~~~
[150/349] Building CXX object src/fdosecrets/CMakeFiles/fdosecrets.dir/dbus/DBusTypes.cpp.o
ninja: build stopped: subcommand failed.
Expected Behavior
build works
Actual Behavior
build fails
Context
Operating System: CRUX 3.7 (Linux, glibc based)
Botan 3.0.0 was released https://github.com/randombit/botan/releases/tag/3.0.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels