This is the mail archive of the binutils@sources.redhat.com 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: Can't build libjava in gcc cvs trunk 20050227 on sparc-linux: ar cq libgcj0_convenience.a ... Bus error: in bfd_hash_lookup () from /usr/lib/libbfd-2.15.92.0.2.so


On Mon, Feb 28, 2005 at 10:05:44AM +0100, Christian Joensson wrote:
> Aurora SPARC Linux release 2.0 (Kashmir FC3) UltraSparc IIi (Sabre) sun4u:
> 
> binutils-2.15.92.0.2-5 - sparc
> bison-1.875c-2 - sparc
> dejagnu-1.4.4-2 - noarch
> expect-5.42.1-1 - sparc
> gcc-3.4.2-6.fc3 - sparc
> gcc4-4.0.0-0.8sparc - sparc
> glibc-2.3.3-99 - sparc64
> glibc-2.3.3-99 - sparcv9
> glibc-headers-2.3.3-99 - sparc64
> glibc-kernheaders-2.6-20sparc - sparc
> kernel-2.6.10-1.1110sparc18 - sparc64
> package kernel-smp is not installed
> make-3.80-5 - sparc
> nptl-devel-2.3.3-99 - sparcv9
> tcl-8.4.7-2 - sparc
> 
> LAST_UPDATED: Sun Feb 27 10:36:52 UTC 2005
> 
> configure:   sparc-linux --enable-__cxa_atexit --disable-multilib --enable-shared --enable-languages=c,ada,c++,f95,java,objc,treelang
> 
> When trying to build gcc trunk lately (last month maybe), I get a
> problem with building libjava. It's like this:
> 
> /bin/sh ./libtool --tag=GCJ --mode=link /usr/local/src/trunk/objdir32/gcc/gcj -B/usr/local/src/trunk/objdir32/gcc/ -B/usr/local/sparc-linux/bin/ -B/usr/local/sparc-linux/lib/ -isystem /usr/local/sparc-linux/include -isystem /usr/local/sparc-linux/sys-include -L/usr/local/src/trunk/objdir32/sparc-linux/libjava -g -O2  -o libgcj0_convenience.la   prims.lo <stuff deleted>
> using piecewise archive linking...
> libtool: link: warning: object name conflicts; overriding AR_FLAGS to 'cq'
> libtool: link: warning: to ensure that POSIX-compatible ar will work
> ar cq .libs/libgcj0_convenience.a .libs/prims.o <stuff deleted> 
> : .libs/libgcj0_convenience.a
> ar cq .libs/libgcj0_convenience.a <stuff deleted> 
> ./libtool: line 4689: 26609 Bus error               ar cq .libs/libgcj0_convenience.a <other stuff deleted> 
> make[3]: *** [libgcj0_convenience.la] Error 138
> make[3]: Leaving directory `/usr/local/src/trunk/objdir32/sparc-linux/libjava'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/usr/local/src/trunk/objdir32/sparc-linux/libjava'
> make[1]: *** [all-target-libjava] Error 2
> make[1]: Leaving directory `/usr/local/src/trunk/objdir32'
> make: *** [bootstrap] Error 2
> 
> Now, debugging this, using gdb-6.3.0.0-0.29 (from rawhide), I see this:
> 
> $ gdb /usr/bin/ar 
> Current directory is /usr/bin/
> GNU gdb Red Hat Linux (6.3.0.0-0.29rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "sparc-redhat-linux"...(no debugging symbols found)
> Using host libthread_db library "/lib/libthread_db.so.1".
> 
> (gdb) cd /usr/local/src/trunk/objdir32/sparc-linux/libjava
> Working directory /usr/local/src/trunk/objdir32/sparc-linux/libjava.
> (gdb) set args cq .libs/libgcj0_convenience.a javax/accessibility/.libs/AccessibleComponent.o <other stuff deleted>
> (gdb) r
> Starting program: /usr/bin/ar cq .libs/libgcj0_convenience.a javax/accessibility/.libs/AccessibleComponent.o <other stuff deleted>
> warning: linux_test_for_tracefork: unexpected result from waitpid (5048, status 0xb7f)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> 
> Program received signal SIGBUS, Bus error.
> 0x70067fbc in bfd_hash_lookup () from /usr/lib/libbfd-2.15.92.0.2.so
> (gdb) bt
> #0  0x70067fbc in bfd_hash_lookup () from /usr/lib/libbfd-2.15.92.0.2.so
> #1  0x70065f10 in bfd_make_section_anyway ()
>    from /usr/lib/libbfd-2.15.92.0.2.so
> #2  0x70081f64 in _bfd_elf_make_section_from_shdr ()
>    from /usr/lib/libbfd-2.15.92.0.2.so
> #3  0x7007d534 in bfd_elf32_object_p () from /usr/lib/libbfd-2.15.92.0.2.so
> #4  0x700617a4 in bfd_check_format_matches ()
>    from /usr/lib/libbfd-2.15.92.0.2.so
> #5  0x70059d54 in _bfd_compute_and_write_armap ()
>    from /usr/lib/libbfd-2.15.92.0.2.so
> #6  0x7005a514 in _bfd_write_archive_contents ()
>    from /usr/lib/libbfd-2.15.92.0.2.so
> #7  0x70063638 in bfd_close () from /usr/lib/libbfd-2.15.92.0.2.so
> #8  0x00013aa8 in ?? ()
> #9  0x00013aa8 in ?? ()
> Previous frame identical to this frame (corrupt stack?)
> (gdb) 
> 
> Now, testing with a newer binutils, binutils-2.15.94.0.2-1 (from
> rawhide), I get similar results:
> 
> Current directory is /usr/bin/
> GNU gdb Red Hat Linux (6.3.0.0-0.29rh)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "sparc-redhat-linux"...(no debugging symbols found)
> Using host libthread_db library "/lib/libthread_db.so.1".
> 
> (gdb) cd /usr/local/src/trunk/objdir32/sparc-linux/libjava 
> Working directory /usr/local/src/trunk/objdir32/sparc-linux/libjava.
> (gdb) set args cq .libs/libgcj0_convenience.a <same other stuff deleted>
> (gdb) r
> Starting program: /usr/bin/ar cq .libs/libgcj0_convenience.a <same other stuff deleted>
> warning: linux_test_for_tracefork: unexpected result from waitpid (5649, status 0xb7f)
> 
> Program received signal SIGBUS, Bus error.
> bfd_hash_lookup (table=0x1c70d4, string=0x1c75fc ".bss", create=1, copy=0)
>     at ../../bfd/hash.c:394
> 394	../../bfd/hash.c: No such file or directory.
> 	in ../../bfd/hash.c
> (gdb) bt
> #0  bfd_hash_lookup (table=0x1c70d4, string=0x1c75fc ".bss", create=1, copy=0)
>     at ../../bfd/hash.c:394
> #1  0x70065f70 in bfd_make_section_anyway (abfd=0x1c2c4f8, 
>     name=0x1c75fc ".bss") at ../../bfd/section.c:963
> #2  0x70082024 in _bfd_elf_make_section_from_shdr (abfd=0x1c7078, 
>     hdr=0x1b3e228, name=0x1c75fc ".bss") at ../../bfd/elf.c:709
> #3  0x7007d634 in bfd_elf32_object_p (abfd=0x1c7078)
>     at ../../bfd/elfcode.h:740
> #4  0x70061804 in bfd_check_format_matches (abfd=0x1c7078, format=1879934656, 
>     matching=0x0) at ../../bfd/format.c:228
> #5  0x70059db4 in _bfd_compute_and_write_armap (arch=0x1609548, elength=35656)
>     at ../../bfd/archive.c:1810
> #6  0x7005a574 in _bfd_write_archive_contents (arch=0x1609548)
>     at ../../bfd/archive.c:1682
> #7  0x70063694 in bfd_close (abfd=0x1609548) at ../../bfd/opncls.c:589
> #8  0x00013c28 in write_archive ()
> #9  0x000149ac in main ()
> (gdb) 
> 
> 
> Any ideas of what might go wrong? Can I provide more information to
> any of you in support of understanding why, how this goes wrong and
> perhaps finding a way ahead?

