Bug 207378 - Build world of 11-CURRENT r295839 fails on Sparc64
Summary: Build world of 11-CURRENT r295839 fails on Sparc64
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: sparc64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-20 20:51 UTC by dal36
Modified: 2016-02-23 21:28 UTC (History)
2 users (show)

See Also:


Attachments
A patch renaming the local variables the names of which would shadow global functions. (2 bytes, patch)
2016-02-21 10:48 UTC, jau
no flags Details | Diff
A retry of the same patch - the previous attempt was apparently corrupted in transit (1.87 KB, patch)
2016-02-21 13:25 UTC, jau
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dal36 2016-02-20 20:51:48 UTC
Whilst trying to build 11-CURRENT r295839 on sparc64 (using a system at 11-CURRENT r295086), I receive the error messages below. The upgrade procedure used was that detailed in the FreeBSD Handbook (23.6 Rebuilding World). This process failed on two machines with make -j8 buildworld, and again (after emptying /usr/obj) on one of them with make buildworld (i.e. without -jN set). Note that I upgraded an amd64 machine to r295841 without problems, suggesting amd64 is unaffected.

===> usr.sbin/iostat (all)
cc  -O2 -pipe   -g -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign    -c /usr/src/usr.sbin/iostat/iostat.c -o iostat.o
cc1: warnings being treated as errors
/usr/src/usr.sbin/iostat/iostat.c: In function 'devstats':
/usr/src/usr.sbin/iostat/iostat.c:800: warning: declaration of 'devname' shadows a global declaration
/usr/obj/usr/src/tmp/usr/include/stdlib.h:282: warning: shadowed declaration is here
/usr/src/usr.sbin/iostat/iostat.c: In function 'cpustats':
/usr/src/usr.sbin/iostat/iostat.c:982: warning: declaration of 'time' shadows a global declaration
/usr/obj/usr/src/tmp/usr/include/time.h:154: warning: shadowed declaration is here
*** Error code 1

Stop.
make[4]: stopped in /usr/src/usr.sbin/iostat
*** Error code 1

Stop.
make[3]: stopped in /usr/src/usr.sbin
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src
Comment 1 Ian Lepore freebsd_committer freebsd_triage 2016-02-20 20:56:30 UTC
Not an arm-specific bug, reassign to 'misc' component.
Comment 2 jau 2016-02-21 10:48:38 UTC
Created attachment 167238 [details]
A patch renaming the local variables the names of which would shadow global functions.

It is really bad style to use a globally defined name (function or variable)
as a name of a local variable, but apparently clang is not too picky about it.
Comment 3 jau 2016-02-21 10:54:19 UTC
The same problem applies to any and all hardware platforms using gcc as the system
compiler. So, in addition to sparc64 also ppc, ppc64, and mips are impacted.
Comment 4 dal36 2016-02-21 10:59:12 UTC
Did the patch upload OK? It seems to be showing as 2 bytes and gives a blank screen when I click through.
Comment 5 jau 2016-02-21 13:25:10 UTC
Created attachment 167253 [details]
A retry of the same patch - the previous attempt was apparently corrupted in transit

This patch was apparently corrupted in transit during the previous attempt.
Comment 6 dal36 2016-02-21 21:34:47 UTC
After applying this patch, make buildworld completes successfully. I've not tested iostat itself, but will do so once I've installed everything.
Comment 7 dal36 2016-02-23 21:19:23 UTC
This patch solves the issue that I had with the build. From what I can tell, a functionally equivalent patch to the one above was committed as r295900. Thanks for your help with this.
Comment 8 Ian Lepore freebsd_committer freebsd_triage 2016-02-23 21:28:36 UTC
Fixed by r295900