jdk7-b64 has new dependency on glibc-2.4

Martin Buchholz martinrb at google.com
Mon Jul 27 09:16:18 PDT 2009


I approve this change.

---
build time => run time

 188     /* system calls that might not be available at build time */

---

I am ever so slightly tempted to rearchitect a little,
to have HAS_AT_SYSCALLS be less all-or-nothing,
and to try to move some of this logic to java code.

---

I might consider removing the #ifdef
and unconditionally checking for openat64,
with fallback to openat.

 190 #if defined(__solaris__) && defined(_LP64)
 191     /* Solaris 64-bit does not have openat64/fstatat64 */
 192     my_openat64_func = (openat64_func*)dlsym(RTLD_DEFAULT, "openat");
 193     my_fstatat64_func = (fstatat64_func*)dlsym(RTLD_DEFAULT, "fstatat");
 194 #else
 195     my_openat64_func = (openat64_func*) dlsym(RTLD_DEFAULT, "openat64");
 196     my_fstatat64_func = (fstatat64_func*) dlsym(RTLD_DEFAULT, "fstatat64");
 197 #endif


Martin

On Mon, Jul 27, 2009 at 08:49, Alan Bateman<Alan.Bateman at sun.com> wrote:
> Alan Bateman wrote:
>>
>> Martin Buchholz wrote:
>>>
>>> Hi Alan,
>>>
>>> As of openjdk7-b64, one can no longer build or run on glibc 2.3 systems
>>> because of a new dependency
>>> on fdopendir (and perhaps other glibc 2.4 functions).
>>>
>>> ../../../src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c: In
>>> function 'Java_sun_nio_fs_UnixNativeDispatcher_fdopendir':
>>> ../../../src/solaris/native/sun/nio/fs/UnixNativeDispatcher.c:569:
>>> warning: implicit declaration of function 'fdopendir'
>>>
>>> I have been advocating continued support of glibc 2.3 systems,
>>> but this does not seem to be a popular sentiment.
>>>
>>> Would the nio2 team (and Sun)
>>> - regard the new build failure as a bug to be fixed?
>>> - grudgingly accept patches to allow possibly reduced functionality on
>>> older systems?
>>> - refuse such patches?
>>>
>>> Thanks,
>>>
>>> Martin
>>
>> Sorry for the late reply, I've been on vacation.
>>
>> I don't think I've seen any discussion about the oldest version of glibc
>> that OpenJDK should build with. As you know, in Sun, we build on Fedora 9
>> now (glibc 2.8) so it's possible that dependencies on more recent glibc
>> releases might creep in, unintentionally, as in this case.
>>
>> I don't have any objection to locating fdopendir at runtime. That's the
>> way it used to work before b64 and an over-sight, on my part, that this was
>> only a recent addition to glibc. It's only used in the optional
>> SecureDirectoryStream support and so isn't required to be present. The
>> attached should get you going for now (you've probably done this already).
>> Before you push this or similar, I'd like to re-examine the capability check
>> to see this one should be lumped in with the existing *at calls or be its
>> own capability.
>>
>> -Alan.
>
> Martin - someone pinged me to say the BSD folks had to apply a similar
> patch. As the implementation already works when fdopendir is not present
> then I propose we just revert this to what we had prior to b64. Here's the
> patch:
>   http://cr.openjdk.java.net/~alanb/6864319/webrev.00/
>
> Can you review? If we push it today then it will be in b68.
>
> Thanks,
> Alan.
>
>



More information about the nio-dev mailing list