Skip to content

Commit

Permalink
8286582: Build fails on macos aarch64 when using --with-zlib=bundled
Browse files Browse the repository at this point in the history
Reviewed-by: ihse, lancea
  • Loading branch information
jaikiran committed May 12, 2022
1 parent 89392fb commit 50d47de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion make/autoconf/lib-bundled.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -217,6 +217,9 @@ AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
LIBZ_LIBS=""
if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then
LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib"
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
LIBZ_CFLAGS="$LIBZ_CFLAGS -DHAVE_UNISTD_H"
fi
else
LIBZ_LIBS="-lz"
fi
Expand Down
3 changes: 2 additions & 1 deletion make/modules/java.base/lib/CoreLibraries.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -135,6 +135,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
$(LIBZ_CFLAGS), \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
DISABLED_WARNINGS_clang := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
Expand Down
5 changes: 3 additions & 2 deletions make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -680,6 +680,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)

ifeq ($(USE_EXTERNAL_LIBZ), false)
LIBSPLASHSCREEN_EXTRA_SRC += java.base:libzip/zlib
LIBZ_DISABLED_WARNINGS_CLANG := format-nonliteral
endif

ifeq ($(call isTargetOs, macosx), true)
Expand Down Expand Up @@ -749,7 +750,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
maybe-uninitialized shift-negative-value implicit-fallthrough \
unused-function, \
DISABLED_WARNINGS_clang := incompatible-pointer-types sign-compare \
deprecated-declarations null-pointer-subtraction, \
deprecated-declarations null-pointer-subtraction $(LIBZ_DISABLED_WARNINGS_CLANG), \
DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
Expand Down

11 comments on commit 50d47de

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@mrserb
Copy link
Member

@mrserb mrserb commented on 50d47de Jun 21, 2022

Choose a reason for hiding this comment

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

/backport jdk18u

@openjdk
Copy link

@openjdk openjdk bot commented on 50d47de Jun 21, 2022

Choose a reason for hiding this comment

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

@mrserb Could not automatically backport 50d47de8 to openjdk/jdk18u due to conflicts in the following files:

  • make/modules/java.desktop/lib/Awt2dLibraries.gmk

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk18u:

$ git checkout -b mrserb-backport-50d47de8
$ git fetch --no-tags https://git.openjdk.org/jdk 50d47de8358e2f22bf3a4a165d660c25ef6eacbc
$ git cherry-pick --no-commit 50d47de8358e2f22bf3a4a165d660c25ef6eacbc
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 50d47de8358e2f22bf3a4a165d660c25ef6eacbc'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk18u with the title Backport 50d47de8358e2f22bf3a4a165d660c25ef6eacbc.

@mrserb
Copy link
Member

@mrserb mrserb commented on 50d47de Jun 22, 2022

Choose a reason for hiding this comment

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

/backport jdk18u pr/174

@openjdk
Copy link

@openjdk openjdk bot commented on 50d47de Jun 22, 2022

Choose a reason for hiding this comment

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

@mrserb the backport was successfully created on the branch mrserb-backport-50d47de8 in my personal fork of openjdk/jdk18u. To create a pull request with this backport targeting openjdk/jdk18u:pr/174, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 50d47de8 from the openjdk/jdk repository.

The commit being backported was authored by Jaikiran Pai on 12 May 2022 and was reviewed by Magnus Ihse Bursie and Lance Andersen.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk18u:

$ git fetch https://github.com/openjdk-bots/jdk18u mrserb-backport-50d47de8:mrserb-backport-50d47de8
$ git checkout mrserb-backport-50d47de8
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk18u mrserb-backport-50d47de8

@mrserb
Copy link
Member

@mrserb mrserb commented on 50d47de Jun 22, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev pr/492

@openjdk
Copy link

@openjdk openjdk bot commented on 50d47de Jun 22, 2022

Choose a reason for hiding this comment

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

@mrserb The target branch pull/492 does not exist

@mrserb
Copy link
Member

@mrserb mrserb commented on 50d47de Jun 22, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev pr/492

@openjdk
Copy link

@openjdk openjdk bot commented on 50d47de Jun 22, 2022

Choose a reason for hiding this comment

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

@mrserb the backport was successfully created on the branch mrserb-backport-50d47de8 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:pr/492, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 50d47de8 from the openjdk/jdk repository.

The commit being backported was authored by Jaikiran Pai on 12 May 2022 and was reviewed by Magnus Ihse Bursie and Lance Andersen.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev mrserb-backport-50d47de8:mrserb-backport-50d47de8
$ git checkout mrserb-backport-50d47de8
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev mrserb-backport-50d47de8

@mrserb
Copy link
Member

@mrserb mrserb commented on 50d47de Jun 23, 2022

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 50d47de Jun 23, 2022

Choose a reason for hiding this comment

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

@mrserb Could not automatically backport 50d47de8 to openjdk/jdk11u-dev due to conflicts in the following files:

  • make/autoconf/lib-bundled.m4
  • make/lib/CoreLibraries.gmk
  • make/modules/java.desktop/lib/Awt2dLibraries.gmk

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u-dev:

$ git checkout -b mrserb-backport-50d47de8
$ git fetch --no-tags https://git.openjdk.org/jdk 50d47de8358e2f22bf3a4a165d660c25ef6eacbc
$ git cherry-pick --no-commit 50d47de8358e2f22bf3a4a165d660c25ef6eacbc
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 50d47de8358e2f22bf3a4a165d660c25ef6eacbc'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 50d47de8358e2f22bf3a4a165d660c25ef6eacbc.

Please sign in to comment.