Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various makefile issues with JDK11 #7

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

ChengJin01
Copy link

The changes are to resolve all makefile issues
when compiling JDK11 on Windows.

Signed-off-by: CHENGJin [email protected]

@ChengJin01
Copy link
Author

Reviewer: @keithc-ca , @pshipton
FYI: @DanHeidinga

@ChengJin01
Copy link
Author

The following issues are addressed in the changes:

  1. closed/OpenJ9.gmk:
    [1] set up enviroment variable (lib, include)
    [2] override vm/lib/jvm.dll & exp with /vm/j9vm_jdk11/jdk11_jvm.dll & exp to
    ensure new JDK11 natives are exported correctly
  2. closed/autoconf/custom-hook.m4:
    specify the library path on Windows (vm/lib)
  3. closed/autoconf/custom-spec.gmk.in:
    export MSVC_VERSION (2017) to have openJ9 set up the new library(ucrt, vcruntime) with VS2017
  4. closed/make/copy/Copy-java.base.gmk: set up another path for jvm.dll
  5. closed/src/java.base/conf/jvm.cfg: disable server/client
  6. closed/make/lib/LibCommon.gmk: removed as FindSrcDirsForLib no longer exists in make/lib/LibCommon.gmk

Copy link
Author

@ChengJin01 ChengJin01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: @keithc-ca , @pshipton

ifeq (windows,$(OPENJDK_TARGET_OS))
@$(ECHO) "Updating vm/lib/jvm.* with vm/j9vm_jdk11/jdk11_jvm.*"
@$(CP) -p $(OUTPUTDIR)/vm/j9vm_jdk11/jdk11_jvm$(STATIC_LIBRARY_SUFFIX) $(OUTPUTDIR)/vm/lib/jvm$(STATIC_LIBRARY_SUFFIX)
@$(CP) -p $(OUTPUTDIR)/vm/j9vm_jdk11/jdk11_jvm.exp $(OUTPUTDIR)/vm/lib/jvm.exp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These commands ought to use $(LIBRARY_PREFIX) even though it's normally empty.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed and added.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should have been added to both arguments of $(CP).

@@ -17,6 +17,8 @@
#
# ===========================================================================
-j9vm KNOWN
-server IGNORE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not having these IGNORE's cause any problem?

Copy link
Author

@ChengJin01 ChengJin01 Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have the following setting in OpenJ9.gmk to deal with the /server directory
e.g.

	@$(MKDIR) -p $(MODULES_LIBS_DIR)/java.base/server
	@$(CP) -p $(OUTPUTDIR)/vm/redirector/$(LIBRARY_PREFIX)jvm_jdk11$(SHARED_LIBRARY_SUFFIX) $(MODULES_LIBS_DIR)/java.base/server/$(LIBRARY_PREFIX)jvm$(SHARED_LIBRARY_SUFFIX)

If the /server should be totally removed, then all changes in jvm.cfg and Copy-java.base.gmk won't be necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why its different from jdk10, which doesn't IGNORE server.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the file is there in the jdk10 extensions, perhaps its not used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try recompiling without the setting with /server and all changes with jvm.cfg to whether it still works.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We create a server directory intentionally, for compatibility with OpenJDK. So an app which looks in the server directory for the libjvm.so will find it and work. I don't want to remove that part, if that is what you meant.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. So all changes related to jvm.cfg should be kept there in favor of the operations on the server directory.

@@ -29,6 +29,7 @@ ALT_JVMCFG_SRC := $(TOPDIR)/closed/src/java.base/conf/jvm.cfg
override-jvm.cfg : $(LIB_DST_DIR)/jvm.cfg
$(ECHO) "Overriding jvm.cfg with J9VM version"
$(CP) $(ALT_JVMCFG_SRC) $(LIB_DST_DIR)/jvm.cfg
$(CP) $(ALT_JVMCFG_SRC) $(OUTPUTDIR)/jdk/lib/jvm.cfg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required?

Copy link
Author

@ChengJin01 ChengJin01 Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained above, it is checked for /server. If we agree to remove all setting for /server, then there is no need to change here.

ifeq (windows,$(OPENJDK_TARGET_OS))
@$(ECHO) "Updating vm/lib/jvm.* with vm/j9vm_jdk11/jdk11_jvm.*"
@$(CP) -p $(OUTPUTDIR)/vm/j9vm_jdk11/jdk11_jvm$(STATIC_LIBRARY_SUFFIX) $(OUTPUTDIR)/vm/lib/jvm$(STATIC_LIBRARY_SUFFIX)
@$(CP) -p $(OUTPUTDIR)/vm/j9vm_jdk11/jdk11_jvm.exp $(OUTPUTDIR)/vm/lib/jvm.exp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it still work without copying the .exp file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to recompiled without .exp to see whether it still works.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already recompiled and it seems there is no issue detected during compilation (also no problem with jdk/bin/java -version). So removed the setting for jvm.exp.

@pshipton
Copy link
Member

@jdekonin do we have any PR builds for jdk11 yet?

jenkins compile xlinux

@pshipton
Copy link
Member

pshipton commented Jul 26, 2018

@jdekonin Adam mentioned that only you can run jdk11 builds, however all committers should be able to start them from extensions, or from OpenJ9. For OpenJ9 they just shouldn't be enabled by default, but must be explicitly requested.

@pshipton
Copy link
Member

Anyway, I want to ensure these changes for Windows don't break the xLinux build.

@pshipton
Copy link
Member

@ChengJin01 note that once we finalize these changes, they should also be delivered to the "head" stream https://github.com/ibmruntimes/openj9-openjdk-jdk

The changes are to resolve all makefile issues
when compiling JDK11 on Windows.

Signed-off-by: CHENGJin <[email protected]>
@ChengJin01 ChengJin01 force-pushed the WIN_JDK11_COMP_OPENJ9 branch from c162312 to 286ddeb Compare July 26, 2018 02:02
@ChengJin01
Copy link
Author

once we finalize these changes, they should also be delivered to the "head" stream https://github.com/ibmruntimes/openj9-openjdk-jdk

If so, I need to create a pull request on ibmruntimes/openj9-openjdk-jdk to verify the compilation result.

@AdamBrousseau
Copy link
Collaborator

jenkins compile xlinux

@pshipton pshipton merged commit e5c64f5 into ibmruntimes:openj9 Jul 26, 2018
hangshao0 pushed a commit to hangshao0/openj9-openjdk-jdk11 that referenced this pull request Dec 24, 2018
Copy configured values to relevant UMA properties in .spec files
@ChengJin01 ChengJin01 deleted the WIN_JDK11_COMP_OPENJ9 branch June 19, 2019 20:49
keithc-ca pushed a commit to keithc-ca/openj9-openjdk11 that referenced this pull request Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants