[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#578831: link failure with LTO: “invalid DSO for symbol `pthread_cancel@@GLIBC_2.0' definition”



On Tue, Jun 22, 2010 at 02:53:24PM +0200, Matthias Klose wrote:
> please recheck with the current g++-4.5 in experimental.  -lpthread
> shouldn't be used directly, but pass -pthread to both CXXFLAGS and
> LDFLAGS.

Pretty much no change. With CXXFLAGS including -pthread and LDFLAGS including
-pthread -flto -fwhole-program:

  script/script.a(curve.o): In function `_ZN6script5Curve13make_tangentsEv':
  curve.cpp:(.text._ZN6script5Curve13make_tangentsEv+0x3f2): undefined reference to `_ZN6script6engine13get_num_paramENS_5Curve8knottypeE'
  script/script.a(curve.o): In function `_ZN6script5Curve9get_valueEfPf':
  curve.cpp:(.text._ZN6script5Curve9get_valueEfPf+0x226): undefined reference to `_ZN6script6engine7targetsE'
  curve.cpp:(.text._ZN6script5Curve9get_valueEfPf+0x236): undefined reference to `_ZN6script6engine8texturesE'
  curve.cpp:(.text._ZN6script5Curve9get_valueEfPf+0x262): undefined reference to `_ZN6script6engine6meshesE'
  curve.cpp:(.text._ZN6script5Curve9get_valueEfPf+0x28b): undefined reference to `_ZN6script6engine9materialsE'
  curve.cpp:(.text._ZN6script5Curve9get_valueEfPf+0x2a1): undefined reference to `_ZN6script6engine13get_num_paramENS_5Curve8knottypeE'
  collect2: ld returned 1 exit status
  make: *** [intro] Error 1

Without -fwhole-program in LDFLAGS it links, as before. With -frepo in the mix,
it's chaos as usual, with tons and tons of messages like

  script/parser.o: In function `_ZNSt8_Rb_treeISsSt4pairIKSsN6script6parser4meshEESt10_Select1stIS5_ESt4lessISsESaIS5_EE4findERS1_.clone.30': parser.cpp:(.text._ZNSt8_Rb_treeISsSt4pairIKSsN6script6parser4meshEESt10_Select1stIS5_ESt4lessISsESaIS5_EE4findERS1_.clone.30+0x38): undefined reference to `bool std::operator< <char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

and other mising templates.

/* Steinar */
-- 
Homepage: http://www.sesse.net/



Reply to: