Bug 229605 - databases/mysql57-client fails to compile on 11.2-RELEASE (i386) (__atomic_load_8,__atomic_load_8 etc. unresolved)
Summary: databases/mysql57-client fails to compile on 11.2-RELEASE (i386) (__atomic_lo...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mahdi Mokhtari
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-08 14:21 UTC by gbromov
Modified: 2018-12-26 12:10 UTC (History)
10 users (show)

See Also:
mmokhi: maintainer-feedback+


Attachments
Patch for mysql57-server Makefile (530 bytes, patch)
2018-12-25 07:50 UTC, PitDron
pitdron: maintainer-approval? (mmokhi)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gbromov 2018-07-08 14:21:14 UTC
# uname -a
FreeBSD bsd 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:09:26 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386

/usr/ports/databases/mysql57-client# make MAKE_JOBS_UNSAFE=yes
... snipped ..
[ 98%] Linking CXX executable ../mysqlpump
cd /usr/ports/databases/mysql57-client/work/.build/client/dump && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/mysqlpump.dir/link.txt --verbose=1
/usr/bin/c++  -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -DDBUG_OFF    -fstack-protector CMakeFiles/mysqlpump.dir/program.cc.o  -o ../mysqlpump -Wl,-rpath,/usr/local/lib: -pthread ../../archive_output_directory/libmysqlpump_lib.a ../../archive_output_directory/libboost_lib.a ../../archive_output_directory/libclient_base.a ../../archive_output_directory/libmysqlclient.a -lz -lm -lrt -lexecinfo -lssl -lcrypto /usr/local/lib/liblz4.so -pthread
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::error(Mysql::Tools::Base::Message_data const&)':
program.cc:(.text+0x40d): undefined reference to `__atomic_store_8'
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::get_error_code()':
program.cc:(.text+0x98f): undefined reference to `__atomic_load_8'
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::Program()':
program.cc:(.text+0x13c0): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::queue_thread()':
object_queue.cc:(.text+0x25a): undefined reference to `__atomic_store_8'
object_queue.cc:(.text+0x271): undefined reference to `__atomic_load_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::stop_queue()':
object_queue.cc:(.text+0x374): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::~Object_queue()':
object_queue.cc:(.text+0x739): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::Object_queue(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*, unsigned int, Mysql::I_callable<void, bool>*, Mysql::Tools::Base::Abstract_program*)':
object_queue.cc:(.text+0xe41): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::Object_queue(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*, unsigned int, Mysql::I_callable<void, bool>*, Mysql::Tools::Base::Abstract_program*)':
object_queue.cc:(.text+0x107c): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(simple_id_generator.cc.o): In function `Mysql::Tools::Dump::Simple_id_generator::Simple_id_generator()':
simple_id_generator.cc:(.text+0x1a): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(simple_id_generator.cc.o): In function `Mysql::Tools::Dump::Simple_id_generator::create_id()':
simple_id_generator.cc:(.text+0x4a): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(standard_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Standard_progress_watcher::process_progress_step(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data&)':
standard_progress_watcher.cc:(.text+0x3c): undefined reference to `__atomic_load_8'
standard_progress_watcher.cc:(.text+0x6d): undefined reference to `__atomic_load_8'
standard_progress_watcher.cc:(.text+0x9a): undefined reference to `__atomic_load_8'
standard_progress_watcher.cc:(.text+0xc4): undefined reference to `__atomic_load_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_chain_element.cc.o): In function `Mysql::Tools::Dump::Abstract_chain_element::Abstract_chain_element(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*)':
abstract_chain_element.cc:(.text+0x7c): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_chain_element.cc.o): In function `Mysql::Tools::Dump::Abstract_chain_element::Abstract_chain_element(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*)':
abstract_chain_element.cc:(.text+0x189): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_crawler.cc.o): In function `Mysql::Tools::Dump::Abstract_crawler::process_dump_task(Mysql::Tools::Dump::I_dump_task*)':
abstract_crawler.cc:(.text+0x29a): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::progress_changed()':
abstract_progress_watcher.cc:(.text+0x29): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x113): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x1c0): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x1f0): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x201): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x21d): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x22a): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x246): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x253): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x281): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data::operator-(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data const&)':
abstract_progress_watcher.cc:(.text+0x2d3): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x2e5): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x2f7): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x304): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x315): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x328): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x348): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x35d): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x372): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x393): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x3a8): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x3bd): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data::operator=(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data const&)':
abstract_progress_watcher.cc:(.text+0x402): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x411): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x42b): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x43c): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x457): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x468): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::Abstract_progress_watcher(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*)':
abstract_progress_watcher.cc:(.text+0x4f4): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x506): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x518): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x52a): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o):abstract_progress_watcher.cc:(.text+0x53c): more undefined references to `__atomic_store_8' follow
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::object_processing_ended(Mysql::Tools::Dump::Item_processing_data*)':
abstract_progress_watcher.cc:(.text+0x6ee): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::new_chain_created(Mysql::Tools::Dump::Item_processing_data*)':
abstract_progress_watcher.cc:(.text+0x7b7): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x7d0): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x7e9): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data::Progress_data(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data const&)':
abstract_progress_watcher.cc:(.text+0x852): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x861): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x87b): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x88c): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x8a7): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x8b8): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data::Progress_data()':
abstract_progress_watcher.cc:(.text+0x8fc): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x90e): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x920): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_simple_dump_task.cc.o): In function `Mysql::Tools::Dump::Abstract_simple_dump_task::set_completed()':
abstract_simple_dump_task.cc:(.text+0x24): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_simple_dump_task.cc.o): In function `Mysql::Tools::Dump::Abstract_simple_dump_task::is_completed() const':
abstract_simple_dump_task.cc:(.text+0x5a): undefined reference to `__atomic_load_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_simple_dump_task.cc.o): In function `Mysql::Tools::Dump::Abstract_simple_dump_task::Abstract_simple_dump_task()':
abstract_simple_dump_task.cc:(.text+0xcb): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing_data::Item_processing_data(Mysql::Tools::Dump::Chain_data*, Mysql::Tools::Dump::I_dump_task*, Mysql::Tools::Dump::I_chain_element*, Mysql::I_callable<void, Mysql::Tools::Dump::Item_processing_data*> const*, Mysql::Tools::Dump::Item_processing_data*)':
item_processing_data.cc:(.text+0x3c): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing_data::start_processing()':
item_processing_data.cc:(.text+0xbe): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing_data::end_processing()':
item_processing_data.cc:(.text+0xee): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing_data::call_completion_callback_at_end()':
item_processing_data.cc:(.text+0x17b): undefined reference to `__atomic_load_8'
../../archive_output_directory/libclient_base.a(mysql_query_runner.cc.o): In function `Mysql::Tools::Base::Mysql_query_runner::Mysql_query_runner(st_mysql*)':
mysql_query_runner.cc:(.text+0x53): undefined reference to `__atomic_store_8'
../../archive_output_directory/libclient_base.a(mysql_query_runner.cc.o): In function `Mysql::Tools::Base::Mysql_query_runner::run_query(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)':
mysql_query_runner.cc:(.text+0x5bd): undefined reference to `__atomic_compare_exchange_8'
mysql_query_runner.cc:(.text+0x607): undefined reference to `__atomic_store_8'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/databases/mysql57-client/work/.build
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/databases/mysql57-client/work/.build
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/databases/mysql57-client/work/.build
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/databases/mysql57-client
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/mysql57-client
Comment 1 Isak Ben 2018-07-13 16:05:29 UTC
I'm experiencing the exact same issue on 11.2
Comment 2 Vladimir Botka 2018-07-13 17:28:41 UTC
+1
FreeBSD xxx.yyyyy.zzz 11.2-RELEASE FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:09:26 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
...
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::error(Mysql::Tools::Base::Message_data const&)':
program.cc:(.text+0x40d): undefined reference to `__atomic_store_8'
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::get_error_code()':
program.cc:(.text+0x98f): undefined reference to `__atomic_load_8'
...
Comment 3 Xavier Hsu 2018-07-25 08:35:34 UTC
FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:09:26 UTC 2018     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC

