Bug 209686 - www/webkit2-gtk3: Fix build with libc++ 3.8.0
Summary: www/webkit2-gtk3: 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: Dimitry Andric
: 209972 (view as bug list)
Depends on:
Blocks: 208158
  Show dependency treegraph
Reported: 2016-05-21 22:59 UTC by Dimitry Andric
Modified: 2016-12-17 12:06 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)

Fix type for pow() call in www/webkit2-gtk3 (1.15 KB, patch)
2016-05-21 22:59 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 2016-05-21 22:59:53 UTC
Created attachment 170534 [details]
Fix type for pow() call in www/webkit2-gtk3

During the exp-run in bug 208158, it was found that www/webkit2-gtk3 gives errors with libc++ 3.8.0 [1]:

/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.8.5/Source/WebCore/rendering/shapes/BoxShape.cpp:46:40: error: call to 'pow' is ambiguous
        return radius + (margin * (1 + pow(ratio - 1, 3)));

This is because ratio is of type LayoutUnit, which is a class that has both conversions to float and double.  Therefore, it is ambiguous if pow(float) or pow(double) should be called.  Fix it by explicitly casting to float, since it seems that most of the LayoutUnit handling is done with it.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-05-01_10h29m48s/logs/errors/webkit2-gtk3-2.8.5_2.log
Comment 1 Antoine Brodin freebsd_committer 2016-06-05 07:26:41 UTC
*** Bug 209972 has been marked as a duplicate of this bug. ***
Comment 2 commit-hook freebsd_committer 2016-06-05 19:12:29 UTC
A commit references this bug:

Author: sbruno
Date: Sun Jun  5 19:11:57 UTC 2016
New revision: 416418
URL: https://svnweb.freebsd.org/changeset/ports/416418

  Add explicit cast to float to repair build with libc++ 3.8.0

  PR:		209686
  Submitted by:	dim

Comment 3 Ruslan Makhmatkhanov freebsd_committer 2016-06-07 09:19:29 UTC
Assign to dim@ and close, as the fix was committed.