Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-12-03 Thread Magnus Ihse Bursie
On Tue, 26 Nov 2024 21:20:10 GMT, David Holmes wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 25 commits: >> >> - Merge branch 'master' into static-jdk-image >> - Remove LDFLAGS_STATIC_JDK >> - Ren

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-12-03 Thread Coleen Phillimore
On Mon, 2 Dec 2024 15:11:54 GMT, Magnus Ihse Bursie wrote: >> src/hotspot/os/linux/os_linux.cpp line 590: >> >>> 588: >>> 589: // Found the full path to the binary. It is normally of this >>> structure: >>> 590: // /lib//libjvm.so >> >> You could change to server I believe, since t

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-12-02 Thread Erik Joelsson
On Tue, 26 Nov 2024 17:17:09 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-12-02 Thread Coleen Phillimore
On Tue, 26 Nov 2024 17:17:09 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-12-02 Thread Magnus Ihse Bursie
On Mon, 2 Dec 2024 15:10:08 GMT, Coleen Phillimore wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 25 commits: >> >> - Merge branch 'master' into static-jdk-image >> - Remove LDFLAGS_STATIC_JDK >> -

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-12-02 Thread Jiangli Zhou
On Mon, 2 Dec 2024 15:12:24 GMT, Magnus Ihse Bursie wrote: >> Hotspot changes look fine. >> >> Thanks > > @dholmes-ora @coleenp @erikj79 Thanks for your reviews! @magicus Thanks for integrating the changes, particularly reworking and making the statically linked launcher build changes cleaner!

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-11-26 Thread David Holmes
On Tue, 26 Nov 2024 17:17:09 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-26 Thread Magnus Ihse Bursie
On Tue, 26 Nov 2024 15:32:43 GMT, Magnus Ihse Bursie wrote: >> make/autoconf/buildjdk-spec.gmk.template line 80: >> >>> 78: CXXFLAGS_JDKEXE := @OPENJDK_BUILD_CXXFLAGS_JDKEXE@ >>> 79: LDFLAGS_JDKEXE := @OPENJDK_BUILD_LDFLAGS_JDKEXE@ >>> 80: LDFLAGS_STATIC_JDK := @OPENJDK_BUILD_LDFLAGS_STATIC_JDK@

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v21]

2024-11-26 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-26 Thread Magnus Ihse Bursie
On Tue, 19 Nov 2024 20:35:01 GMT, Erik Joelsson wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Copy debuginfo > > make/modules/java.desktop/lib/ClientLibraries.gmk line 180: > >> 178: deflate.o Defl

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v20]

2024-11-26 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v19]

2024-11-26 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-26 Thread Magnus Ihse Bursie
On Tue, 26 Nov 2024 15:40:13 GMT, Magnus Ihse Bursie wrote: >> make/modules/java.desktop/lib/ClientLibraries.gmk line 166: >> >>> 164: jfdctflt.o jfdctfst.o jfdctint.o jidctflt.o jidctfst.o >>> jidctint.o \ >>> 165: jidctred.o jmemmgr.o jmemnobs.o jpegdecoder.o jquant1.o >>> jq

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v18]

2024-11-26 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-26 Thread Magnus Ihse Bursie
On Tue, 19 Nov 2024 20:34:31 GMT, Erik Joelsson wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Copy debuginfo > > make/modules/java.desktop/lib/ClientLibraries.gmk line 166: > >> 164: jfdctflt.o jfd

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-26 Thread Magnus Ihse Bursie
On Tue, 19 Nov 2024 20:28:18 GMT, Erik Joelsson wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Copy debuginfo > > make/common/JdkNativeCompilation.gmk line 313: > >> 311: # created libraries, and is rea

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-26 Thread Magnus Ihse Bursie
On Tue, 19 Nov 2024 20:21:52 GMT, Erik Joelsson wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Copy debuginfo > > make/autoconf/buildjdk-spec.gmk.template line 80: > >> 78: CXXFLAGS_JDKEXE := @OPENJDK_BUILD

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-19 Thread Erik Joelsson
On Mon, 18 Nov 2024 15:12:12 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-19 Thread Jiangli Zhou
On Wed, 13 Nov 2024 01:40:23 GMT, Jiangli Zhou wrote: >> @jianglizhou Thank you for your assistance in figuring out the problem. I >> guess I throw out too much code from the hermetic-java-runtime branch when >> trying to minimize the changes to only build-related stuff. The jimage >> changes

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v15]

