Bug 244401 - print/libraqm: Fix build with clang 10.0.0
Summary: print/libraqm: Fix build with clang 10.0.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koop Mast
URL:
Keywords: buildisok
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-02-25 17:51 UTC by Dimitry Andric
Modified: 2020-04-02 18:15 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (kwm)
zeising: merge-quarterly+


Attachments
Fix comparisons in libraqm (1.51 KB, patch)
2020-02-25 17:51 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2020-02-25 17:51:38 UTC
Created attachment 211932 [details]
Fix comparisons in libraqm

As reported in bug 244251, with clang 10.0.0 the print/libraqm port runs into several -Werror warnings:

raqm.c:1934:24: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
      if (ch != 0x102B || ch != 0x102C || ch != 0x1038 ||
          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1937:25: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          (ch <= 0x109A && ch >= 0x109C) || ch != 0x1A61 || ch != 0x1A63 ||
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1936:41: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          ch != 0x1083 || (ch <= 0x1087 && ch >= 0x108C) || ch != 0x108F ||
                           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1935:59: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          (ch <= 0x1062 && ch >= 0x1064) || (ch <= 0x1067 && ch >= 0x106D) ||
                                             ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
raqm.c:1935:25: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
          (ch <= 0x1062 && ch >= 0x1064) || (ch <= 0x1067 && ch >= 0x106D) ||
           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
5 errors generated.

The comparisons are clearly invalid as written, and this is most likely due to incorrect boolean inversion done on the negated expression.

This problem has been reported upstream too:
https://github.com/HOST-Oman/libraqm/issues/115

The attached patch is what I have also proposed upstream.
Comment 1 Automation User 2020-03-11 00:27:00 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/125121988
Comment 2 Dries Michiels freebsd_committer freebsd_triage 2020-03-28 17:56:41 UTC
As this is a port where 433 other ports depend on, could we get this fix committed in the tree? :-) print/libraqm (433 skipped) (from the exp-run).
Its been about a month now since this PR was initiated. Thanks ahead!
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2020-03-28 18:08:01 UTC
(In reply to Dries Michiels from comment #2)
Yeah I'd say commit it.  Upstream seems to be dead.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-04-02 15:06:30 UTC
A commit references this bug:

Author: zeising
Date: Thu Apr  2 15:05:52 UTC 2020
New revision: 530379
URL: https://svnweb.freebsd.org/changeset/ports/530379

Log:
  print/libraqm: FIx build with llvm 10

  Fix the build of print/libraqm with llvm 10.

  PR:		244401
  Submitted by:	dim
  Approved by:	maintainer timeout
  MFH:		2020Q2

Changes:
  head/print/libraqm/files/patch-src_raqm.c
Comment 5 Niclas Zeising freebsd_committer freebsd_triage 2020-04-02 15:07:41 UTC
Committed this, since it breaks so many downstream ports, including ImageMagick and so on.  Waiting for MFH
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-04-02 18:13:46 UTC
A commit references this bug:

Author: zeising
Date: Thu Apr  2 18:11:43 UTC 2020
New revision: 530394
URL: https://svnweb.freebsd.org/changeset/ports/530394

Log:
  MFH: r530379

  print/libraqm: FIx build with llvm 10

  Fix the build of print/libraqm with llvm 10.

  PR:		244401
  Submitted by:	dim
  Approved by:	maintainer timeout

  Approved by:	ports-secteam (joenum)

Changes:
_U  branches/2020Q2/
  branches/2020Q2/print/libraqm/files/patch-src_raqm.c
Comment 7 Niclas Zeising freebsd_committer freebsd_triage 2020-04-02 18:15:19 UTC
All done, thanks!