Summary: | dev-db/mysql-connector-c++-8.0.32 - /.../span.h: error: Container was not declared in this scope | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo, harrisl, leonchik1976, peter.volkov |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 912819 | ||
Attachments: |
emerge-info.txt
CMakeCache.txt dev-db:mysql-connector-c++-8.0.32:20230824-034940.log emerge-history.txt environment etc.clang.tar.xz etc.portage.tar.xz temp.tar.xz mysql-connector-c++-8.1.0.ebuild.patch mysql-connector-c++-8.1.0-library_loader.h.patch |
Description
Toralf Förster
![]() 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(+) |