119 | using Container = std::remove_const_t<T>; | ^~~~~~~~~~~~~~ | remove_const /usr/include/absl/types/internal/span.h:121:44: error: parse error in template argument list 121 | decltype(span_internal::GetData(std::declval<const Container&>())); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/absl/types/internal/span.h:122:64: error: Container was not declared in this scope 122 | sing MutData = decltype(span_internal::GetData(std::declval<Container&>())); | ^~~~~~~~~ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_no_multilib_hardened-20230822-115612 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-13 * clang/llvm (if any): clang version 16.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/16/bin Configuration file: /etc/clang/clang.cfg /usr/lib/llvm/16 16.0.6 Python 3.11.4 Available Rust versions: [1] rust-1.71.1 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 17.0.7_p7 [openjdk-bin-17] *) Eclipse Temurin JDK 8.372_p07 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm [2] openjdk-bin-17 php cli (if any): go version go1.21.0 linux/amd64 HEAD of ::gentoo commit 7bab5be5af564e0f2a79f4552ce9d886c7c6c255 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Thu Aug 24 02:31:42 2023 +0000 2023-08-24 02:31:42 UTC emerge -qpvO dev-db/mysql-connector-c++ [ebuild N ] dev-db/mysql-connector-c++-8.0.32 USE="legacy"
Created attachment 868614 [details] emerge-info.txt
Created attachment 868615 [details] CMakeCache.txt
Created attachment 868616 [details] dev-db:mysql-connector-c++-8.0.32:20230824-034940.log
Created attachment 868617 [details] emerge-history.txt
Created attachment 868618 [details] environment
Created attachment 868619 [details] etc.clang.tar.xz
Created attachment 868620 [details] etc.portage.tar.xz
Created attachment 868621 [details] temp.tar.xz
Maybe this is a problem (cut out from your log file) ? /usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported." 79 | #error "C++ versions less than C++14 are not supported."
*** Bug 914768 has been marked as a duplicate of this bug. ***
In bug 914768 I've started to discuss possible solution for this problem. Although, starting with 8.0.17 it should be possible (see release notes[1]) to build with C++14 I failed to enable this option. append-cxxflags -std=c++14 is not working since cmake appends c++11 at the end. So I decided to try 8.1.0 that switched to c++17. Nevertheless, it fails to build with system protobuf as well. mysql-connector-c++ uses older protobuf, that defines log_handler function and LogLevel (s) that were removed in newer protobuf and thus compilation of mysql-connector-c++-8.1.0 fails with: ======================================= cd /var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src_build/cdk/protocol/mysqlx && /usr/bin/c++ -DCONCPP_BUILD_SHARED -I/var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src/cdk/include -I/var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src_build/cdk/include -I/var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src_build/cdk/protocol/mysqlx -I/var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src/cdk/extra/rapidjson/include -Wall -O2 -pipe -march=haswell -mtune=skylake -fdebug-prefix-map=/var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src=. -O2 -g -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -Wall -DRAPIDJSON_HAS_CXX11_NOEXCEPT=1 -DRAPIDJSON_HAS_CXX11_RANGE_FOR=1 -DRAPIDJSON_HAS_CXX11_RVALUE_REFS=1 -w -MD -MT cdk/protocol/mysqlx/CMakeFiles/cdk_proto_mysqlx.dir/protobuf/mysqlx.pb.cc.o -MF CMakeFiles/cdk_proto_mysqlx.dir/protobuf/mysqlx.pb.cc.o.d -o CMakeFiles/cdk_proto_mysqlx.dir/protobuf/mysqlx.pb.cc.o -c /var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src_build/cdk/protocol/mysqlx/protobuf/mysqlx.pb.cc /var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src/cdk/protocol/mysqlx/protocol.cc:120:13: ошибка: переменная или поле «log_handler» объявлено void 120 | static void log_handler(LogLevel level, const char* filename, int line, const std::string& message); | ^~~~~~~~~~~ /var/tmp/portage/portage/dev-db/mysql-connector-c++-8.1.0/work/mysql-connector-c++-8.1.0-src/cdk/protocol/mysqlx/protocol.cc:120:25: ошибка: нет декларации «LogLevel» в этой области видимости 120 | static void log_handler(LogLevel level, const char* filename, int line, const std::string& message); | ^~~~~~~~ ======================================= Now, if I disable system protobuf I've managed to build it successfully. So, I think a good solution for the problem will be bumping mysql-connector-c (ebuild works without modifications)/mysql-connector-c++ to 8.1.0 and disabling system protobuf. At least until upstream makes library work with newer protobuf. I'll attach ebuild patch that allowed me to build protobuf, but it needs more work. At least remove following cmake options that cmake reports as nonexistent: CMAKE_TOOLCHAIN_FILE WITH_BOOST Refs: [1] https://downloads.mysql.com/docs/connector-cpp-relnotes-en.pdf
Created attachment 871518 [details, diff] mysql-connector-c++-8.1.0.ebuild.patch
Created attachment 871519 [details, diff] mysql-connector-c++-8.1.0-library_loader.h.patch Also, I've needed this patch but it's a good idea to recheck and if the build without this patch fails we should report upstream.
I can confirm it built and runs with mysql-workbench with the patch and 8.1.0 uprade
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=312d85dd421b79117d0225b789a4b93dcc15bcae commit 312d85dd421b79117d0225b789a4b93dcc15bcae Author: Sam James <sam@gentoo.org> AuthorDate: 2023-10-14 08:30:24 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-14 08:30:47 +0000 dev-db/mysql-connector-c++: add 8.0.33 Closes: https://bugs.gentoo.org/912944 Signed-off-by: Sam James <sam@gentoo.org> dev-db/mysql-connector-c++/Manifest | 1 + .../mysql-connector-c++-8.0.33.ebuild | 45 ++++++++++++++++++++++ 2 files changed, 46 insertions(+)