Re: RFR: 8136556 - Add the ability to perform static builds of MacOSX x64 binaries

2015-10-19 Thread Christian Thalinger

> On Oct 19, 2015, at 8:09 AM, Bob Vandette  wrote:
> 
> Here’s the updated set of webrev’s that address two issues:
> 
> 1. Move jni_util.h out of jawt.h
> 2. Christians concern over using a single variable name for Makefile and 
> C/C++ logic.

Thanks.  Looks good to me.

> 
> http://cr.openjdk.java.net/~bobv/8136556/webrev.01 
> 
> http://cr.openjdk.java.net/~bobv/8136556/hotspot/webrev.01 
> 
> http://cr.openjdk.java.net/~bobv/8136556/jdk/webrev.01 
> 
> 
> Bob.
> 
>> On Oct 16, 2015, at 2:28 AM, Alan Bateman > > wrote:
>> 
>> On 15/10/2015 19:07, Bob Vandette wrote:
>>> Please review this JDK 9 enhancement which allows a completely static build 
>>> of the JDK for MacOSX x64 platforms.
>>> 
>>> https://bugs.openjdk.java.net/browse/JDK-8136556 
>>>  
>>> >> >
>>> 
>>> The change involves:
>>> 
>>> 1. Producing “.a” archives for each native libraries.
>>> 2. Ensuring that all symbols across the JDK native libraries are unique.
>>> 3. Changing the JNI_OnLoad and JNI_OnUnload (and the Agent equivalents) to 
>>> have the each library name appended per
>>>the JNI specification.
>>> 4. Modifications to the launcher and launcher Makefiles to allow them to be 
>>> linked with the java.base and jdk.jdwp.agent libraries
>>>and function.
>>> 
>>> http://cr.openjdk.java.net/~bobv/8136556/webrev.00/ 
>>>  
>>> >> >
>>> http://cr.openjdk.java.net/~bobv/8136556/hotspot/webrev.00/ 
>>>  
>>> >> >
>>> http://cr.openjdk.java.net/~bobv/8136556/jdk/webrev.00/ 
>>>  
>>> >> >
>>> 
>>> Note: This change does not link every possible static library with the 
>>> launchers.  It is currently limited to
>>> the java.base and jdk.jdwp.agent libraries in order to allow for the TCK 
>>> validation of the base module only.
>>> 
>> I've skimmed through the patches and the DEF_* macros look okay. The only 
>> one that doesn't look right is jawt.h/jawt.c. As jawt.h is shipped by the 
>> JDK then I think the include of jni_util.h needs to move from jawt.h to 
>> jawt.c.
>> 
>> If I read the changes correctly then not loading the 
>> JavaRuntimeSupport.framework on Mac means the locale might not be right, is 
>> that correct? Brent might remember this issue as we've often pondered the 
>> implications of this disappearing in an Mac update.
>> 
>> Will there be continuous or at least regular builds setup so that build 
>> breakages will be reported in a timely manner? It would be easy to change 
>> something that breaks the static library build.
>> 
>> -Alan
> 



Re: RFR: 8136556 - Add the ability to perform static builds of MacOSX x64 binaries

2015-10-16 Thread Naoto Sato

Hi Bob, Alan,

On 10/16/15 8:11 AM, Bob Vandette wrote:

I've skimmed through the patches and the DEF_* macros look okay. The only one 
that doesn't look right is jawt.h/jawt.c. As jawt.h is shipped by the JDK then 
I think the include of jni_util.h needs to move from jawt.h to jawt.c.

Ok, I’ll take care of that.


If I read the changes correctly then not loading the 
JavaRuntimeSupport.framework on Mac means the locale might not be right, is 
that correct? Brent might remember this issue as we've often pondered the 
implications of this disappearing in an Mac update.

The implementation falls back to the getPosixLocale function when the Framework 
doesn’t exist.


In that case, the locale settings in the MacOSX's Settings will not be 
reflected in Java's default locale.


