This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld testsuite failures on cygwin: cannot find -lstandard


On 6/26/06, Pedro Alves <pedro.alves@domatica.pt> wrote:
Christian Joensson wrote:

> This is on current binutils trunk:
>
> Running
> /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/auto-import.exp ...
> gcc  -B/usr/local/src/trunk/objdir-binutils/ld/tmpdir/gas/
> -I/usr/local/src/trunk/src/ld/testsuite/ld-auto-import -g -O2
> -L/usr/local/src/trunk/objdir-binutils/./ld -g -O2  -c
> /usr/local/src/trunk/src/ld/testsuite/ld-auto-import/dll.c -o
> tmpdir/dll.o
> /usr/local/src/trunk/objdir-binutils/ld/ld-new -shared

(snip)

> reference to `libiconv_open'
> /usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
> reference to `libiconv_close'
> /usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
> undefined reference to `libiconv_set_relocation_prefix'
> FAIL: bootstrap with --relax
> testcase /usr/local/src/trunk/src/ld/testsuite/ld-bootstrap/bootstrap.exp
> completed in 5 seconds
>
> Any ideas?
>
I've seen similar problems on arm-wince-pe.
Could you try this patch?
http://sourceware.org/ml/binutils/2006-06/msg00373.html

I think I got it right, I had to manually edit the pe.em file, attached is a unified diff of what I have. I get normal bahaviour now.... meaning

Windows XP Pro/SP2 cygwin Pentium M processor 2.13GHz system with packages:

binutils             20050610-1     2.16.91 20050610
bison                2.1-1          2.1
cygwin               1.5.19-4
dejagnu              20021217-2     1.4.2.x
expect               20030128-1     5.26
gcc                  3.4.4-1
gmp                  4.1.4-2
make                 3.80-1	
tcltk                20030901-1     8.4
w32api               3.7-1	

LAST_UPDATED: Sat Jun 24 10:59:25 GMT 2006

Native configuration is i686-pc-cygwin

=== binutils tests ===


Running target unix


=== binutils Summary ===

# of expected passes		75
# of expected failures		1
# of unsupported tests		1
		=== gas tests ===


Running target unix


=== gas Summary ===

# of expected passes		117
# of expected failures		1
		=== ld tests ===


Running target unix FAIL: bootstrap with --static FAIL: cdtest with -Ur XPASS: align1 FAIL: weak symbols

=== ld Summary ===

# of expected passes		38
# of unexpected failures	3
# of unexpected successes	1
# of expected failures		3
# of unsupported tests		1


and the failures in ld look like this:


/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/ld-partial.o -r  ldgram.o ldlex.o lexsup.o ldlang.o mri.o
ldctor.o ldmain.o ldwrite.o ldexp.o  ldemul.o ldver.o ldmisc.o
ldfile.o ldcref.o ei386pe.o deffilep.o pe-dll.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/ld1 /lib/crt0.o --static tmpdir/ld-partial.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lintl  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
/usr/lib/libintl.a(dcigettext.o):dcigettext.c:(.text+0x6c9): undefined
reference to `libiconv'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0xf0): undefined
reference to `libiconv_open'
/usr/lib/libintl.a(loadmsgcat.o):loadmsgcat.c:(.text+0x19d): undefined
reference to `libiconv_close'
/usr/lib/libintl.a(relocatable.o):relocatable.c:(.text+0x57):
undefined reference to `libiconv_set_relocation_prefix'
FAIL: bootstrap with --static

which to me indicates libiconv is somehow missing as linked in, I have
/usr/lib/libiconv.a as well as /usr/lib/libiconv.dll.a ...

and

/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe -o
tmpdir/cdtest.o -r -Ur tmpdir/cdtest-foo.o tmpdir/cdtest-bar.o
tmpdir/cdtest-main.o
/usr/local/src/trunk/objdir-binutils/ld/ld-new -m i386pe  -o
tmpdir/cdtest /lib/crt0.o tmpdir/cdtest.o  --start-group
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a -lc --end-group -lcygwin
-L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32
/usr/lib/gcc/i686-pc-cygwin/3.4.4/libgcc.a
tmpdir/cdtest >tmpdir/cdtest.out
assertion "Foo::nb_foos() == 2" failed: file
"/usr/local/src/trunk/src/ld/testsuite/ld-cdtest/cdtest-main.cc", line
32
FAIL: cdtest with -Ur

which is an oldie, http://sourceware.org/bugzilla/show_bug.cgi?id=46

and

Running /usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak.exp ...
/usr/local/src/trunk/objdir-binutils/ld/../gas/as-new   -o
tmpdir/weak1.o /usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak1.s
/usr/local/src/trunk/objdir-binutils/ld/../gas/as-new   -o
tmpdir/weak2.o /usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak2.s
/usr/local/src/trunk/objdir-binutils/ld/ld-new  -o tmpdir/weak
--image-base 0 -T
/usr/local/src/trunk/src/ld/testsuite/ld-scripts/weak.t tmpdir/weak1.o
tmpdir/weak2.o
/usr/local/src/trunk/objdir-binutils/ld/../binutils/objdump -s tmpdir/weak

tmpdir/weak: file format pei-i386

Contents of section .text:
1000 08100000 18200000 12121212 34343434  ..... ......4444
Contents of section .data:
2000 10100000 0c200000 56565656 78787878  ..... ..VVVVxxxx
FAIL: weak symbols

which also is an oldie; http://sourceware.org/bugzilla/show_bug.cgi?id=977

--
Cheers,

/ChJ

Attachment: pe.em.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]