http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52887
--- Comment #21 from Daniel Richard G. <skunk at iskunk dot org> 2012-07-25 03:18:32 UTC --- (In reply to comment #18) > Maybe the <regex> code is non-functional, but *something* is referencing the > symbol under certain circumstances. I figure this is a question worth answering. Repeating the failed link with -Wl,-bnoquiet gives some helpful information: ld: 0711-318 ERROR: Undefined symbols were found. The following symbols are in error: Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object} RLD: Address Section Rld-type Referencing Symbol ---------------------------------------------------------------------------------------------- .std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)>::function(std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)> const&) [146] ER PR /home/src/gcc-4.7.1/libstdc++-v3/src/c++11/regex.cc(/tmp/gcc-build/prev-powerpc-ibm-aix5.3.0.0/libstdc++-v3/src/.libs/libstdc++.a[regex.o]) 00002918 .text R_RBR [3582] .std::__regex::_State::_State(std::__regex::_State const&) .std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)>::function(std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)> const&) [276] ER PR /home/src/gcc-4.7.1/libstdc++-v3/src/c++11/functexcept.cc(/tmp/gcc-build/prev-powerpc-ibm-aix5.3.0.0/libstdc++-v3/src/.libs/libstdc++.a[functexcept.o]) 00003e18 .text R_RBR [4312] .std::__regex::_State::_State(std::__regex::_State const&) .std::function<bool (std::__regex::_PatternCursor const&)>::function(std::function<bool (std::__regex::_PatternCursor const&)> const&) [148] ER PR /home/src/gcc-4.7.1/libstdc++-v3/src/c++11/regex.cc(/tmp/gcc-build/prev-powerpc-ibm-aix5.3.0.0/libstdc++-v3/src/.libs/libstdc++.a[regex.o]) 00002938 .text R_RBR [3582] .std::__regex::_State::_State(std::__regex::_State const&) .std::function<bool (std::__regex::_PatternCursor const&)>::function(std::function<bool (std::__regex::_PatternCursor const&)> const&) [278] ER PR /home/src/gcc-4.7.1/libstdc++-v3/src/c++11/functexcept.cc(/tmp/gcc-build/prev-powerpc-ibm-aix5.3.0.0/libstdc++-v3/src/.libs/libstdc++.a[functexcept.o]) 00003e38 .text R_RBR [4312] .std::__regex::_State::_State(std::__regex::_State const&) ER: The return code is 8. ld: 0711-317 ERROR: Undefined symbol: .std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)>::function(std::function<void (std::__regex::_PatternCursor const&, std::__regex::_Results&)> const&) ld: 0711-317 ERROR: Undefined symbol: .std::function<bool (std::__regex::_PatternCursor const&)>::function(std::function<bool (std::__regex::_PatternCursor const&)> const&) collect2: error: ld returned 8 exit status