Naoto


Re: RFR: 8136556 - Add the ability to perform static builds of MacOSX x64 binaries

2015-10-16 Thread Bob Vandette

> On Oct 16, 2015, at 1:01 PM, Naoto Sato  wrote:
> 
> Hi Bob, Alan,
> 
> On 10/16/15 8:11 AM, Bob Vandette wrote:
>>> I've skimmed through the patches and the DEF_* macros look okay. The only 
>>> one that doesn't look right is jawt.h/jawt.c. As jawt.h is shipped by the 
>>> JDK then I think the include of jni_util.h needs to move from jawt.h to 
>>> jawt.c.
>> Ok, I’ll take care of that.
>>> 
>>> If I read the changes correctly then not loading the 
>>> JavaRuntimeSupport.framework on Mac means the locale might not be right, is 
>>> that correct? Brent might remember this issue as we've often pondered the 
>>> implications of this disappearing in an Mac update.
>> The implementation falls back to the getPosixLocale function when the 
>> Framework doesn’t exist.
> 
> In that case, the locale settings in the MacOSX's Settings will not be 
> reflected in Java's default locale.

Unless we have the sources to the JavaRuntimeSupport, I see no way around this 
limitation.

Any attempt to load the shared library, causes the JavaRuntimeSupport framework 
to try to initialize itself.
The initialization fails since it can’t detect the presence of the Java runtime 
that’s trying to load it and a dialog
box asking to install Java appears.

I think we’re going to have to live with this limitation.

Bob.


> 
> Naoto



Re: RFR: 8136556 - Add the ability to perform static builds of MacOSX x64 binaries

2015-10-16 Thread Alan Bateman

On 15/10/2015 19:07, Bob Vandette wrote:

Please review this JDK 9 enhancement which allows a completely static build of 
the JDK for MacOSX x64 platforms.

https://bugs.openjdk.java.net/browse/JDK-8136556 


The change involves:

1. Producing “.a” archives for each native libraries.
2. Ensuring that all symbols across the JDK native libraries are unique.
3. Changing the JNI_OnLoad and JNI_OnUnload (and the Agent equivalents) to have 
the each library name appended per
the JNI specification.
4. Modifications to the launcher and launcher Makefiles to allow them to be 
linked with the java.base and jdk.jdwp.agent libraries
and function.

http://cr.openjdk.java.net/~bobv/8136556/webrev.00/ 

http://cr.openjdk.java.net/~bobv/8136556/hotspot/webrev.00/ 

http://cr.openjdk.java.net/~bobv/8136556/jdk/webrev.00/ 


Note: This change does not link every possible static library with the 
launchers.  It is currently limited to
the java.base and jdk.jdwp.agent libraries in order to allow for the TCK 
validation of the base module only.

I've skimmed through the patches and the DEF_* macros look okay. The 
only one that doesn't look right is jawt.h/jawt.c. As jawt.h is shipped 
by the JDK then I think the include of jni_util.h needs to move from 
jawt.h to jawt.c.


If I read the changes correctly then not loading the 
JavaRuntimeSupport.framework on Mac means the locale might not be right, 
is that correct? Brent might remember this issue as we've often pondered 
the implications of this disappearing in an Mac update.


Will there be continuous or at least regular builds setup so that build 
breakages will be reported in a timely manner? It would be easy to 
change something that breaks the static library build.


-Alan


Re: RFR: 8136556 - Add the ability to perform static builds of MacOSX x64 binaries

2015-10-16 Thread Bob Vandette

