Bug 210991 - astro/gpsbabel: Fix build with libc++ 3.8.0
Summary: astro/gpsbabel: Fix build with libc++ 3.8.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: Thomas Zander
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-07-10 21:52 UTC by Oliver Heesakkers
Modified: 2016-08-28 07:47 UTC (History)
1 user (show)

See Also:
riggs: merge-quarterly+


Attachments
patch to patch exif.cc (1.81 KB, patch)
2016-07-10 21:52 UTC, Oliver Heesakkers
no flags Details | Diff
New patch which eliminates a warning in most build environment (1.81 KB, patch)
2016-07-11 10:49 UTC, Oliver Heesakkers
dev2: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Heesakkers 2016-07-10 21:52:48 UTC
Created attachment 172361 [details]
patch to patch exif.cc

Ever since libc++ 3.8.0 was introduced, I've had pkg fallout bugging me about this. See #208158

Initially I wanted to combine the update to 1.5.3 with a fix for this problem, but to my surprise the update was already done through phabricator by the time I got to it (I know I'm late to update, but not even a courtesy e-mail?).

The original complaint from pkg fallout was "call to 'abs' is ambiguous" and only leads to a failed build under i386.

Replacing abs() with labs(), as is done upstream, would fix the build, but warnings would still be displayed.

Since the problem is presumably caused by QT's toTime_t() I then figured it would be appropriate to replace abs() with QT's qAbs(). The build now completes without error or warning on i386 and completes without error but with a warning on amd64 ("format specifies type 'int' but the argument).

Since this warning is only on printing a warning I figured I'd get patch in as is and try to address this warning later when I get the chance.

Tested against i386 and amd64 1100120.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-11 05:19:48 UTC
Thanks Oliver. Can you please:

* Confirm this passes QA (portlint, poudriere)
* Set maintainer-approval on attachments for ports you are MAINTAINER of
Comment 2 Oliver Heesakkers 2016-07-11 08:20:07 UTC
Yes, Poudriere builds of i386 and amd64 for 1100120 were OK, I'll run more later today.

portlint says "looks fine"
Comment 3 Oliver Heesakkers 2016-07-11 10:49:11 UTC
Created attachment 172371 [details]
New patch which eliminates a warning in most build environment

Updated patch. By adding (int) before the value to print, exif.cc now builds without warning on all tested platforms except 9 i386, where a warning about comparing signed and unsigned persists

Other than that port build succesfully on:
JAILNAME VERSION         ARCH  METHOD TIMESTAMP
10amd64  10.3-RELEASE-p5 amd64 ftp    2016-07-11 11:01:40
10i386   10.3-RELEASE-p5 i386  ftp    2016-07-11 11:03:37
11amd64  11.0-BETA1      amd64 ftp    2016-07-10 22:50:37
11i386   11.0-BETA1      i386  ftp    2016-07-10 22:26:48
9amd64   9.3-RELEASE-p44 amd64 ftp    2016-07-11 11:08:38
9i386    9.3-RELEASE-p44 i386  ftp    2016-07-11 11:13:55

portlint is OK
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-11 11:01:27 UTC
Thank you Oliver
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-11 11:02:45 UTC
Don't forget to obsolete the previous patch :) 

Click Attachment -> Details -> Edit Details -> [X] Obsolete
Comment 6 Oliver Heesakkers 2016-08-14 09:03:38 UTC
Not sure what this PR is waiting for now. I've kind of had it with all the pkg fallout mails.
Comment 7 commit-hook freebsd_committer 2016-08-28 07:43:42 UTC
A commit references this bug:

Author: riggs
Date: Sun Aug 28 07:42:58 UTC 2016
New revision: 421009
URL: https://svnweb.freebsd.org/changeset/ports/421009

Log:
  Fix build with libc++ 3.8.0

  PR:		210991
  Submitted by:	dev2@heesakkers.info (maintainer)
  MFH:		2016Q3 (ports-secteam build fix blanket)

Changes:
  head/astro/gpsbabel/files/patch-exif.cc
Comment 8 commit-hook freebsd_committer 2016-08-28 07:46:44 UTC
A commit references this bug:

Author: riggs
Date: Sun Aug 28 07:45:53 UTC 2016
New revision: 421010
URL: https://svnweb.freebsd.org/changeset/ports/421010

Log:
  MFH: r421009

  Fix build with libc++ 3.8.0

  PR:		210991
  Submitted by:	dev2@heesakkers.info (maintainer)

  Approved by:	ports-secteam (build fix blanket)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/astro/gpsbabel/files/patch-exif.cc