Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <428D10A1.3010504@familiehaase.de> Date: Fri, 20 May 2005 00:18:09 +0200 From: "Gerrit P. Haase" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 MIME-Version: 1.0 To: Bernd Prager CC: cygwin AT cygwin DOT com Subject: Re: gnu c++ linker errors on double processor machine References: <428D3672 DOT 1020009 AT prager DOT ws> In-Reply-To: <428D3672.1020009@prager.ws> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Bernd Prager wrote: > Hi everybody, > > I'm experencing an odd error on a double processor machine. > The same source code compiles well on all boxes I used but on a single > machine it fails. > It's the only 2-processor box I use. That's why I assume the problem is > some weird concurrency issue but I'm not sure. > > When I try to compile it a couple of times in a row sometimes > compilation works, sometimes it fails and it's really abitrary. > Here's the error message: > > > make all > Building target: Tst.exe > g++ -L/usr/local/lib -L/usr/local/lib/mysql -o Tst.exe Cfg.o Tst.o > -lmysqlpp -lmysqlclient -lz > /usr/local/lib/libstdc++.a(tree.o)(.text$_ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_+0x0): > In function `_ZSt20_Rb_tree_black_countPKSt18_Rb_tree_node_baseS1_': > /home/BerndPrager/gcc-3.4.3/i686-pc-cygwin/libstdc++-v3/src/../../.././libstdc++-v3/src/tree.cc:416: > multiple definition of > `std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, > std::_Rb_tree_node_base*&)' > Cfg.o(.text$_ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_[std::_Rb_tree_rotate_left(std::_Rb_tree_node_base*, > std::_Rb_tree_node_base*&)]+0x0):/usr/include/c++/3.3.3/bits/stl_construct.h: > first defined here > /usr/local/lib/libstdc++.a(tree.o)(.text$_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_+0x0): > In function `_ZSt20_Rb_tree_black_countPKSt18_Rb_tree_node_baseS1_': > /home/BerndPrager/gcc-3.4.3/i686-pc-cygwin/libstdc++-v3/src/../../.././libstdc++-v3/src/tree.cc:416: > multiple definition of > `std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, > std::_Rb_tree_node_base*&)' > Cfg.o(.text$_ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_[std::_Rb_tree_rotate_right(std::_Rb_tree_node_base*, > std::_Rb_tree_node_base*&)]+0x0):/usr/include/c++/3.3.3/bits/stl_construct.h: > first defined here > Cfg.o(.text$_ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsSsEESt24__default_alloc_templateILb1ELi0EEE8allocateEj[std::__simple_alloc std::char_traits, std::allocator > const, > std::basic_string, std::allocator > > > >, std::__default_alloc_template >::allocate(unsigned > int)]+0x27): In function `_ZNKSt10_Select1stISt4pairIKSsSsEEclERKS2_': > /usr/include/c++/3.3.3/bits/stl_construct.h: undefined reference to > `std::__default_alloc_template::allocate(unsigned int)' > Cfg.o(.text$_ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsSsEESt24__default_alloc_templateILb1ELi0EEE10deallocateEPS4_j[std::__simple_alloc std::char_traits, std::allocator > const, > std::basic_string, std::allocator > > > >, std::__default_alloc_template > >::deallocate(std::_Rb_tree_node std::char_traits, std::allocator > const, > std::basic_string, std::allocator > > > >*, unsigned int)]+0x23):/usr/include/c++/3.3.3/bits/stl_construct.h: > undefined reference to `std::__default_alloc_template 0>::deallocate(void*, unsigned int)' > collect2: ld returned 1 exit status > make: *** [Tst.exe] Error 1 > > Is that a known issue? Some flags or cygwin variable I can set to > prevent that? > It's a WinXP box, gcc 3.4.3, CYGWIN_NT-5.1 1.5.16(0.128/4/2). > > Thanks in advane for any suggestions or help. Are there other differences between this and the other machines? E.g. you use distcc here but not elsewhere, you use make -j3 and not elsewhere, you use ccache here but not elesewhere, ...? Gerrit -- =^..^= -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/