Just upgrade from 10.4-RELEASE-p9 to 11.2-RELEASE and got similar problem when I reinstall mysql57-server-5.7.22_2.

root@XXXXX:/usr/ports/databases/mysql57-server >make install
...skip...
--- client/mysqlpump ---
[100%] Linking CXX executable ../mysqlpump
cd /usr/ports/databases/mysql57-client/work/.build/client/dump && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/mysqlpu                               mp.dir/link.txt --verbose=1
/usr/bin/c++  -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -Wall                                -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-null-conversion -Wno-unused-private-field -O2                                -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -DDBUG_OFF    -fstack-pr                               otector CMakeFiles/mysqlpump.dir/program.cc.o  -o ../mysqlpump -Wl,-rpath,/usr/local/lib: -pthread ../../archive_output_direct                               ory/libmysqlpump_lib.a ../../archive_output_directory/libboost_lib.a ../../archive_output_directory/libclient_base.a ../../arc                               hive_output_directory/libmysqlclient.a -lz -lm -lrt -lexecinfo -lssl -lcrypto /usr/local/lib/liblz4.so -pthread
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::error(Mysql::Tools::Base::Message_data const&                               )':
program.cc:(.text+0x40d): undefined reference to `__atomic_store_8'
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::get_error_code()':
program.cc:(.text+0x98f): undefined reference to `__atomic_load_8'
CMakeFiles/mysqlpump.dir/program.cc.o: In function `Mysql::Tools::Dump::Program::Program()':
program.cc:(.text+0x13c0): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::queue_thr                               ead()':
object_queue.cc:(.text+0x25a): undefined reference to `__atomic_store_8'
object_queue.cc:(.text+0x271): undefined reference to `__atomic_load_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::stop_queu                               e()':
object_queue.cc:(.text+0x374): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::~Object_q                               ueue()':
object_queue.cc:(.text+0x739): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::Object_qu                               eue(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*, unsigned int,                                Mysql::I_callable<void, bool>*, Mysql::Tools::Base::Abstract_program*)':
object_queue.cc:(.text+0xe41): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(object_queue.cc.o): In function `Mysql::Tools::Dump::Object_queue::Object_qu                               eue(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simple_id_generator*, unsigned int,                                Mysql::I_callable<void, bool>*, Mysql::Tools::Base::Abstract_program*)':
object_queue.cc:(.text+0x107c): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(simple_id_generator.cc.o): In function `Mysql::Tools::Dump::Simple_id_genera                               tor::Simple_id_generator()':
simple_id_generator.cc:(.text+0x1a): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(simple_id_generator.cc.o): In function `Mysql::Tools::Dump::Simple_id_genera                               tor::create_id()':
simple_id_generator.cc:(.text+0x4a): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(standard_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Standard_p                               rogress_watcher::process_progress_step(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data&)':
standard_progress_watcher.cc:(.text+0x3c): undefined reference to `__atomic_load_8'
standard_progress_watcher.cc:(.text+0x6d): undefined reference to `__atomic_load_8'
standard_progress_watcher.cc:(.text+0x9a): undefined reference to `__atomic_load_8'
standard_progress_watcher.cc:(.text+0xc4): undefined reference to `__atomic_load_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_chain_element.cc.o): In function `Mysql::Tools::Dump::Abstract_chai                               n_element::Abstract_chain_element(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simpl                               e_id_generator*)':
abstract_chain_element.cc:(.text+0x7c): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_chain_element.cc.o): In function `Mysql::Tools::Dump::Abstract_chai                               n_element::Abstract_chain_element(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Dump::Simpl                               e_id_generator*)':
abstract_chain_element.cc:(.text+0x189): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_crawler.cc.o): In function `Mysql::Tools::Dump::Abstract_crawler::p                               rocess_dump_task(Mysql::Tools::Dump::I_dump_task*)':
abstract_crawler.cc:(.text+0x29a): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::progress_changed()':
abstract_progress_watcher.cc:(.text+0x29): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x113): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x1c0): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x1f0): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x201): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x21d): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x22a): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x246): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x253): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x281): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::Progress_data::operator-(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data const&)':
abstract_progress_watcher.cc:(.text+0x2d3): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x2e5): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x2f7): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x304): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x315): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x328): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x348): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x35d): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x372): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x393): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x3a8): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x3bd): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::Progress_data::operator=(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data const&)':
abstract_progress_watcher.cc:(.text+0x402): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x411): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x42b): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x43c): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x457): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x468): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::Abstract_progress_watcher(Mysql::I_callable<bool, Mysql::Tools::Base::Message_data const&>*, Mysql::Tools::Du                               mp::Simple_id_generator*)':
abstract_progress_watcher.cc:(.text+0x4f4): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x506): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x518): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x52a): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o):abstract_progress_watcher.cc:(.text+0x53c):                                more undefined references to `__atomic_store_8' follow
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::object_processing_ended(Mysql::Tools::Dump::Item_processing_data*)':
abstract_progress_watcher.cc:(.text+0x6ee): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::new_chain_created(Mysql::Tools::Dump::Item_processing_data*)':
abstract_progress_watcher.cc:(.text+0x7b7): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x7d0): undefined reference to `__atomic_fetch_add_8'
abstract_progress_watcher.cc:(.text+0x7e9): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::Progress_data::Progress_data(Mysql::Tools::Dump::Abstract_progress_watcher::Progress_data const&)':
abstract_progress_watcher.cc:(.text+0x852): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x861): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x87b): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x88c): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x8a7): undefined reference to `__atomic_load_8'
abstract_progress_watcher.cc:(.text+0x8b8): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_progress_watcher.cc.o): In function `Mysql::Tools::Dump::Abstract_p                               rogress_watcher::Progress_data::Progress_data()':
abstract_progress_watcher.cc:(.text+0x8fc): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x90e): undefined reference to `__atomic_store_8'
abstract_progress_watcher.cc:(.text+0x920): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_simple_dump_task.cc.o): In function `Mysql::Tools::Dump::Abstract_s                               imple_dump_task::set_completed()':
abstract_simple_dump_task.cc:(.text+0x24): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_simple_dump_task.cc.o): In function `Mysql::Tools::Dump::Abstract_s                               imple_dump_task::is_completed() const':
abstract_simple_dump_task.cc:(.text+0x5a): undefined reference to `__atomic_load_8'
../../archive_output_directory/libmysqlpump_lib.a(abstract_simple_dump_task.cc.o): In function `Mysql::Tools::Dump::Abstract_s                               imple_dump_task::Abstract_simple_dump_task()':
abstract_simple_dump_task.cc:(.text+0xcb): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing                               _data::Item_processing_data(Mysql::Tools::Dump::Chain_data*, Mysql::Tools::Dump::I_dump_task*, Mysql::Tools::Dump::I_chain_ele                               ment*, Mysql::I_callable<void, Mysql::Tools::Dump::Item_processing_data*> const*, Mysql::Tools::Dump::Item_processing_data*)':
item_processing_data.cc:(.text+0x3c): undefined reference to `__atomic_store_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing                               _data::start_processing()':
item_processing_data.cc:(.text+0xbe): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing                               _data::end_processing()':
item_processing_data.cc:(.text+0xee): undefined reference to `__atomic_fetch_add_8'
../../archive_output_directory/libmysqlpump_lib.a(item_processing_data.cc.o): In function `Mysql::Tools::Dump::Item_processing                               _data::call_completion_callback_at_end()':
item_processing_data.cc:(.text+0x17b): undefined reference to `__atomic_load_8'
../../archive_output_directory/libclient_base.a(mysql_query_runner.cc.o): In function `Mysql::Tools::Base::Mysql_query_runner:                               :Mysql_query_runner(st_mysql*)':
mysql_query_runner.cc:(.text+0x53): undefined reference to `__atomic_store_8'
../../archive_output_directory/libclient_base.a(mysql_query_runner.cc.o): In function `Mysql::Tools::Base::Mysql_query_runner:                               :run_query(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)':
mysql_query_runner.cc:(.text+0x5bd): undefined reference to `__atomic_compare_exchange_8'
mysql_query_runner.cc:(.text+0x607): undefined reference to `__atomic_store_8'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [client/mysqlpump] Error code 1

make[6]: stopped in /usr/ports/databases/mysql57-client/work/.build
1 error

make[6]: stopped in /usr/ports/databases/mysql57-client/work/.build
*** [client/dump/CMakeFiles/mysqlpump.dir/all] Error code 2

make[5]: stopped in /usr/ports/databases/mysql57-client/work/.build
1 error

make[5]: stopped in /usr/ports/databases/mysql57-client/work/.build
*** [all] Error code 2

make[4]: stopped in /usr/ports/databases/mysql57-client/work/.build
1 error

make[4]: stopped in /usr/ports/databases/mysql57-client/work/.build
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/databases/mysql57-client
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/databases/mysql57-client
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/databases/mysql57-server
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/mysql57-server
Comment 4 Martin Birgmeier 2018-08-03 10:11:05 UTC
Do you still have gcc6 installed?

-- Martin
Comment 5 gbromov 2018-08-03 10:18:14 UTC
(In reply to Martin Birgmeier from comment #4)
I am not sure whether the question is for me, but I don't have gcc at all on my machine.

`c++ -v` reports:
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Target: i386-unknown-freebsd11.2
Thread model: posix
InstalledDir: /usr/bin

Also I've tried a fresh x86 installation in virtual box and the compilation fails there as well.
Comment 6 Martin Birgmeier 2018-08-03 10:30:09 UTC
Sorry, this was a wrong lead. For a while I thought removing gcc6 solved the situation for me, but it does not.

-- Martin
Comment 7 Bernard Spil freebsd_committer 2018-08-10 15:01:58 UTC
This has previously been fixed for MariaDB, perhaps the solution can be adopted for MySQL too?

https://jira.mariadb.org/browse/MDEV-9627
Comment 8 Alan Hicks 2018-08-12 10:44:22 UTC
This appears to be a known issue "Don't generate inline atomics for i386/i486"
https://reviews.llvm.org/D42154
It's been fixed but didn't make it to 6.01
Choices appear to be patch or wait for 6.02
Comment 9 Yuri Victorovich freebsd_committer 2018-09-15 03:48:19 UTC
The port science/openmx also fails on 11i386 and 12i386 (but not on 10i386) with undefined reference to `__atomic_load'.

