[llvm-bugs] [Bug 38495] New: After r338419, <ctime> no longer compiles on FreeBSD, due to lack of timespec_get()

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 8 22:34:54 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38495

            Bug ID: 38495
           Summary: After r338419, <ctime> no longer compiles on FreeBSD,
                    due to lack of timespec_get()
           Product: libc++
           Version: 7.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

See also: https://bugs.freebsd.org/230400

While testing 7.0.0 rc1, we got 2028 new libc++ test failures, most of which
are due to errors similar to:

In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp:26:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/iostream:38:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/ios:216:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/__locale:18:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/mutex:191:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/__mutex_base:15:
In file included from
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/chrono:795:
/home/dim/llvm/7.0.0/rc1/llvm.src/projects/libcxx/include/ctime:77:9: error: no
member named 'timespec_get' in the global namespace; did you mean 'timespec'?
using ::timespec_get;
     ~~^~~~~~~~~~~~
       timespec
/usr/include/sys/_timespec.h:44:8: note: 'timespec' declared here
struct timespec {
      ^

This is due to FreeBSD not having timespec_get(), even though it is apparently
required by C11, and the conditional in <ctime> being:

#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES)
using ::timespec_get;
#endif

Work is ongoing to add timespec_get() to FreeBSD, but for 7.0.0 a workaround
would be nice.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180809/424cf5b2/attachment.html>


More information about the llvm-bugs mailing list