> On Oct 16, 2015, at 2:28 AM, Alan Bateman  wrote:
> 
> On 15/10/2015 19:07, Bob Vandette wrote:
>> Please review this JDK 9 enhancement which allows a completely static build 
>> of the JDK for MacOSX x64 platforms.
>> 
>> https://bugs.openjdk.java.net/browse/JDK-8136556 
>> 
>> 
>> The change involves:
>> 
>> 1. Producing “.a” archives for each native libraries.
>> 2. Ensuring that all symbols across the JDK native libraries are unique.
>> 3. Changing the JNI_OnLoad and JNI_OnUnload (and the Agent equivalents) to 
>> have the each library name appended per
>>the JNI specification.
>> 4. Modifications to the launcher and launcher Makefiles to allow them to be 
>> linked with the java.base and jdk.jdwp.agent libraries
>>and function.
>> 
>> http://cr.openjdk.java.net/~bobv/8136556/webrev.00/ 
>> 
>> http://cr.openjdk.java.net/~bobv/8136556/hotspot/webrev.00/ 
>> 
>> http://cr.openjdk.java.net/~bobv/8136556/jdk/webrev.00/ 
>> 
>> 
>> Note: This change does not link every possible static library with the 
>> launchers.  It is currently limited to
>> the java.base and jdk.jdwp.agent libraries in order to allow for the TCK 
>> validation of the base module only.
>> 
> I've skimmed through the patches and the DEF_* macros look okay. The only one 
> that doesn't look right is jawt.h/jawt.c. As jawt.h is shipped by the JDK 
> then I think the include of jni_util.h needs to move from jawt.h to jawt.c.
Ok, I’ll take care of that.
> 
> If I read the changes correctly then not loading the 
> JavaRuntimeSupport.framework on Mac means the locale might not be right, is 
> that correct? Brent might remember this issue as we've often pondered the 
> implications of this disappearing in an Mac update.
The implementation falls back to the getPosixLocale function when the Framework 
doesn’t exist.
> 
> Will there be continuous or at least regular builds setup so that build 
> breakages will be reported in a timely manner? It would be easy to change 
> something that breaks the static library build.

I will be setting up a period build on a Mac I’ve got running a Hudson server 
in our lab until we can 
get JPRT support for this configuration.

Bob.

> 
> -Alan



Re: RFR: 8136556 - Add the ability to perform static builds of MacOSX x64 binaries

2015-10-15 Thread Christian Thalinger
Copy-pasting the comment I made earlier (internally):

>> make/bsd/makefiles/gcc.make:
>> 
>> + ifeq ($(BUILD_STATIC),true)
>> + CXXFLAGS += -DSTATIC_BUILD
>> + CFLAGS += -DSTATIC_BUILD
>> 
>> Can we use the same name everywhere?
> 
> We were trying to differentiate Makefile options from compile time 
> conditionals.
> In one case it’s set to true and the other it’s defined.
> 
> Are there no other cases where this is done?

I’m not sure but looking at make/excludeSrc.make all of them use the same name.

> On Oct 15, 2015, at 8:10 AM, Bob Vandette  wrote:
> 
> Please review this JDK 9 enhancement which allows a completely static build 
> of the JDK for MacOSX x64 platforms.
> 
> https://bugs.openjdk.java.net/browse/JDK-8136556 
> 
> 
> The change involves:
> 
> 1. Producing “.a” archives for each native libraries.
> 2. Ensuring that all symbols across the JDK native libraries are unique.
> 3. Changing the JNI_OnLoad and JNI_OnUnload (and the Agent equivalents) to 
> have the each library name appended per
>   the JNI specification.
> 4. Modifications to the launcher and launcher Makefiles to allow them to be 
> linked with the java.base and jdk.jdwp.agent libraries
>   and function.
> 
> http://cr.openjdk.java.net/~bobv/8136556/webrev.00/ 
> 
> http://cr.openjdk.java.net/~bobv/8136556/hotspot/webrev.00/ 
> 
> http://cr.openjdk.java.net/~bobv/8136556/jdk/webrev.00/ 
> 
> 
> Note: This change does not link every possible static library with the 
> launchers.  It is currently limited to
> the java.base and jdk.jdwp.agent libraries in order to allow for the TCK 
> validation of the base module only.
> 
> 
> Bob.