Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Magnus Ihse Bursie
On Thu, 1 Feb 2024 15:54:40 GMT, Matthias Baesken  wrote:

>>> @MBaesken So my fix in 
>>> [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386)
>>>  did not help? Maybe then it is some other system library that drags in 
>>> `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way 
>>> too much that it does not need, so we can surely strip it of even more 
>>> standard includes if that is what is required to fix this.
>> 
>> 
>> Unfortunately it did not help.
>
>> @MBaesken How annoying. :( I have now tried to remove _all_ system includes 
>> from `debug_util.h`. Can you please try again building debug on AIX, to see 
>> if it works without the `#undef` in `BufferedRenderPipe.c`?
> 
> The AIX (fast)debug  build still fails .

@MBaesken Ok, I officially give up. :-( I added your patch from 
https://github.com/openjdk/jdk/pull/17538#issuecomment-1918699480. I agree that 
it is not elegant, but at least it works.

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1923062901


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Magnus Ihse Bursie
On Thu, 1 Feb 2024 12:13:08 GMT, Alan Bateman  wrote:

> Can you confirm that you've run tier1-4 at least? Some of the library code 
> that is changed here is not tested in the lower tiers.

I have run tier1-4 now, and it passes (bar the tests that are currently failing 
in mainline). However, this only tests 64-bit builds, and these changes do not 
affect 64-bit builds, only 32-bit linux. So the tier1-4 is more of a sanity 
check that I did not inadvertenly broke any 64-bit code.

To really test that this works properly, a 32-bit linux with an assortment of 
operations on > 2GB files would be needed. To the best of my knowledge, we have 
no such test environment available, and I could not even try to think of how to 
create such a test setup that does anything useful. (That is, if I even were to 
spend any time on creating new tests for 32-bit platforms...)

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921697168


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Matthias Baesken
On Thu, 1 Feb 2024 13:47:45 GMT, Matthias Baesken  wrote:

>> After adding this additional patch I  fully build fastdebug on AIX (hav to 
>> admit it does not look very nice).
>> 
>> 
>> diff --git 
>> a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c 
>> b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> index 823475b0a23..ee0109b6806 100644
>> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> @@ -31,6 +31,10 @@
>>  #include "SpanIterator.h"
>>  #include "Trace.h"
>>  
>> +#if defined(_AIX) && defined(open)
>> +#undef open
>> +#endif
>> +
>>  /* The "header" consists of a jint opcode and a jint span count value */
>>  #define INTS_PER_HEADER  2
>>  #define BYTES_PER_HEADER 8
>
>> @MBaesken So my fix in 
>> [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386)
>>  did not help? Maybe then it is some other system library that drags in 
>> `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way 
>> too much that it does not need, so we can surely strip it of even more 
>> standard includes if that is what is required to fix this.
> 
> 
> Unfortunately it did not help.

> @MBaesken How annoying. :( I have now tried to remove _all_ system includes 
> from `debug_util.h`. Can you please try again building debug on AIX, to see 
> if it works without the `#undef` in `BufferedRenderPipe.c`?

The AIX (fast)debug  build still fails .

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921645170


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Magnus Ihse Bursie
On Thu, 1 Feb 2024 13:47:45 GMT, Matthias Baesken  wrote:

>> After adding this additional patch I  fully build fastdebug on AIX (hav to 
>> admit it does not look very nice).
>> 
>> 
>> diff --git 
>> a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c 
>> b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> index 823475b0a23..ee0109b6806 100644
>> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
>> @@ -31,6 +31,10 @@
>>  #include "SpanIterator.h"
>>  #include "Trace.h"
>>  
>> +#if defined(_AIX) && defined(open)
>> +#undef open
>> +#endif
>> +
>>  /* The "header" consists of a jint opcode and a jint span count value */
>>  #define INTS_PER_HEADER  2
>>  #define BYTES_PER_HEADER 8
>
>> @MBaesken So my fix in 
>> [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386)
>>  did not help? Maybe then it is some other system library that drags in 
>> `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way 
>> too much that it does not need, so we can surely strip it of even more 
>> standard includes if that is what is required to fix this.
> 
> 
> Unfortunately it did not help.

@MBaesken How annoying. :( I have now tried to remove *all* system includes 
from `debug_util.h`. Can you please try again building debug on AIX, to see if 
it works without the `#undef` in `BufferedRenderPipe.c`?

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921455438


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Matthias Baesken
On Wed, 31 Jan 2024 09:19:39 GMT, Matthias Baesken  wrote:

>> Magnus Ihse Bursie has updated the pull request with a new target base due 
>> to a merge or a rebase. The incremental webrev excludes the unrelated 
>> changes brought in by the merge/rebase. The pull request contains seven 
>> additional commits since the last revision:
>> 
>>  - Merge branch 'master' into jdk-FOB64
>>  - Move #include  out of debug_util.h
>>  - Restore AIX dirent64 et al defines
>>  - Rollback AIX changes since they are now tracked in JDK-8324834
>>  - Remove superfluous setting of FOB64
>>  - Replace all foo64() with foo() for large-file functions in the JDK
>>  - 8324539: Do not use LFS64 symbols in JDK libs
>
> After adding this additional patch I  fully build fastdebug on AIX (hav to 
> admit it does not look very nice).
> 
> 
> diff --git 
> a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c 
> b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> index 823475b0a23..ee0109b6806 100644
> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> @@ -31,6 +31,10 @@
>  #include "SpanIterator.h"
>  #include "Trace.h"
>  
> +#if defined(_AIX) && defined(open)
> +#undef open
> +#endif
> +
>  /* The "header" consists of a jint opcode and a jint span count value */
>  #define INTS_PER_HEADER  2
>  #define BYTES_PER_HEADER 8

> @MBaesken So my fix in 
> [25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386)
>  did not help? Maybe then it is some other system library that drags in 
> `fcntl.h`; I assumed it was stdlib or stdio. That header file includes way 
> too much that it does not need, so we can surely strip it of even more 
> standard includes if that is what is required to fix this.


Unfortunately it did not help.

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921367368


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Alan Bateman
On Tue, 30 Jan 2024 14:15:57 GMT, Magnus Ihse Bursie  wrote:

>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we 
>> should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK 
>> native libraries.
>
> Magnus Ihse Bursie has updated the pull request with a new target base due to 
> a merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains seven additional 
> commits since the last revision:
> 
>  - Merge branch 'master' into jdk-FOB64
>  - Move #include  out of debug_util.h
>  - Restore AIX dirent64 et al defines
>  - Rollback AIX changes since they are now tracked in JDK-8324834
>  - Remove superfluous setting of FOB64
>  - Replace all foo64() with foo() for large-file functions in the JDK
>  - 8324539: Do not use LFS64 symbols in JDK libs

I skimmed through the changes and they look okay. Can you confirm that you've 
run tier1-4 at least? Some of the library code that is changed here is not 
tested in the lower tiers.

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1921189429


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-02-01 Thread Magnus Ihse Bursie
On Wed, 31 Jan 2024 09:19:39 GMT, Matthias Baesken  wrote:

>> Magnus Ihse Bursie has updated the pull request with a new target base due 
>> to a merge or a rebase. The incremental webrev excludes the unrelated 
>> changes brought in by the merge/rebase. The pull request contains seven 
>> additional commits since the last revision:
>> 
>>  - Merge branch 'master' into jdk-FOB64
>>  - Move #include  out of debug_util.h
>>  - Restore AIX dirent64 et al defines
>>  - Rollback AIX changes since they are now tracked in JDK-8324834
>>  - Remove superfluous setting of FOB64
>>  - Replace all foo64() with foo() for large-file functions in the JDK
>>  - 8324539: Do not use LFS64 symbols in JDK libs
>
> After adding this additional patch I  fully build fastdebug on AIX (hav to 
> admit it does not look very nice).
> 
> 
> diff --git 
> a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c 
> b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> index 823475b0a23..ee0109b6806 100644
> --- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> +++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
> @@ -31,6 +31,10 @@
>  #include "SpanIterator.h"
>  #include "Trace.h"
>  
> +#if defined(_AIX) && defined(open)
> +#undef open
> +#endif
> +
>  /* The "header" consists of a jint opcode and a jint span count value */
>  #define INTS_PER_HEADER  2
>  #define BYTES_PER_HEADER 8

@MBaesken So my fix in 
[25c691d](https://github.com/openjdk/jdk/pull/17538/commits/25c691df823eb9d9db1451637f28d59dd9508386)
 did not help? Maybe then it is some other system library that drags in 
`fcntl.h`; I assumed it was stdlib or stdio. That header file includes way too 
much that it does not need, so we can surely strip it of even more standard 
includes if that is what is required to fix this.

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1920844523


Re: RFR: 8324539: Do not use LFS64 symbols in JDK libs [v4]

2024-01-31 Thread Matthias Baesken
On Tue, 30 Jan 2024 14:15:57 GMT, Magnus Ihse Bursie  wrote:

>> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we 
>> should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK 
>> native libraries.
>
> Magnus Ihse Bursie has updated the pull request with a new target base due to 
> a merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains seven additional 
> commits since the last revision:
> 
>  - Merge branch 'master' into jdk-FOB64
>  - Move #include  out of debug_util.h
>  - Restore AIX dirent64 et al defines
>  - Rollback AIX changes since they are now tracked in JDK-8324834
>  - Remove superfluous setting of FOB64
>  - Replace all foo64() with foo() for large-file functions in the JDK
>  - 8324539: Do not use LFS64 symbols in JDK libs

After adding this additional patch I  fully build fastdebug on AIX (hav to 
admit it does not look very nice).


diff --git 
a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c 
b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
index 823475b0a23..ee0109b6806 100644
--- a/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
+++ b/src/java.desktop/share/native/libawt/java2d/pipe/BufferedRenderPipe.c
@@ -31,6 +31,10 @@
 #include "SpanIterator.h"
 #include "Trace.h"
 
+#if defined(_AIX) && defined(open)
+#undef open
+#endif
+
 /* The "header" consists of a jint opcode and a jint span count value */
 #define INTS_PER_HEADER  2
 #define BYTES_PER_HEADER 8

-

PR Comment: https://git.openjdk.org/jdk/pull/17538#issuecomment-1918699480