Bug 198091 - Fix devel/google-sparsehash build with clang 3.6.0
Summary: Fix devel/google-sparsehash build with clang 3.6.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Vasil Dimov
URL:
Keywords:
Depends on:
Blocks: 197395
  Show dependency treegraph
 
Reported: 2015-02-28 12:39 UTC by Dimitry Andric
Modified: 2015-03-04 08:52 UTC (History)
0 users

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


Attachments
Use swap member function instead of free swap function, to appease clang 3.6.0 (1.12 KB, patch)
2015-02-28 12:39 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 2015-02-28 12:39:22 UTC
Created attachment 153611 [details]
Use swap member function instead of free swap function, to appease clang 3.6.0

During the exp-run in bug 197395, it was found that devel/google-sparsehash gives errors with clang 3.6.0:

http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-27_12h37m16s/logs/errors/google-sparsehash-2.0.2_2.log

The error is because clang 3.6.0 has become more strict about matching non-type template parameters.  However, I am not completely sure if the construction google-sparsehash is using is legal or not, and whether clang is correct to refuse it.  It looks like different versions of gcc have different opinions on the legality of non-type template parameter deduction.

I will submit a bug report upstream with clang to figure that out, but in the mean time, I want to propose using the attached patch, which makes hashtable_test.cc use the swap member functions, instead of the free swap functions.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-28 12:39:22 UTC
Auto-assigned to maintainer vd@FreeBSD.org
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-03-04 08:44:10 UTC
A commit references this bug:

Author: vd
Date: Wed Mar  4 08:43:46 UTC 2015
New revision: 380423
URL: https://svnweb.freebsd.org/changeset/ports/380423

Log:
  Fix compilation of devel/google-sparsehash with clang 3.6.0

  PR:		198091
  Submitted by:	 Dimitry Andric

Changes:
  head/devel/google-sparsehash/files/patch-src__hashtable_test.cc
Comment 3 Vasil Dimov freebsd_committer freebsd_triage 2015-03-04 08:52:01 UTC
Committed, thanks!

Notice that I limited the effect of the patch to only clang >= 3.6.0.