Xerces-C: two issues with gcc4/cygwin-1.7

Charles Wilson cygwin@cwilson.fastmail.fm
Sun May 3 18:05:00 GMT 2009

Charles Wilson wrote:

> libtool: link: g++ -O2 -pipe -o .libs/CreateDOMDocument.exe
> src/CreateDOMDocument/CreateDOMDocument.o
> ../src/.libs/libxerces-c.dll.a -L/usr/lib
> /usr/lib/gcc/i686-pc-cygwin/4.3.2/libstdc++.dll.a /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
> Info: resolving xercesc_3_0::XMLPlatformUtils::fgMemoryManager        by
> linking to __imp___ZN11xercesc_3_016XMLPlatformUtils15fgMemoryManagerE
> (auto-import)
> Info: resolving xercesc_3_0::XMLUni::fgXercescDefaultLocale       by
> linking to __imp___ZN11xercesc_3_06XMLUni22fgXercescDefaultLocaleE
> (auto-import)
> Info: resolving std::cout  by linking to __imp___ZSt4cout (auto-import)
> Info: resolving std::cerr  by linking to __imp___ZSt4cerr
> (auto-import/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld:
> warning: auto-importing has been activated without --enable-auto-import
> specified on the command line.
> This should work unless it involves constant data structures referencing
> symbols from auto-imported DLLs.
> 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?

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


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libxerces-c.la.lnkscript
URL: <http://cygwin.com/pipermail/cygwin/attachments/20090503/4979e133/attachment.ksh>
-------------- next part --------------
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/

More information about the Cygwin mailing list