LINUX.ORG.RU

«undefined reference to» при сборке mysql-5.6

 , ,


0

1

Решил тут, впервые за последние лет 8 покрасноглазить с MySQL. Захотелось странного — отложенной репликации. А она только в 5.6 появилась.

Ну, дело не хитрое — Gentoo в LXC, оверлей layman mysql… Но, зараза, при компиляции сыплет ошибки линковки (как я полагаю):

/usr/bin/x86_64-pc-linux-gnu-g++   -O2 -pipe -march=barcelona -mmmx -msse -msse2 -msse4a -m3dnow -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-strict-aliasing  -Wall -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF   -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic CMakeFiles/mysqld.dir/main.cc.o  -o mysqld  -lpthread libsql.a libbinlog.a librpl.a libmaster.a libslave.a libsql.a ../mysys/libmysys.a ../mysys_ssl/libmysys_ssl.a ../storage/myisammrg/libmyisammrg.a ../storage/heap/libheap.a ../storage/perfschema/libperfschema.a ../storage/innobase/libinnobase.a -laio ../storage/myisam/libmyisam.a ../storage/csv/libcsv.a ../storage/blackhole/libblackhole.a ../storage/archive/libarchive.a libpartition.a ../mysys/libmysys.a ../dbug/libdbug.a ../mysys/libmysys.a ../dbug/libdbug.a -lz -lm -lrt ../strings/libstrings.a ../vio/libvio.a ../regex/libregex.a -lcrypt -lssl -lcrypto -ldl -lpthread 
Linking CXX executable pfs_connect_attr-t
cd /var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql-5.6.7_rc_build/storage/perfschema/unittest && /usr/bin/cmake -E cmake_link_script CMakeFiles/pfs_connect_attr-t.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++   -O2 -pipe -march=barcelona -mmmx -msse -msse2 -msse4a -m3dnow -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-strict-aliasing  -Wall -Wno-unused-parameter -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF   -Wl,-O1 -Wl,--as-needed CMakeFiles/pfs_connect_attr-t.dir/pfs_connect_attr-t.cc.o  -o pfs_connect_attr-t  -lpthread ../../../unittest/mytap/libmytap.a ../libperfschema.a ../../../sql/libsql.a ../../../sql/libbinlog.a ../../../sql/librpl.a ../../../sql/libmaster.a ../../../sql/libslave.a ../../../sql/libsql.a ../../../mysys/libmysys.a ../../../mysys_ssl/libmysys_ssl.a ../../../vio/libvio.a -lssl -lcrypto -ldl ../libperfschema.a ../../myisammrg/libmyisammrg.a ../../heap/libheap.a ../../innobase/libinnobase.a -laio ../../myisam/libmyisam.a ../../csv/libcsv.a ../../blackhole/libblackhole.a ../../archive/libarchive.a ../../../sql/libpartition.a ../../../mysys/libmysys.a ../../../dbug/libdbug.a ../../../mysys/libmysys.a ../../../dbug/libdbug.a -lz -lm -lrt ../../../strings/libstrings.a ../../../regex/libregex.a -lcrypt -lssl -lcrypto -ldl -lpthread 
../libperfschema.a(pfs_instr.cc.o): In function `memset':
/usr/include/bits/string3.h:82: warning: memset used with constant zero length parameter; this could be due to transposed parameters
../../innobase/libinnobase.a(handler0alter.cc.o): In function `innobase_undo_add_fk':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/handler/handler0alter.cc:4214: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/handler/handler0alter.cc:4221: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
../../innobase/libinnobase.a(handler0alter.cc.o): In function `ha_innobase::commit_inplace_alter_table(TABLE*, Alter_inplace_info*, bool)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/handler/handler0alter.cc:4383: undefined reference to `void ut_list_append<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/handler/handler0alter.cc:4389: undefined reference to `void ut_list_append<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
../../innobase/libinnobase.a(handler0alter.cc.o): In function `innobase_undo_add_fk':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/handler/handler0alter.cc:4214: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/handler/handler0alter.cc:4221: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
../../innobase/libinnobase.a(row0log.cc.o): In function `std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> >::find(unsigned long const&) const':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_set.h:589: undefined reference to `std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>, std::allocator<unsigned long> >::find(unsigned long const&) const'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_set.h:589: undefined reference to `std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>, std::allocator<unsigned long> >::find(unsigned long const&) const'
../../innobase/libinnobase.a(row0log.cc.o): In function `~_Rb_tree':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_tree.h:614: undefined reference to `std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>, std::allocator<unsigned long> >::_M_erase(std::_Rb_tree_node<unsigned long>*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_tree.h:614: undefined reference to `std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>, std::allocator<unsigned long> >::_M_erase(std::_Rb_tree_node<unsigned long>*)'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_tree.h:614: undefined reference to `std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>, std::allocator<unsigned long> >::_M_erase(std::_Rb_tree_node<unsigned long>*)'
../../innobase/libinnobase.a(row0log.cc.o): In function `std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> >::insert(unsigned long const&)':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/bits/stl_set.h:408: undefined reference to `std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>, std::allocator<unsigned long> >::_M_insert_unique(unsigned long const&)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `ut_list_insert<ut_list_base<trx_t>, trx_t>':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:212: undefined reference to `ut_list_node<trx_t>& ut_elem_get_node<trx_t>(trx_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:213: undefined reference to `ut_list_node<trx_t>& ut_elem_get_node<trx_t>(trx_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:220: undefined reference to `ut_list_node<trx_t>& ut_elem_get_node<trx_t>(trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `ut_list_append<ut_list_base<trx_t>, trx_t>':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:165: undefined reference to `ut_list_node<trx_t>& ut_elem_get_node<trx_t>(trx_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:172: undefined reference to `ut_list_node<trx_t>& ut_elem_get_node<trx_t>(trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_start_low':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:744: undefined reference to `void ut_list_prepend<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:753: undefined reference to `void ut_list_prepend<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_allocate_for_mysql()':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:184: undefined reference to `void ut_list_prepend<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_commit(trx_t*)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:1116: undefined reference to `void ut_list_remove<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:1120: undefined reference to `void ut_list_remove<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_cleanup_at_db_startup(trx_t*)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:1255: undefined reference to `void ut_list_remove<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_free_for_mysql(trx_t*)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:323: undefined reference to `void ut_list_remove<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_list_rw_insert_ordered':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:370: undefined reference to `void ut_list_prepend<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(trx0trx.cc.o): In function `trx_free_prepared(trx_t*)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/trx/trx0trx.cc:305: undefined reference to `void ut_list_remove<ut_list_base<trx_t>, trx_t>(ut_list_base<trx_t>&, trx_t&, unsigned long)'
../../innobase/libinnobase.a(buf0buf.cc.o): In function `ut_list_insert<ut_list_base<buf_page_t>, buf_page_t>':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:212: undefined reference to `ut_list_node<buf_page_t>& ut_elem_get_node<buf_page_t>(buf_page_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:213: undefined reference to `ut_list_node<buf_page_t>& ut_elem_get_node<buf_page_t>(buf_page_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:220: undefined reference to `ut_list_node<buf_page_t>& ut_elem_get_node<buf_page_t>(buf_page_t&, unsigned long)'
../../innobase/libinnobase.a(buf0buf.cc.o): In function `ut_list_append<ut_list_base<buf_page_t>, buf_page_t>':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:165: undefined reference to `ut_list_node<buf_page_t>& ut_elem_get_node<buf_page_t>(buf_page_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:172: undefined reference to `ut_list_node<buf_page_t>& ut_elem_get_node<buf_page_t>(buf_page_t&, unsigned long)'
../../innobase/libinnobase.a(buf0buf.cc.o):/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/include/ut0lst.h:122: more undefined references to `ut_list_node<buf_page_t>& ut_elem_get_node<buf_page_t>(buf_page_t&, unsigned long)' follow
../../innobase/libinnobase.a(dict0dict.cc.o): In function `dict_foreign_remove_from_cache':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:2997: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:3003: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:2997: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:3003: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:2997: undefined reference to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
../../innobase/libinnobase.a(dict0dict.cc.o):/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:3003: more undefined references to `void ut_list_remove<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)' follow
../../innobase/libinnobase.a(dict0dict.cc.o): In function `dict_foreign_add_to_cache(dict_foreign_t*, unsigned long)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:3217: undefined reference to `void ut_list_append<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:3261: undefined reference to `void ut_list_append<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
../../innobase/libinnobase.a(dict0dict.cc.o): In function `dict_create_foreign_constraints_low':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:4430: undefined reference to `void ut_list_append<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/storage/innobase/dict/dict0dict.cc:4435: undefined reference to `void ut_list_append<ut_list_base<dict_foreign_t>, dict_foreign_t>(ut_list_base<dict_foreign_t>&, dict_foreign_t&, unsigned long)'
../../../sql/libsql.a(field.cc.o): In function `Field_enum::make_sort_key(unsigned char*, unsigned int)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/sql/field.cc:8525: undefined reference to `void copy_integer<false>(unsigned char*, int, unsigned char const*, int, bool)'
../../../sql/libsql.a(field.cc.o): In function `Field_datetime::make_sort_key(unsigned char*, unsigned int)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/sql/field.cc:6386: undefined reference to `void copy_integer<false>(unsigned char*, int, unsigned char const*, int, bool)'
../../../sql/libsql.a(field.cc.o): In function `Field_longlong::make_sort_key(unsigned char*, unsigned int)':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/sql/field.cc:4145: undefined reference to `void copy_integer<false>(unsigned char*, int, unsigned char const*, int, bool)'
../../../sql/libsql.a(filesort.cc.o): In function `find_all_keys':
/var/tmp/portage/dev-db/mysql-5.6.7_rc/work/mysql/sql/filesort.cc:795: undefined reference to `Bounded_queue<unsigned char, unsigned char>::push(unsigned char*)'

…
…
…

Есть мысли, что где подкрутить нужно? Всё из arch, может, поэтому? Попробовать в варианта ~arch?

А, может, есть какой-то ppa с готовым mysql-5.6 под Debian/Ubuntu? Мне пофиг, что в LXC заводить :) Можно хоть Arch под такое дело :)

★★★★★

Ответ на: комментарий от KRoN73

там есть и deb и tar.gz и даже exe, на любой вкус ) главное найти чуть чуть выше переключалку )

kam ★★ ()

хардмаск и совсем тестинг.. Джоржа уже пнул по этому поводу?

P.S. щас попробую у себя поставить, правда на ~arch.

qnikst ★★★★★ ()

и попробуй: mysql-5.6.2_alpha_pre5.ebuild т.к. rc, это из гита соотв собираемость в нём гарантировать немного сложно.

qnikst ★★★★★ ()
Ответ на: комментарий от qnikst

хотя одна фигня.. в общем + на b.g.o висит ебилд, если заработает - пни разберёмся, не был бы ты Кроном, я бы постарался разобраться до конца :).

qnikst ★★★★★ ()
Ответ на: комментарий от qnikst

На домашней машине (тоже, в основном, arch) тоже 5.6.2 собрался без проблем.

При чём я протормозил, на сервере с LXC можно было не извращаться, так как всё равно отложенная репликация реализуется слейвом, так что можно было только дома обновлять. Впрочем, я планирую мастер-мастер делать, в этом случае 5.6 на сервере тоже будет полезен, чтобы домашнюю машину постоянно не дёргать.

Вчера мастер-слейв запустил, работает.

KRoN73 ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.