On cygwin: FAIL: linking auto-import client using a standard import library

Pedro Alves pedro_alves@portugalmail.pt
Fri Feb 1 03:39:00 GMT 2008


Nick Clifton escreveu:
> Hi Christian,
> 
>> When running the ld testsuite from today's binutils snapshot, I get a
>> failure like this:
> 
>> /usr/local/src/trunk/objdir-binutils/ld/ld-new  -o
>> tmpdir/client-linklib.exe --enable-auto-import
>> --enable-runtime-pseudo-reloc /lib/crt0.o tmpdir/client.o -Ltmpdir
>> -lstandard -L/usr/lib -lcygwin -L/usr/lib/w32api -lkernel32
>> /usr/local/src/trunk/objdir-binutils/ld/.libs/ld-new: cannot find 
>> -lstandard
>> FAIL: linking auto-import client using a standard import library
> 
> Is this still happening ?  (I do not have easy access to a cygwin 
> environment to check for myself).
> 
> If it is, please can you check to see if the problem was introduced on
> 2006-12-18 ?  (I am just guessing here, not accusing anyone.  But that 
> appears to be the last time that the library recognition code was tweaked).
> 

I doubt that.  The import lib really isn't being generated, so it's
natural that ld can't find it.

The test should be invoking ld to link, via ld_special_link, but for
some reason, it's passing $CC, which results in this:

gcc -v -shared --enable-auto-import --out-implib=tmpdir/libstandard.dll.a  -o 
tmpdir/dll.dll tmpdir/dll.o -L/usr/lib -lcygwin -L/usr/lib/w32api -lkernel32

The --out-implib, and --enable-auto-import aren't special, they're not
passed to the linker (read: need -Wl,), so libstandard.dll.a isn't output.

I don't know how that ever worked.  The attached patch fixes that here,
but then I get:
FAIL: application runtime segfault check

:/ the executable didn't run.

Looks like some digging is needed here.

-- 
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto-import.diff
Type: text/x-diff
Size: 888 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20080201/548c8949/attachment.bin>


More information about the Binutils mailing list