Bug 726898

Summary: elf64-ppc.c:4767:46: error: variable 'sym_hashes_end' set but not used
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: crashAssignee: Dave Anderson <anderson>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anderson
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-26 19:59:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karsten Hopp 2011-07-30 13:52:11 UTC
Description of problem:
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include   -DBINDIR='"/usr/local/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc -MT elf64-ppc.lo -MD -MP -MF .deps/elf64-ppc.Tpo -c -o elf64-ppc.lo elf64-ppc.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mminimal-toc -MT elf64-ppc.lo -MD -MP -MF .deps/elf64-ppc.Tpo -c elf64-ppc.c -o elf64-ppc.o
elf64-ppc.c: In function 'ppc64_elf_check_relocs':
elf64-ppc.c:4767:46: error: variable 'sym_hashes_end' set but not used [-Werror=unused-but-set-variable]
elf64-ppc.c: In function 'ppc64_elf_gc_sweep_hook':
elf64-ppc.c:5660:31: error: variable 'htab' set but not used [-Werror=unused-but-set-variable]
elf64-ppc.c: In function 'ppc64_elf_edit_opd':
elf64-ppc.c:6793:36: error: variable 'sym_hashes' set but not used [-Werror=unused-but-set-variable]
elf64-ppc.c: In function 'ppc64_elf_edit_toc':
elf64-ppc.c:7667:36: error: variable 'sym_hashes' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[6]: *** [elf64-ppc.lo] Error 1
make[5]: *** [all-recursive] Error 1
make[4]: *** [all] Error 2
make[3]: *** [all-bfd] Error 2
make[2]: *** [all] Error 2

Version-Release number of selected component (if applicable):
crash-5.1.5-1.fc16

Steps to Reproduce:
1. ppc-koji build --scratch f16 crash-5.1.5-1.fc16.src.rpm

Actual results:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=265519

Comment 1 Dave Anderson 2011-08-02 19:50:26 UTC
Hi Karsten,

I've never been able to build crash in Fedora since fedpkg came along.
For some reason, I can check files out/in, but cannot do a "fedpkg build".
(I spent the better part of a day with Dennis Gilmore trying to get it
to work my RHEL5 workstation, but he could never get it to work either,
so we punted, and he did my most-recent builds for me...)

And I've certainly never done a koji build as you've done, and so presume
I cannot do that either.  Anyway, I'm going to try to set up a 
relatively-virgin F14 laptop with the the fedpkg build tools, etc. 
and try it all again.

But I'm wondering whether in the meantime, if I could just furnish you
with a crash src.rpm, and have you build it with ppc-koji?

I ask because I went through this -Werror=unused-but-set-variable
pain-in-the-ass with the x86 and x86_64 Fedora builds, and I'm presuming
that there will be several other ppc64-specific files besides elf64-ppc.c
that will also fail to compile.

Comment 2 Karsten Hopp 2011-08-04 12:14:57 UTC
Sure, I can do some scratch builds from src.rpm for you. When we get it to build successfully, you just need to check in your changes and I'll build it directly from git.

Comment 3 Dave Anderson 2011-08-04 15:46:13 UTC
(In reply to comment #2)
> Sure, I can do some scratch builds from src.rpm for you. When we get it to
> build successfully, you just need to check in your changes and I'll build it
> directly from git.

Then I will absolutely take advantage of your generosity -- I appreciate
it a great deal, as I'm sure you've got better things to do!

Here's pass #1, which gets it past elf64-ppc.c:

  http://people.redhat.com/anderson/bz726898/crash-5.1.7-ppc.1.src.rpm

This should *hopefully* only take a few passes for only ppc64-specific
files, because I cleaned up all of the processor-neutral files when
I went through this for x86 and x86_64.

Comment 4 Karsten Hopp 2011-08-04 18:29:29 UTC
As you've already suspected this might take a few passes:
http://ppc.koji.fedoraproject.org/koji/getfile?taskID=268023&name=build.log

elf32-ppc.c: In function 'ppc_elf_tls_optimize':
elf32-ppc.c:4738:27: error: variable 'sym' set but not used [-Werror=unused-but-set-variable]
elf32-ppc.c: In function 'ppc_elf_relax_section':
elf32-ppc.c:5944:15: error: variable 'reladdr' set but not used [-Werror=unused-but-set-variable]

Comment 6 Karsten Hopp 2011-08-04 20:17:38 UTC
http://ppc.koji.fedoraproject.org/koji/getfile?taskID=268080&name=build.log

coffcode.h: In function 'coff_write_object_contents':
coffcode.h:3530:15: error: variable 'hasdebug' set but not used [-Werror=unused-but-set-variable]
coff-rs6000.c: In function 'xcoff_complain_overflow_bitfield_func':
coff-rs6000.c:3071:11: error: variable 'addrmask' set but not used [-Werror=unused-but-set-variable]

Comment 8 Karsten Hopp 2011-08-05 14:05:57 UTC
Looks good:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=268252

Comment 9 Dave Anderson 2011-08-05 14:24:02 UTC
OK, well -- that went easier than I thought it was going to...

I'll update this BZ when I get something checked in to Fedora devel.

Thanks *very* much,
  Dave

Comment 10 Dave Anderson 2011-08-17 20:46:23 UTC
> I'll update this BZ when I get something checked in to Fedora devel.

Sorry for the delay -- here's the crash-5.1.7-1.fc17 build info: 

  http://koji.fedoraproject.org/koji/buildinfo?buildID=259184

Changelog:  	

  * Wed Aug 17 2011 Dave Anderson <anderson> - 5.1.7-1 
  - Update to latest upstream release 
  - Fixes for gcc-4.6 -Werror compile failures for ppc64/ppc.