Bug 237949 - print/libraqm: fix build with GCC-based architectures
Summary: print/libraqm: fix build with GCC-based architectures
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: Koop Mast
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-17 11:41 UTC by Piotr Kubaj
Modified: 2019-06-20 11:15 UTC (History)
2 users (show)

See Also:
kwm: maintainer-feedback+


Attachments
patch (6.50 KB, patch)
2019-05-17 11:41 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (kwm)
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-05-17 11:41:23 UTC
Created attachment 204427 [details]
patch

Don't shadow global variable index:
cc1: warnings being treated as errors
raqm.c: In function '_raqm_u32_to_u8_index':
raqm.c:1602: warning: declaration of 'index' shadows a global declaration
/usr/include/strings.h:62: warning: shadowed declaration is here
raqm.c: In function '_raqm_u8_to_u32_index':
raqm.c:1619: warning: declaration of 'index' shadows a global declaration
/usr/include/strings.h:62: warning: shadowed declaration is here
raqm.c: In function 'raqm_index_to_position':
raqm.c:1658: warning: declaration of 'index' shadows a global declaration
/usr/include/strings.h:62: warning: shadowed declaration is here
raqm.c: In function 'raqm_position_to_index':
raqm.c:1752: warning: declaration of 'index' shadows a global declaration
/usr/include/strings.h:62: warning: shadowed declaration is here


Fails to build with base GCC.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-06-14 07:13:25 UTC
A commit references this bug:

Author: pkubaj
Date: Fri Jun 14 07:13:01 UTC 2019
New revision: 504166
URL: https://svnweb.freebsd.org/changeset/ports/504166

Log:
  print/libraqm: fix build with GCC-based architectures

  Don't shadow global variable index:
  cc1: warnings being treated as errors
  raqm.c: In function '_raqm_u32_to_u8_index':
  raqm.c:1602: warning: declaration of 'index' shadows a global declaration

  Fails to build with base GCC.

  PR:		237949
  Approved by:	kwm (maintainer), mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D20613

Changes:
  head/print/libraqm/files/
  head/print/libraqm/files/patch-src_raqm.c
Comment 2 dewayne 2019-06-20 11:15:07 UTC
(In reply to commit-hook from comment #1)
A quick data-point.

With the patch the package builds on i386 FreeBSD11.3Prerelease using gcc8 (8.3.0) and port's binutils.

Interestingly it failed to build with clang 8.0.0 on same machine.