See http://beefy10.nyi.freebsd.org/data/111i386-default/479660/logs/openmx-3.8.5.log

Additionally, astro/siril, graphics/gmic, science/qmcpack, science/gabedit are labeled as BROKEN on i386 for the same reason.
Comment 10 Xavier Hsu 2018-10-25 04:23:09 UTC
I give up FreeBSD 11.2 i386, install amd64 and everything is fine. :(
Comment 11 Bernard Spil freebsd_committer 2018-10-27 23:56:10 UTC
(In reply to Xavier Hsu from comment #10)
That is not a bad strategy when your hardware is 64-bit
Comment 12 Isak Ben 2018-11-29 00:06:44 UTC
Is there no one maintaining this port ?
Should we expect a resolution this year ?
Comment 13 Walter Schwarzenfeld freebsd_triage 2018-11-29 01:00:53 UTC
Maybe, it helps - I cannont test it (cause ca_root_nss failed in i386 jail)

database/redis has:
.if ${ARCH} == i386 && ! ${CFLAGS:M-march=*}
# Needed for __atomic_fetch_add_8
USE_GCC=        yes
CFLAGS+=        -march=i586
.endif

maybe it solves it also with mysql57.
Comment 14 Walter Schwarzenfeld freebsd_triage 2018-11-29 06:14:34 UTC
No, does not work. Ends with "unsupported compiler".
Comment 15 Alan Hicks 2018-11-29 11:29:20 UTC
Maybe this is how i386 fades away, no support in clang 7 or trunk.
Comment 16 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-11-29 17:15:45 UTC
(In reply to Isak Ben from comment #12)
Hi Isak,
Sorry for the inconvinent you are facing.
It's a about (more than a) month I'm trying with help of upstream ppl to see how exactly it's fixable...
I proposed this however longer time ago (https://reviews.freebsd.org/D14223) it might fix (with more recent changes nowadays I see it locally satisfies my tests even after build).
But as you see this is a more in-depth kind of changes on the freebsd-base rather than MySQL itself and it's still needs review of src-ppl (at least I personally had more ports of this kind of failure, on one of them even the upstream fix was 'not using '__atomic'-ops on i386 of freebsd ``:D)...

In meanwhile I welcome if you have ideas to fix it in a quicker way (even if it's temporary workaround).

Again, I apologize if you felt port is not being maintained well and I hope at least it's amd64 works well for you `:D
Comment 17 Isak Ben 2018-11-29 23:05:47 UTC
(In reply to Mahdi Mokhtari from comment #16)
 
Didn’t mean a to make little of the effort, just hadn’t seen a maintainers response or in depth explanation of the actual problem and therefor wondered if it was abandoned. 

I think I will swap over to amd64 ;)
Comment 18 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-11-29 23:17:33 UTC
(In reply to Isak Ben from comment #17)
> Didn’t mean a to make little of the effort, just hadn’t seen a maintainers response or in depth explanation of the actual problem and therefor wondered if it was abandoned. 

Again, I apologize, I should have reported/elaborated what's happening sooner `:)
Feel free to follow the review on freebsd-base for example :)

> I think I will swap over to amd64 ;)

Yup, I guess adds more other supported-ports on your stack :D
Comment 19 wener 2018-12-09 07:10:23 UTC
Nothing new? I'am stuck here with a (pre) production machine after upgrading it to FBSD1.2. I need mysql-derver57 desperately .... no workaround?
regards
Comment 20 PitDron 2018-12-24 14:40:48 UTC
Try this:

cd /usr/ports/databases/mysql57-client
make clean patch
echo 'SET(HAVE_GCC_ATOMIC_BUILTINS CACHE  INTERNAL "")'>>work/mysql-5.7.*/cmake/os/FreeBSD.cmake
make

If build is success, try build server:

cd /usr/ports/databases/mysql57-server
make clean patch
echo 'SET(HAVE_GCC_ATOMIC_BUILTINS CACHE  INTERNAL "")'>>work/mysql-5.7.*/cmake/os/FreeBSD.cmake
make
Comment 21 PitDron 2018-12-25 07:50:41 UTC
Created attachment 200483 [details]
Patch for mysql57-server Makefile

This patch work for me.
Comment 22 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-12-25 22:10:21 UTC
(In reply to PitDron from comment #21)
Dear PitDron,
Thanks for the idea/patch.
It actually seems good work-around at the moment for the problem.
[The main cause is still there, for more info look at: PR#230888]

I'm testing it at the moment to ensure about not causing anything astonishing for users other platforms.
Comment 23 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-12-25 22:22:44 UTC
@PitDron Working more with the patch, I think it might be better not doing it on the Makefile, it helps the upstreaming later and lets all FreeBSD-related configurations stay in more understandable manner for upstream.

But of course the main idea of "HAVE_GCC_ATOMIC_BUILTINS" as you suggested will be the same :)
Comment 24 commit-hook freebsd_committer 2018-12-26 12:02:47 UTC
A commit references this bug:

Author: mmokhi
Date: Wed Dec 26 12:01:58 UTC 2018
New revision: 488371
URL: https://svnweb.freebsd.org/changeset/ports/488371

Log:
  databases/mysql57-client: Fix build for i386
  Make MySQL build-script assume that FreeBSD's Clang (on i386)
  doesn't have "atomic_*" functions builtin implemented.
  This is added to cmake/os/FreeBSD.cmake to make the merge for upstream easier.

  This fixes the build of mysql57-client on the i386 again.

  PR:		229605
  Submitted by:	PitDron <pitdron@gmail.com>
  Reported by:	gbromov@gmail.com
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/databases/mysql57-client/Makefile
  head/databases/mysql57-client/files/patch-cmake_os_FreeBSD.cmake
Comment 25 commit-hook freebsd_committer 2018-12-26 12:09:02 UTC
A commit references this bug:

Author: mmokhi
Date: Wed Dec 26 12:08:25 UTC 2018
New revision: 488374
URL: https://svnweb.freebsd.org/changeset/ports/488374

Log:
  databases/mysql57-server: Fix build for i386
  Make MySQL build-script assume that FreeBSD's Clang (on i386)
  doesn't have "atomic_*" functions builtin implemented.
  This is added to cmake/os/FreeBSD.cmake to make the merge for upstream easier.

  PR:		229605
  Reported by:	gbromov@gmail.com
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/databases/mysql57-server/Makefile
  head/databases/mysql57-server/files/patch-cmake_os_FreeBSD.cmake
Comment 26 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-12-26 12:10:37 UTC
Committed with changes I wrote above :)
Thanks everybody for patience and helps.