[libcxx-commits] [libcxx] [libcxx] Re-include <osreldate.h> in __config for FreeBSD (PR #77242)
Dimitry Andric via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 8 00:29:33 PST 2024
DimitryAndric wrote:
> What issue were you seeing on FreeBSD that prompted this change?
I was building a bunch of FreeBSD ports against llvm-18 (including libcxx-18), and for example openjdk11 failed with:
```text
In file included from /wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.21-9-1/src/hotspot/share/adlc/adlparse.cpp:27:
In file included from /wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.21-9-1/src/hotspot/share/adlc/adlc.hpp:33:
In file included from /usr/include/c++/v1/iostream:43:
In file included from /usr/include/c++/v1/ios:223:
In file included from /usr/include/c++/v1/__locale:23:
In file included from /usr/include/c++/v1/string:600:
In file included from /usr/include/c++/v1/__string/char_traits.h:26:
/usr/include/c++/v1/cstdio:163:9: error: no member named 'gets' in the global namespace
using ::gets _LIBCPP_USING_IF_EXISTS;
~~^
1 error generated.
gmake[4]: *** [gensrc/GensrcAdlc.gmk:73: /wrkdirs/usr/ports/java/openjdk11/work/jdk11u-jdk-11.0.21-9-1/build/bsd-x86_64-normal-server-release/hotspot/variant-server/tools/adlc/objs/adlparse.o] Error 1
```
While investigating I found that `_LIBCPP_C_HAS_NO_GETS` wasn't being defined anymore, so it still encountered this declaration, and failed on it.
Now that you have remarked this, I think I will look into it a bit more, since I never fully understood the "using_if_exists" stuff. As far as I remember, it never worked for us, in that the header will still produce an error if the `_LIBCPP_C_HAS_NO_GETS` check is removed.
https://github.com/llvm/llvm-project/pull/77242
More information about the libcxx-commits
mailing list