public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* build failure
@ 2009-03-12 19:41 Tom Tromey
  2009-03-12 20:01 ` H.J. Lu
  2009-03-12 20:03 ` Tom Tromey
  0 siblings, 2 replies; 17+ messages in thread
From: Tom Tromey @ 2009-03-12 19:41 UTC (permalink / raw)
  To: Binutils Development

On x86 Fedora 9, with --enable-targets=all, the CVS head build fails
as appended.

On this machine, bfd_vma is a 32 bit type.

Tom

/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -DTRAD_CORE   -I. -I../../src/bfd -I../../src/bfd/../include    -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c -o elf32-score.lo ../../src/bfd/elf32-score.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src/bfd -I. -DTRAD_CORE -I. -I../../src/bfd -I../../src/bfd/../include -g3 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g3 -c ../../src/bfd/elf32-score.c -o elf32-score.o
cc1: warnings being treated as errors
../../src/bfd/elf32-score.c: In function ‘score3_bfd_putl48’:
../../src/bfd/elf32-score.c:290: error: right shift count >= width of type
../../src/bfd/elf32-score.c:291: error: right shift count >= width of type
../../src/bfd/elf32-score.c: At top level:
../../src/bfd/elf32-score.c:957: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c:957: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c:972: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c:972: error: large integer implicitly truncated to unsigned type
../../src/bfd/elf32-score.c: In function ‘score_elf_final_link_relocate’:
../../src/bfd/elf32-score.c:2199: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2212: error: left shift count >= width of type
../../src/bfd/elf32-score.c:2226: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2232: error: left shift count >= width of type
../../src/bfd/elf32-score.c: In function ‘s3_bfd_score_elf_relocate_section’:
../../src/bfd/elf32-score.c:2521: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2530: error: left shift count >= width of type
../../src/bfd/elf32-score.c:2541: error: right shift count >= width of type
../../src/bfd/elf32-score.c:2557: error: left shift count >= width of type
make[2]: *** [elf32-score.lo] Error 1

