stl_list undefined error in compiling mysql

Edward Peschko horos11@gmail.com
Mon Sep 9 04:33:00 GMT 2013


All,

Got the following error in compiling the latest version of mysql
(mysql-5.6.13). I'm not sure if this is a gcc problem or a mysql
problem, but it looked very standard library related, so I thought I'd
point it out here.

I look at the stl_list.h file and see it is in an #if block, with

#if __cplusplus >= 201103L

#

evaluating as false even though the version of gcc is 4.8.1. Doing a:

gcc -dM -E /tmp/test.p

shows __cplusplus defined as:

#define __cplusplus 199711L

which is clearly wrong for 4.8.1 (isn't it?)

Any assistance on parsing or dealing with this error would be very
much appreciated - just tried the alternate block in stl_ist.h without
success.

Ed

../../innobase/libinnobase.a(fil0fil.cc.o): In function
`std::list<char const*, std::allocator<char const*>
>::_M_insert(std::_List_iterator<char const*>, char co
nst* const&)':
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
../../../sql/libsql.a(handler.cc.o): In function `std::list<char
const*, std::allocator<char const*>
>::_M_insert(std::_List_iterator<char const*>, char const* co
nst&)':
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
../../../sql/libsql.a(mysqld.cc.o): In function `std::list<THD*,
std::allocator<THD*> >::_M_insert(std::_List_iterator<THD*>, THD*
const&)':
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
../../../sql/libsql.a(mysqld.cc.o): In function `std::list<THD*,
std::allocator<THD*> >::_M_erase(std::_List_iterator<THD*>)':
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1570: undefined
reference to `std::__detail::_List_node_base::_M_unhook()'
../../../sql/libbinlog.a(binlog.cc.o): In function
`std::list<std::string, std::allocator<std::string>
>::_M_insert(std::_List_iterator<std::string>, std::string
const&)':
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
/pub/tools/centos_64/include/c++/4.8.1/bits/stl_list.h:1554: undefined
reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'



More information about the Gcc-bugs mailing list