2024-11-18 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v13]

2024-11-18 Thread Magnus Ihse Bursie
On Tue, 3 Sep 2024 19:51:39 GMT, Erik Joelsson wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Also include information about where generated data is consumed. >> - Document how and why we keep track of na

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v11]

2024-11-18 Thread Magnus Ihse Bursie
On Wed, 16 Oct 2024 07:39:06 GMT, Magnus Ihse Bursie wrote: >> Yes, I just pushed a commit that does that. I have manually inspected the >> values and it looks sane, but I need to verify it on our CI system as well. >> The reasoning for us setting some of the ld flags are less than clear, so it

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v16]

2024-11-18 Thread Magnus Ihse Bursie
On Mon, 18 Nov 2024 13:57:29 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v17]

2024-11-18 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v16]

2024-11-18 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v14]

2024-11-18 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v12]

2024-11-18 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-11-18 Thread Magnus Ihse Bursie
On Mon, 21 Oct 2024 13:07:34 GMT, Magnus Ihse Bursie wrote: >> src/java.base/unix/native/libjli/java_md.c line 279: >> >>> 277:char jvmpath[], jint so_jvmpath, >>> 278:char jvmcfg[], jint so_jvmcfg) { >>> 279: /* Compute/set the name o

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v13]

2024-11-18 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-18 Thread Magnus Ihse Bursie
On Wed, 13 Nov 2024 01:40:23 GMT, Jiangli Zhou wrote: >> @jianglizhou Thank you for your assistance in figuring out the problem. I >> guess I throw out too much code from the hermetic-java-runtime branch when >> trying to minimize the changes to only build-related stuff. The jimage >> changes

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v11]

2024-11-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-12 Thread Jiangli Zhou
On Mon, 4 Nov 2024 21:30:10 GMT, Magnus Ihse Bursie wrote: >>> I can confirm that with your patch, and clang, and a complete wipe + >>> rebuild, the .java file loading works. I'm currently testing with gcc as >>> well. >> >> Good. >> >> I tested using gcc. > > @jianglizhou Thank you for your

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-04 Thread Jiangli Zhou
On Mon, 4 Nov 2024 21:24:54 GMT, Magnus Ihse Bursie wrote: > > There is no `static-jdk/bin/java.debuginfo`. I do see there's a > > `./support/static-native/launcher/java.debuginfo`. > > Ah, I missed that part. So it's just about copying it to the right place? > Fine, that is trivial to add. Di

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v10]

2024-11-04 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Jiangli Zhou
On Mon, 4 Nov 2024 21:12:31 GMT, Magnus Ihse Bursie wrote: > I can confirm that with your patch, and clang, and a complete wipe + rebuild, > the .java file loading works. I'm currently testing with gcc as well. Good. I tested using gcc. - PR Comment: https://git.openjdk.org/jdk/

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Magnus Ihse Bursie
On Mon, 4 Nov 2024 21:29:51 GMT, Jiangli Zhou wrote: >>> I notice incremental build with your current PR doesn't update >>> `static-jdk/bin/java` properly. This should be fixed as well. >> >> This I fully agree with; it cannot wait for a follow-up PR. I'll look into >> it as soon as I have got

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Magnus Ihse Bursie
On Fri, 1 Nov 2024 16:25:59 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamica

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-04 Thread Magnus Ihse Bursie
On Sun, 3 Nov 2024 05:06:04 GMT, Jiangli Zhou wrote: > There is no `static-jdk/bin/java.debuginfo`. I do see there's a > `./support/static-native/launcher/java.debuginfo`. Ah, I missed that part. So it's just about copying it to the right place? Fine, that is trivial to add. Did you verify tha

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Magnus Ihse Bursie
On Mon, 4 Nov 2024 19:05:05 GMT, Jiangli Zhou wrote: > I notice incremental build with your current PR doesn't update > `static-jdk/bin/java` properly. This should be fixed as well. This I fully agree with; it cannot wait for a follow-up PR. I'll look into it as soon as I have gotten back to a

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Jiangli Zhou
On Fri, 1 Nov 2024 16:25:59 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamica

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Jiangli Zhou
On Sun, 3 Nov 2024 20:23:32 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 10 commits: >> >> - Merge branch 'master' into static-jdk-image >> - Fix bug in filtering out -Wl,--exclu

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-04 Thread Magnus Ihse Bursie
On Sun, 3 Nov 2024 20:23:32 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 10 commits: >> >> - Merge branch 'master' into static-jdk-image >> - Fix bug in filtering out -Wl,--exclu

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-04 Thread Magnus Ihse Bursie
On Sun, 3 Nov 2024 05:06:04 GMT, Jiangli Zhou wrote: > Please fix the debugging symbol issue in your PR. That is a request with most likely a whole other magnitude of difficulty. Our handling of debug symbols and all its intricacies is tightly coupled to the existing dynamic linking process. I

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-03 Thread Jiangli Zhou
On Fri, 1 Nov 2024 16:25:59 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamica

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-02 Thread Jiangli Zhou
On Sat, 2 Nov 2024 01:05:27 GMT, Jiangli Zhou wrote: > > > I finally noticed that you are testing a precompiled HelloWorld class, > > > and I have been running with a source file argument to have java compile > > > it on the fly. > > > When I try using a pre-compiled HelloWorld, the linux port

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-01 Thread Jiangli Zhou
On Fri, 1 Nov 2024 22:24:28 GMT, Jiangli Zhou wrote: > > I finally noticed that you are testing a precompiled HelloWorld class, and > > I have been running with a source file argument to have java compile it on > > the fly. > > When I try using a pre-compiled HelloWorld, the linux port works fo

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-01 Thread Jiangli Zhou
On Fri, 1 Nov 2024 16:09:20 GMT, Magnus Ihse Bursie wrote: > I finally noticed that you are testing a precompiled HelloWorld class, and I > have been running with a source file argument to have java compile it on the > fly. > > When I try using a pre-compiled HelloWorld, the linux port works f

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-01 Thread Magnus Ihse Bursie
On Fri, 1 Nov 2024 16:25:59 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamica

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-11-01 Thread Magnus Ihse Bursie
On Wed, 23 Oct 2024 08:23:34 GMT, Johan Vos wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Don't hardcode server variant > > I tried to build/run this on Linux as well (since I'm using parts of this PR > in

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v9]

2024-11-01 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-01 Thread Magnus Ihse Bursie
On Tue, 29 Oct 2024 20:43:16 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-11-01 Thread Magnus Ihse Bursie
On Tue, 29 Oct 2024 20:43:16 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-30 Thread Jiangli Zhou
On Thu, 24 Oct 2024 23:36:19 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Don't hardcode server variant > >> > > When trying to sort out the LDFLAGS issues, it turned out that I could >>

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v8]

2024-10-29 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-29 Thread Magnus Ihse Bursie
On Thu, 24 Oct 2024 23:36:19 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Don't hardcode server variant > >> > > When trying to sort out the LDFLAGS issues, it turned out that I could >>

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-24 Thread Jiangli Zhou
On Tue, 15 Oct 2024 20:22:52 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-24 Thread Jiangli Zhou
On Wed, 23 Oct 2024 01:40:59 GMT, Jiangli Zhou wrote: > > When trying to sort out the LDFLAGS issues, it turned out that I could not > > run the linux launcher at all, not even when checking out older commits of > > this PR. I am almost at a loss here; I assume that this worked when I > > crea

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-24 Thread Magnus Ihse Bursie
On Tue, 15 Oct 2024 20:22:52 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-23 Thread Johan Vos
On Tue, 15 Oct 2024 20:22:52 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-22 Thread Jiangli Zhou
On Mon, 21 Oct 2024 13:17:27 GMT, Magnus Ihse Bursie wrote: > When trying to sort out the LDFLAGS issues, it turned out that I could not > run the linux launcher at all, not even when checking out older commits of > this PR. I am almost at a loss here; I assume that this worked when I created

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-21 Thread Magnus Ihse Bursie
On Tue, 15 Oct 2024 20:22:52 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-21 Thread Magnus Ihse Bursie
On Fri, 18 Oct 2024 18:23:13 GMT, Johan Vos wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Don't hardcode server variant > > src/java.base/unix/native/libjli/java_md.c line 279: > >> 277:

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-18 Thread Johan Vos
On Tue, 15 Oct 2024 20:22:52 GMT, Magnus Ihse Bursie wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamic

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-16 Thread Magnus Ihse Bursie
On Tue, 15 Oct 2024 19:31:45 GMT, Magnus Ihse Bursie wrote: >>> After thinking a bit more on this, I concluded that we cannot automatically >>> extract a proper set of ld flags from what's being passed to the individual >>> libraries. The LDFLAGS needed by the monolithic static library needs to

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-15 Thread Jaikiran Pai
On Tue, 15 Oct 2024 18:39:50 GMT, Magnus Ihse Bursie wrote: >> src/java.base/unix/native/libjli/java_md.c line 509: >> >>> 507: >>> 508: if (GetApplicationHome(path, pathsize)) { >>> 509: if (JLI_IsStaticallyLinked()) { >> >> In passing, GetJREPath's function description includes "

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v7]

2024-10-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v6]

2024-10-15 Thread Magnus Ihse Bursie
On Tue, 15 Oct 2024 18:59:32 GMT, Jiangli Zhou wrote: >> After thinking a bit more on this, I concluded that we cannot automatically >> extract a proper set of ld flags from what's being passed to the individual >> libraries. The LDFLAGS needed by the monolithic static library needs to be >> e

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v6]

2024-10-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v5]

2024-10-15 Thread Jiangli Zhou
On Tue, 15 Oct 2024 18:50:27 GMT, Magnus Ihse Bursie wrote: > After thinking a bit more on this, I concluded that we cannot automatically > extract a proper set of ld flags from what's being passed to the individual > libraries. The LDFLAGS needed by the monolithic static library needs to be >

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v5]

2024-10-15 Thread Magnus Ihse Bursie
On Thu, 5 Sep 2024 20:41:35 GMT, Jiangli Zhou wrote: >> You are right, this is dead code. Thanks for spotting this. >> >> During my experimentation, I tried passing along LDFLAGS from the individual >> libraries as well, but it turned out not to be a good idea -- the way we >> have used them

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v5]

2024-10-15 Thread Magnus Ihse Bursie
On Thu, 5 Sep 2024 00:15:35 GMT, Jiangli Zhou wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update GetJREPath comment and remove unnecessary JLI_IsStaticallyLinked >> check > > src/java.base/unix/native/li

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v5]

2024-10-15 Thread Magnus Ihse Bursie
On Thu, 5 Sep 2024 10:17:11 GMT, Alan Bateman wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update GetJREPath comment and remove unnecessary JLI_IsStaticallyLinked >> check > > src/java.base/unix/native/li

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v5]

2024-10-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v4]

2024-10-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v3]

2024-10-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher [v2]

2024-10-15 Thread Magnus Ihse Bursie
> As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically, linked. > > This patch is the first step towards this goal.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-10-15 Thread Magnus Ihse Bursie
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Jiangli Zhou
On Thu, 5 Sep 2024 09:57:15 GMT, Magnus Ihse Bursie wrote: >> make/modules/java.desktop/lib/AwtLibraries.gmk line 176: >> >>> 174: >>> 175: ifneq ($(ENABLE_HEADLESS_ONLY), true) >>> 176: # We cannot link with both awt_headless and awt_xawt at the same >>> time >> >> Just a note on that.

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Jiangli Zhou
On Thu, 5 Sep 2024 10:03:19 GMT, Magnus Ihse Bursie wrote: >> make/StaticLibs.gmk line 118: >> >>> 116: OPTIMIZATION := HIGH, \ >>> 117: STATIC_LAUNCHER := true, \ >>> 118: LDFLAGS := $(JAVASTATIC_LINK_LDFLAGS), \ >> >> I could be missing something, but I don't see where is >> $JAV

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Jiangli Zhou
On Thu, 5 Sep 2024 05:06:55 GMT, Julian Waters wrote: >> make/StaticLibs.gmk line 71: >> >>> 69: # libsspi_bridge has name conflicts with sunmscapi >>> 70: BROKEN_STATIC_LIBS += sspi_bridge >>> 71: # These libs define DllMain which conflict with Hotspot >> >> I'm not aware of the DllMain

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Jiangli Zhou
On Thu, 5 Sep 2024 09:50:49 GMT, Magnus Ihse Bursie wrote: > Well, but your proof-of-concept only supports clang on linux, where you have > enabled symbol hiding. The hermetic-java-runtime branch doesn't have general symbol hiding enabled. That's why I'm wondering what the issues are with thes

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Alan Bateman
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Magnus Ihse Bursie
On Wed, 4 Sep 2024 23:24:13 GMT, Jiangli Zhou wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamically, l

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Magnus Ihse Bursie
On Wed, 4 Sep 2024 23:28:10 GMT, Jiangli Zhou wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamically, l

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Magnus Ihse Bursie
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Magnus Ihse Bursie
On Wed, 4 Sep 2024 23:03:23 GMT, Jiangli Zhou wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamically, l

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-05 Thread Magnus Ihse Bursie
On Thu, 5 Sep 2024 05:06:55 GMT, Julian Waters wrote: >> make/StaticLibs.gmk line 71: >> >>> 69: # libsspi_bridge has name conflicts with sunmscapi >>> 70: BROKEN_STATIC_LIBS += sspi_bridge >>> 71: # These libs define DllMain which conflict with Hotspot >> >> I'm not aware of the DllMain

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-04 Thread Julian Waters
On Wed, 4 Sep 2024 23:06:00 GMT, Jiangli Zhou wrote: >> As a prerequisite for Hermetic Java, we need a statically linked `java` >> launcher. It should behave like the normal, dynamically linked `java` >> launcher, except that all JDK native libraries should be statically, not >> dynamically, l

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-04 Thread Jiangli Zhou
On Tue, 3 Sep 2024 12:51:13 GMT, Magnus Ihse Bursie wrote: > @jianglizhou Can you please check if there are any other contributors that > should be acknowledged? Thanks for asking! I checked all the related changes in https://github.com/openjdk/leyden/tree/hermetic-java-runtime branch. Followi

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-04 Thread Jiangli Zhou
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-04 Thread Jiangli Zhou
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-04 Thread Jiangli Zhou
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-03 Thread Erik Joelsson
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-03 Thread Magnus Ihse Bursie
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-03 Thread Magnus Ihse Bursie
On Tue, 3 Sep 2024 18:10:06 GMT, Erik Joelsson wrote: > I'm guessing this would work if I built the regular image first, or at least > at the same time. No, I don't think that should matter. `static-jdk-image` depends on `exploded-image`, and the files in your error message resides in `jdk`, n

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-03 Thread Erik Joelsson
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

Re: RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-03 Thread Magnus Ihse Bursie
On Tue, 3 Sep 2024 12:50:01 GMT, Magnus Ihse Bursie wrote: > As a prerequisite for Hermetic Java, we need a statically linked `java` > launcher. It should behave like the normal, dynamically linked `java` > launcher, except that all JDK native libraries should be statically, not > dynamically,

RFR: 8339480: Build static-jdk image with a statically linked launcher

2024-09-03 Thread Magnus Ihse Bursie
As a prerequisite for Hermetic Java, we need a statically linked `java` launcher. It should behave like the normal, dynamically linked `java` launcher, except that all JDK native libraries should be statically, not dynamically, linked. This patch is the first step towards this goal. It will gen