Bug 235979 - devel/kore: fix build on powerpc64
Summary: devel/kore: fix build on powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-24 01:01 UTC by Piotr Kubaj
Modified: 2019-02-24 12:07 UTC (History)
2 users (show)

See Also:
tobik: maintainer-feedback+


Attachments
patch (615 bytes, patch)
2019-02-24 01:01 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-02-24 01:01:47 UTC
Created attachment 202307 [details]
patch

This port builds just fine on powerpc64 but needs -Wno-error=shadow, because of the following error:
cc1: warnings being treated as errors
src/config.c: In function 'configure_filemap_index':
src/config.c:812: warning: declaration of 'index' shadows a global declaration
/usr/include/strings.h:62: warning: shadowed declaration is here

Hardware sponsored by IntegriCloud.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-02-24 06:44:12 UTC
index(3) should be hidden.  No idea why it isn't with gcc 4.2.  I'm
much more inclined to not silence the error and select a newer
compiler via USES=compiler:c11 here to let it build as intended.
That works fine for me on powerpc, so I'm assuming that would also
be ok on powerpc64.  Can you check?
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-02-24 10:03:12 UTC
Yes, that works too.
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2019-02-24 12:07:14 UTC
Thanks.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-02-24 12:07:14 UTC
A commit references this bug:

Author: tobik
Date: Sun Feb 24 12:07:04 UTC 2019
New revision: 493755
URL: https://svnweb.freebsd.org/changeset/ports/493755

Log:
  devel/kore: Fix build on powerpc/powerpc64

  For some reason index(3) is not hidden when building with gcc 4.2.
  Use a newer compiler to work around this.

  src/config.c: In function 'configure_filemap_index':
  src/config.c:812: warning: declaration of 'index' shadows a global declaration
  /usr/include/strings.h:62: warning: shadowed declaration is here

  PR:		235979
  Reported by:	pkubaj@anongoth.pl

Changes:
  head/devel/kore/Makefile