^ permalink raw reply	[flat|nested] 17+ messages in thread
* ARC: Build failure
@ 2016-01-21 10:58 Nick Clifton
  2016-01-21 12:13 ` Cupertino Miranda
  0 siblings, 1 reply; 17+ messages in thread
From: Nick Clifton @ 2016-01-21 10:58 UTC (permalink / raw)
  To: Cupertino.Miranda, Claudiu.Zissulescu; +Cc: binutils

Hi Miranda, Hi Zissulescu,

  I have just started encountering a build failure when building an
  all-targets toolchain configured for a 32-bit host:

bfd/elf32-arc.c: In function 'elf_arc_finish_dynamic_symbol':
bfd/elf32-arc.c:2248:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       bfd_vma loc = (bfd_vma) srelbss->contents
                     ^
bfd/elf32-arc.c:2257:52: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
       bfd_elf32_swap_reloca_out (output_bfd, &rel, (bfd_byte *) loc);
                                                    ^
  There are several more failures like this.

  I am not sure why you are using a bfd_vma to hold the location value,
  but a patch like the one below fixes the build problem for me.  Do you
  have any objections to my applying it ?

Cheers
  Nick

diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 0931c4e..8a46a2c 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -55,9 +55,9 @@ name_for_global_symbol (struct elf_link_hash_entry *h)
   {									\
     struct elf_link_hash_table *_htab = elf_hash_table (info);		\
     Elf_Internal_Rela _rel;						\
-    bfd_vma _loc;							\
+    bfd_byte * _loc;							\
 									\
-    _loc = (bfd_vma) _htab->srel##SECTION->contents			\
+    _loc = _htab->srel##SECTION->contents				\
       + ((_htab->srel##SECTION->reloc_count)				\
 	 * sizeof (Elf32_External_Rela));				\
     _htab->srel##SECTION->reloc_count++;				\
@@ -65,7 +65,7 @@ name_for_global_symbol (struct elf_link_hash_entry *h)
     _rel.r_offset = (_htab->s##SECTION)->output_section->vma		\
       + (_htab->s##SECTION)->output_offset + OFFSET;			\
     _rel.r_info = ELF32_R_INFO (SYM_IDX, TYPE);				\
-    bfd_elf32_swap_reloca_out (BFD, &_rel, (bfd_byte *) _loc);		\
+    bfd_elf32_swap_reloca_out (BFD, &_rel, _loc);			\
   }
 
 struct arc_local_data
@@ -2245,8 +2245,8 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
 	bfd_get_section_by_name (h->root.u.def.section->owner,
 				 ".rela.bss");
 
-      bfd_vma loc = (bfd_vma) srelbss->contents
-		    + (srelbss->reloc_count * sizeof (Elf32_External_Rela));
+      bfd_byte * loc = srelbss->contents
+	+ (srelbss->reloc_count * sizeof (Elf32_External_Rela));
       srelbss->reloc_count++;
 
       Elf_Internal_Rela rel;
@@ -2254,7 +2254,7 @@ GOT_OFFSET = 0x%x, GOT_VMA = 0x%x, INDEX = %d, ADDEND = 0x%x\n",
       rel.r_offset = rel_offset;
       rel.r_info = ELF32_R_INFO (h->dynindx, R_ARC_COPY);
 
-      bfd_elf32_swap_reloca_out (output_bfd, &rel, (bfd_byte *) loc);
+      bfd_elf32_swap_reloca_out (output_bfd, &rel, loc);
     }
 
   /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.  */

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Build Failure
@ 2009-05-05  2:15 Ben Woodcroft
  2009-05-05  2:38 ` DJ Delorie
  2009-05-05  3:38 ` Alan Modra
  0 siblings, 2 replies; 17+ messages in thread
From: Ben Woodcroft @ 2009-05-05  2:15 UTC (permalink / raw)
  To: binutils

Hi,

I've never built binutils before, so I'm not sure if I'm doing
something stupid, but I wasn't able to find this error on google. I'm
using gcc and so therefore using a separate build directory
(binutils-2.19.1-build). I'm using the newest version of gcc (4.4.0)
and make (3.81), but old glibc on i686. I'm trying to install glibc
eventually, but it says I need a newer version of ld and as - hence
I'm installing binutils.

Does anyone have any ideas on how to fix this? Thanks in advance.

[ben@alfred binutils-2.19.1-build]$ ./../binutils-2.19.1/configure
--prefix=/home/ben/install
... (works fine)
[ben@alfred binutils-2.19.1-build]$ make
...
make[4]: Entering directory `/home/ben/programs/binutils-2.19.1-build/bfd'
rm -f bfd-tmp.h
cp bfd-in3.h bfd-tmp.h
/bin/sh .././../binutils-2.19.1/bfd/../move-if-change bfd-tmp.h bfd.h
rm -f bfd-tmp.h
touch stmp-bfd-h
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I.././../binutils-2.19.1/bfd -I. -DTRAD_CORE -I.
-I.././../binutils-2.19.1/bfd -I.././../binutils-2.19.1/bfd/../include
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o
archive.lo .././../binutils-2.19.1/bfd/archive.c
libtool: compile: gcc -DHAVE_CONFIG_H -I.
-I.././../binutils-2.19.1/bfd -I. -DTRAD_CORE -I.
-I.././../binutils-2.19.1/bfd -I.././../binutils-2.19.1/bfd/../include
-W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c
.././../binutils-2.19.1/bfd/archive.c -o archive.o
cc1: warnings being treated as errors
.././../binutils-2.19.1/bfd/archive.c: In function
'_bfd_archive_bsd_update_armap_timestamp':
.././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
pointer '__u' does break strict-aliasing rules
.././../binutils-2.19.1/bfd/archive.c:2322: note: initialized from here
.././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
pointer '__u' does break strict-aliasing rules
.././../binutils-2.19.1/bfd/archive.c:2322: note: initialized from here
.././../binutils-2.19.1/bfd/archive.c:2322: error: dereferencing
pointer '__u' does break strict-aliasing rules
.././../binutils-2.19.1/bfd/archive.c:2322: note: initialized from here
make[4]: *** [archive.lo] Error 1
make[4]: Leaving directory `/home/ben/programs/binutils-2.19.1-build/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ben/programs/binutils-2.19.1-build/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ben/programs/binutils-2.19.1-build/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/home/ben/programs/binutils-2.19.1-build'
make: *** [all] Error 2


Thanks again in advance,
ben

^ permalink raw reply	[flat|nested] 17+ messages in thread
* build failure
@ 2007-05-14 22:39 Greg Schafer
  2007-05-14 22:55 ` H. J. Lu
  0 siblings, 1 reply; 17+ messages in thread
From: Greg Schafer @ 2007-05-14 22:39 UTC (permalink / raw)
  To: binutils; +Cc: H. J. Lu

