Thanks a lot for response, here are the logs
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'getopt_double_limit_value(double, my_option const*, bool*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_handle_options2(int*, char***, my_option const*, bool (*)(int, my_option const*, char*), char const**, bool, bool)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_getopt_skip_unknown'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_getopt_print_errors'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'disabled_my_option'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_handle_options(int*, char***, my_option const*, bool (*)(int, my_option const*, char*), char const**, bool)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'handle_options'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_cleanup_options(my_option const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_print_help(my_option const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_print_variables_ex(my_option const*, _IO_FILE*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): multiple definition of 'my_print_variables(my_option const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getopt.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_hkdf_function::derive_key(unsigned char const*, unsigned int, unsigned char*, unsigned int)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_pbkdf2_hmac_function::derive_key(unsigned char const*, unsigned int, unsigned char*, unsigned int)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_hkdf_function::Key_hkdf_function(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_hkdf_function::Key_hkdf_function(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_pbkdf2_hmac_function::Key_pbkdf2_hmac_function(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_pbkdf2_hmac_function::Key_pbkdf2_hmac_function(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'create_kdf_key(unsigned char const*, unsigned int, unsigned char*, unsigned int, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_hkdf_function::validate_options()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): multiple definition of 'Key_pbkdf2_hmac_function::validate_options()'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_kdf.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getpwnam.cc.o): multiple definition of 'my_getpwnam(char const*)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getpwnam.cc.o): previous definition here
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: error: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getpwnam.cc.o): multiple definition of 'my_getpwuid(unsigned int)'
/opt/rh/gcc-toolset-12/root/usr/bin/ld.gold: /root/rpmbuild/BUILD/percona-server-8.0.40-31/release/archive_output_directory/libmysqlclient.a(my_getpwnam.cc.o): previous definition here
../../generated/protobuf/mysqlx_connection.pb.cc:541: error: undefined reference to 'google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20230802::once_flag*, google::protobuf::Metadata const&)'
../../generated/protobuf/mysqlx_connection.pb.cc:715: error: undefined reference to 'google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20230802::once_flag*, google::protobuf::Metadata const&)'
../../generated/protobuf/mysqlx_connection.pb.cc:754: error: undefined reference to 'google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20230802::once_flag*, google::protobuf::Metadata const&)'
../../generated/protobuf/mysqlx_connection.pb.cc:961: error: undefined reference to 'google::protobuf::internal::AssignDescriptors(google::protobuf::internal::DescriptorTable const* (*)(), absl::lts_20230802::once_flag*, google::protobuf::Metadata const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [mysql-secret-store/login-path/CMakeFiles/mysql-secret-store-login-path.dir/build.make:155: bin/mysql-secret-store-login-path] Error 1
make[1]: *** [CMakeFiles/Makefile2:2118: mysql-secret-store/login-path/CMakeFiles/mysql-secret-store-login-path.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 99%] Built target api_modules_objlib
make: *** [Makefile:156: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7703Pe (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.7703Pe (%build)
I have few other clarifications
- I saw that percona shell have build wrapper commands for xtrabackup is that correct, won’t using mysql shell cause failures.
- If you can guide me with exact cmake flags used to build percona mysql8.0 server and then the way source code is provided to the percona client and then what cmake flags does percona shell build needs. As these info are open source, should be okay to provide.