[8u] [RFR] Request for Review of Backport of JDK-8179887: Build failure with glibc >= 2.24: error: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated
gnu.andrew at redhat.com
Thu Jul 5 20:05:50 UTC 2018
On 5 July 2018 at 05:03, David Holmes <david.holmes at oracle.com> wrote:
> Hi Andrew,
> As far as I can see this got quite messy. We initially disabled the warning
> to fix the build problem. Then we actually changed the code in 8179887. But
> that broke JFR's use of the API:
Yes, I saw this just before posting the backport, but couldn't figure out how/if
it related to 8u. There is no JFR in OpenJDK 8u, is there? Certainly,
I don't see
the os_perf_linux.cpp file in Bernard's proposed patch in 8u. Maybe you could
shed some light on this.
> and that and:
> remain open and unresolved.
The JDK side doesn't cause the same problems as the HotSpot side because
it isn't built with -Werror. Currently, I can't build 8u on a system
with a recent
glibc without patching out the readdir_r usage in some way. As you may
guess, it's becoming a bit of a pain. So there's not the same need to
backport this to 8u.
That said, is there a reason the patch hasn't made it into the mainline yet?
I couldn't see any follow-on in the mailing list archive.
> I'd be inclined to disable the build warning for 8u rather than make code
> changes (which will likely still break JFR).
This was my first inclination - and it's what we went with for OpenJDK
7   -
but it brings its own problems. The way it was disabled at first uses inline
pragmas that don't work with older versions of GCC that are used to build
8. Moving the pragma outside the function is problematic because this is an
inline header file.
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Web Site: http://fuseyism.com
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the hotspot-dev