Hi

Trying to bootstrap recent binutils (2.17.50.0.16 by HJ) from an ancient
RH62 system and the build is bombing in gprof. Compiler is egcs-2.91.66. Any
takers?

I guess this commit has something to do with it:

http://sourceware.org/ml/binutils-cvs/2007-04/msg00038.html

Thanks
Greg


gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.17.50.0.16/gprof -I.  -D_GNU_SOURCE -DDEBUG -I../bfd -I../../binutils-2.17.50.0.16/gprof/../include -I../../binutils-2.17.50.0.16/gprof/../bfd  -I.  -DLOCALEDIR="\"/temptools/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -pipe -c ../../binutils-2.17.50.0.16/gprof/hist.c
../../binutils-2.17.50.0.16/gprof/hist.c: In function `scale_and_align_entries':
../../binutils-2.17.50.0.16/gprof/hist.c:301: parse error before `*'
../../binutils-2.17.50.0.16/gprof/hist.c:303: `r' undeclared (first use in this function)
../../binutils-2.17.50.0.16/gprof/hist.c:303: (Each undeclared identifier is reported only once
../../binutils-2.17.50.0.16/gprof/hist.c:303: for each function it appears in.)
../../binutils-2.17.50.0.16/gprof/hist.c:294: warning: `bin_of_entry' might be used uninitialized in this function
../../binutils-2.17.50.0.16/gprof/hist.c:295: warning: `bin_of_code' might be used uninitialized in this function
../../binutils-2.17.50.0.16/gprof/hist.c: At top level:
../../binutils-2.17.50.0.16/gprof/hist.c:740: warning: `find_histogram_for_pc' defined but not used
make[4]: *** [hist.o] Error 1
make[4]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build/gprof'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build/gprof'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build/gprof'
make[1]: *** [all-gprof] Error 2
make[1]: Leaving directory `/mnt/sysroot/temptools/src/binutils-build'
make: *** [all] Error 2

^ permalink raw reply	[flat|nested] 17+ messages in thread
* build failure
@ 2002-02-11 21:32 Eric Christopher
  2002-02-11 21:41 ` Alan Modra
  2002-02-11 23:38 ` Eric Christopher
  0 siblings, 2 replies; 17+ messages in thread
From: Eric Christopher @ 2002-02-11 21:32 UTC (permalink / raw)
  To: binutils

Anyone else seeing this?

-eric

gcc -DHAVE_CONFIG_H -I. -I/ghostwheel/sourceware/combined-3.0/bfd -I.
-D_GNU_SOURCE -I. -I/ghostwheel/sourceware/combined-3.0/bfd
-I/ghostwheel/sourceware/combined-3.0/bfd/../include
-I/ghostwheel/sourceware/combined-3.0/bfd/../intl -I../intl -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -g -O2 -c
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c -o bfd.o
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c: In function
`_bfd_default_error_handler':
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: warning: implicit
declaration of function `VA_OPEN'
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: `p' undeclared (first
use in this function)
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: (Each undeclared
identifier is reported only once
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:423: for each function it
appears in.)
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:424: warning: implicit
declaration of function `VA_FIXEDARG'
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:424: parse error before
`const'
/ghostwheel/sourceware/combined-3.0/bfd/bfd.c:426: warning: implicit
declaration of function `VA_CLOSE'

-- 
I will not use abbrev.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-01-21 12:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12 19:41 build failure Tom Tromey
2009-03-12 20:01 ` H.J. Lu
2009-03-12 20:03 ` Tom Tromey
2009-03-13 11:25   ` Nick Clifton
2009-03-13 17:34     ` Tom Tromey
2009-03-18 16:58       ` Nick Clifton
  -- strict thread matches above, loose matches on Subject: below --
2016-01-21 10:58 ARC: Build failure Nick Clifton
2016-01-21 12:13 ` Cupertino Miranda
2009-05-05  2:15 Build Failure Ben Woodcroft
2009-05-05  2:38 ` DJ Delorie
2009-05-05  3:38 ` Alan Modra
2007-05-14 22:39 build failure Greg Schafer
2007-05-14 22:55 ` H. J. Lu
2007-05-14 23:04   ` Greg Schafer
2002-02-11 21:32 Eric Christopher
2002-02-11 21:41 ` Alan Modra
2002-02-11 22:04   ` Eric Christopher
2002-02-11 23:38 ` Eric Christopher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).