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: <428D3672.1020009@prager.ws> Date: Thu, 19 May 2005 17:59:30 -0700 From: Bernd Prager User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050405) MIME-Version: 1.0 Cc: cygwin AT cygwin DOT com Subject: gnu c++ linker errors on double processor machine References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Sanitizer: This message has been sanitized! X-Sanitizer-URL: http://mailtools.anomy.net/ X-Sanitizer-Rev: $Id: Sanitizer.pm,v 1.54 2002/02/15 16:59:07 bre Exp $ X-IsSubscribed: yes 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::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::allocator > const, std::basic_string, std::allocator > > >, std::__default_alloc_template >::deallocate(std::_Rb_tree_node, 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::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. -- Bernd -- 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/