delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/04/08:48:04

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49FEE690.6020208@gmail.com>
Date: Mon, 04 May 2009 13:58:56 +0100
From: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Xerces-C: two issues with gcc4/cygwin-1.7
References: <49FDDA6E DOT 80607 AT cwilson DOT fastmail DOT fm> <49FDDCA4 DOT 6050004 AT cwilson DOT fastmail DOT fm>
In-Reply-To: <49FDDCA4.6050004@cwilson.fastmail.fm>
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

Charles Wilson wrote:
> Charles Wilson wrote:

>> src/CreateDOMDocument/CreateDOMDocument.o:CreateDOMDocument.cpp:(.gcc_except_table+0xe8):
>> undefined reference to `typeinfo for xercesc_3_0::XMLException'
>> src/CreateDOMDocument/CreateDOMDocument.o:CreateDOMDocument.cpp:(.gcc_except_table+0xf0):
>> undefined reference to `typeinfo for xercesc_3_0::DOMException'
>> collect2: ld returned 1 exit status
>> )
>>
>> I checked the export list from the DLL, and there are NO typeinfo
>> symbols exported at all.  Does this appear to be a gcc4 bug, or is there
>> something specific I need to do to cause typeinfo stuff to be exported?

  In general they should be auto-exported like any other symbol.  It depends
if there are any dllexport annotations in play, which would cancel
auto-export.  There could also be compiler or linker problems, we'll need to
debug it.

> Just noticed something odd. libtool transforms the giant link command
> for the DLL, with hundreds of .lo files, into the following:
> 
> g++ -shared -nostdlib /usr/lib/gcc/i686-pc-cygwin/4.3.2/crtbegin.o
> .libs/libxerces-c.la.lnkscript  -L/usr/lib /usr/lib/libcurl.dll.a
> /usr/lib/libssh2.dll.a -lssl -lcrypto -lz -licuuc -licudata
> -L/usr/lib/gcc/i686-pc-cygwin/4.3.2
> -L/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../..
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/libstdc++.dll.a -lgcc_s -lgcc_s
> -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc_s -lgcc_s
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/crtend.o    -o
> .libs/cygxerces-c-3-0.dll -Wl,--enable-auto-image-base -Xlinker
> --out-implib -Xlinker .libs/libxerces-c.dll.a
> Creating library file: .libs/libxerces-c.dll.a
> 
> I've attached the link script. Could that make a difference, and cause
> the typeinfo to not be exported?

  No, that's standard libtool behaviour: ld doesn't understand the contents of
a .lo file, libtool parses them out, finds the actual PIC objects and builds a
list of input files to avoid passing over-long command-lines.

  Let's see the output for 'nm xercesc/util/.libs/XMLException.o'; that should
confirm whether the typeinfo got generated or not.  After that, we'll need to
find out if it's in the DLL but not exported, and whether auto-export is in
operation or not.

    cheers,
      DaveK


--
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/

- Raw text -


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