Bug 230400 - devel/cmake, devel/qt5-buildtools: fails to build with libc++ 7
Summary: devel/cmake, devel/qt5-buildtools: fails to build with libc++ 7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks: 230355
  Show dependency treegraph
 
Reported: 2018-08-06 00:31 UTC by Jan Beich
Modified: 2018-08-13 20:54 UTC (History)
3 users (show)

See Also:


Attachments
workaround (468 bytes, patch)
2018-08-06 14:21 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2018-08-06 00:31:12 UTC
$ cc -v
FreeBSD clang version 7.0.0 (branches/release_70 338892) (based on LLVM 7.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix

$ make
[...]
In file included from Source/kwsys/SystemTools.cxx:23:
In file included from Source/cmsys/FStream.hxx:10:
In file included from /usr/include/c++/v1/fstream:184:
In file included from /usr/include/c++/v1/ostream:138:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:18:
In file included from /usr/include/c++/v1/mutex:191:
In file included from /usr/include/c++/v1/__mutex_base:15:
In file included from /usr/include/c++/v1/chrono:795:
/usr/include/c++/v1/ctime:77:9: error: no member named 'timespec_get' in the global namespace; did you mean 'timespec'?
using ::timespec_get;
      ~~^
/usr/include/sys/_timespec.h:46:8: note: 'timespec' declared here
struct timespec {
       ^

build log: https://ptpb.pw/ynfq https://ptpb.pw/WpWK
Comment 1 Jan Beich freebsd_committer freebsd_triage 2018-08-06 00:35:53 UTC
<ctime> in -std=c++17 was broken by https://reviews.llvm.org/rL338419
Comment 2 Jan Beich freebsd_committer freebsd_triage 2018-08-06 14:21:42 UTC
Created attachment 195942 [details]
workaround

Looks like C11 timespec_get() isn't implemented on FreeBSD unlike DragonFly or NetBSD.
Comment 3 Warner Losh freebsd_committer freebsd_triage 2018-08-07 11:33:08 UTC
I'm committing a timespec_get() to -current shortly.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-08-07 17:28:12 UTC
What's the plan for /stable/11? MFC timespec_get(), land the workaround or freeze libc++ (breaking promise in bug 215193) ?
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2018-08-07 20:21:50 UTC
(In reply to Jan Beich from comment #4)
> What's the plan for /stable/11? MFC timespec_get(), land the workaround or
> freeze libc++ (breaking promise in bug 215193) ?

I think timespec_get() is probably fine to MFC, but I'll leave it up to Warner. :)
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-08-10 21:40:52 UTC
A commit references this bug:

Author: dim
Date: Fri Aug 10 21:40:28 UTC 2018
New revision: 337593
URL: https://svnweb.freebsd.org/changeset/base/337593

Log:
  Upstream libc++ added a using ::timespec_get line, when in C++17 or
  higher mode, in <https://reviews.llvm.org/rL338419>.  Since we do not
  yet have this C11 function, comment out the line for now, as a
  workaround for a number of failing ports.  Discussion with upstream is
  ongoing about an acceptable permanent fix.

  PR:		230400
  Reported by:	jbeich

Changes:
  projects/clang700-import/contrib/libc++/include/ctime
Comment 7 Warner Losh freebsd_committer freebsd_triage 2018-08-10 21:48:17 UTC
As of FreeBSD_version 1200077 we have this function, if that helps anybody...
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-08-11 20:09:12 UTC
A commit references this bug:

Author: dim
Date: Sat Aug 11 20:08:26 UTC 2018
New revision: 337654
URL: https://svnweb.freebsd.org/changeset/base/337654

Log:
  Undo r337593 (commenting out of timespec_get in libc++'s <ctime>
  header), now that r337576 added that function.

  PR:		230400

Changes:
  projects/clang700-import/contrib/libc++/include/ctime
Comment 9 Dimitry Andric freebsd_committer freebsd_triage 2018-08-12 18:36:47 UTC
This should now be fixed, please retry those builds.