Bug 225456 - shells/fish fails to build with Clang 6.0
Summary: shells/fish fails to build with Clang 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 Some People
Assignee: Alan Somers
URL:
Keywords: patch
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2018-01-25 20:12 UTC by Alan Somers
Modified: 2018-01-27 18:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2018-01-25 20:12:17 UTC
The Clang 6 upgrade in FreeBSD head has broken shells/fish.  It fails with errors like this:

src/builtin_test.cpp:281:20: error: call to 'make_unique' is ambiguous
            return make_unique<unary_operator>(tok, range_t(start, subject->range.end),
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/memory:3076:1: note: candidate function [with _Tp = test_expressions::unary_operator, _Args = <test_expressions::token_t &, test_expressions::range_t, std::__1::unique_ptr<test_expressions::expression, std::__1::default_delete<test_expressions::expression> >>]
make_unique(_Args&&... __args)

The problem is that Clang isn't defining the feature test macro __cpp_lib_make_unique.  I can fix the build by simply replacing references to that macro with 1, but I'm not sure that's the best thing to do.
Comment 1 Alan Somers freebsd_committer 2018-01-26 16:28:25 UTC
Fix in code review at https://reviews.freebsd.org/D14058
Comment 2 commit-hook freebsd_committer 2018-01-27 18:06:30 UTC
A commit references this bug:

Author: asomers
Date: Sat Jan 27 18:06:19 UTC 2018
New revision: 460135
URL: https://svnweb.freebsd.org/changeset/ports/460135

Log:
  shells/fish: fix the build with Clang-6.0

  Clang-6.0 on FreeBSD 12 doesn't define __cpp_lib_make_unique.  Patch fish to
  key off of the value of __cplusplus instead.

  PR:		225456
  Reported by:	pkg-fallout
  Reviewed by:	jbeich, dim
  Differential Revision:	https://reviews.freebsd.org/D14058

Changes:
  head/shells/fish/files/patch-src_common.h