And this is what the output is when using current (LAST_UPDATED: Mon
Feb 28 12:53:53 UTC 2005) binutils cvs trunk:

Current directory is /usr/local/binutils/bin/
GNU gdb Red Hat Linux (6.3.0.0-0.29rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-redhat-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) cd /usr/local/src/trunk/objdir32/sparc-linux/libjava 
Working directory /usr/local/src/trunk/objdir32/sparc-linux/libjava.
(gdb) set args cq .libs/libgcj0_convenience.a <usual stuff deleted>
(gdb) r
Starting program: /usr/local/binutils/bin/ar cq .libs/libgcj0_convenience.a <usual stuff deleted>
warning: linux_test_for_tracefork: unexpected result from waitpid (27935, status 0xb7f)

Program received signal SIGBUS, Bus error.
bfd_hash_lookup (table=0x611e1c, string=0x33117f1 ".debug_abbrev", create=1, 
    copy=0) at /usr/local/src/trunk/src/bfd/hash.c:394
(gdb) bt
#0  bfd_hash_lookup (table=0x611e1c, string=0x33117f1 ".debug_abbrev", 
    create=1, copy=0) at /usr/local/src/trunk/src/bfd/hash.c:394
#1  0x70051264 in bfd_make_section_anyway (abfd=0x41280a4, 
    name=0x33117f1 ".debug_abbrev")
    at /usr/local/src/trunk/src/bfd/section.c:961
#2  0x7006c200 in _bfd_elf_make_section_from_shdr (abfd=0x611dc0, 
    hdr=0x6123c8, name=0x33117f1 ".debug_abbrev")
    at /usr/local/src/trunk/src/bfd/elf.c:689
#3  0x70067730 in bfd_elf32_object_p (abfd=0x611dc0)
    at /usr/local/src/trunk/src/bfd/elfcode.h:723
#4  0x7004d21c in bfd_check_format_matches (abfd=0x611dc0, format=1879845000, 
    matching=0x0) at /usr/local/src/trunk/src/bfd/format.c:228
#5  0x70045fa0 in _bfd_compute_and_write_armap (arch=0x1607568, elength=35656)
    at /usr/local/src/trunk/src/bfd/archive.c:1780
#6  0x70046758 in _bfd_write_archive_contents (arch=0x1607568)
    at /usr/local/src/trunk/src/bfd/archive.c:1652
#7  0x7004eb74 in bfd_close (abfd=0x1607568)
    at /usr/local/src/trunk/src/bfd/opncls.c:589
#8  0x0001384c in write_archive (iarch=0x2a980)
    at /usr/local/src/trunk/src/binutils/ar.c:950
#9  0x0001457c in main (argc=174464, argv=0xefffd50c)
    at /usr/local/src/trunk/src/binutils/ar.c:1189
(gdb) 

Cheers,

/ChJ


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