delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/08/08:19:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-ID: <4E68AA10.4070205@cs.utoronto.ca>
Date: Thu, 08 Sep 2011 07:42:08 -0400
From: Ryan Johnson <ryan DOT johnson AT cs DOT utoronto DOT ca>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: stable compiler package gcc4-4.5.3-2
References: <announce DOT 4E60524C DOT 2000401 AT gmail DOT com> <CAPw2spgAfEF-vLrWeoFTA28Xtt5WcvYS+mVqq9RUqi4CYk84rQ AT mail DOT gmail DOT com>
In-Reply-To: <CAPw2spgAfEF-vLrWeoFTA28Xtt5WcvYS+mVqq9RUqi4CYk84rQ@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 08/09/2011 1:32 AM, Frédéric Bron wrote:
> I have recompiled the code I am working on with i686-pc-cygwin-g++ 4.5.3.
>
> I get many of the following messages from the linker:
> /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld:
> gcc-release/obj/BTest/Test.o: warning: duplicate section
> `.rdata$_ZTISs[typeinfo for std::basic_string<char,
> std::char_traits<char>, std::allocator<char>  >]' has different size
>
> I do not get this error cross-compiling the same code with
> i686-pc-mingw32-g++ 4.5.2.
>
> Any chance that this comes from the new version?
In my experience, these sorts of errors arise when there really is 
something wrong with the code, usually involving sizes of integers (e.g. 
'long' in struct's definition and 'int' in another, on a 64-bit 
machine). However, the linker is poorly-equipped to detect such errors 
unless the resulting objects have different sizes.

So, while I wouldn't rule out miscompilation, I would first check for 
silently conflicting definitions in different compilation units.

At least one list discussion for another project reported a similar 
gcc-whines-mingw-silent issue, and the resulting mingw binary didn't run 
properly (which supports the silent conflict hypothesis).

BTW, a STC would have been extremely helpful here -- all we can do is 
speculate without it

Ryan


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019