All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build
@ 2017-04-23  6:54 liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 1/5] openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib liu.ming50
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: liu.ming50 @ 2017-04-23  6:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <liu.ming50@gmail.com>

This patch series fix some issues, so the openjdk-8/openjre-8 now can build
with X11 system (headful).

Ming Liu (5):
  openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib
  openjdk-8-cross.inc: fix wrong sysroot path
  openjdk-8-cross.inc: tweak PACKAGECONFIG default value
  openjdk-8/openjre-8: merge some redundant code
  openjdk-8-cross.inc: fix a libpng build issue

 recipes-core/openjdk/openjdk-8-cross.inc           | 32 +++++++++++++++++++---
 recipes-core/openjdk/openjdk-8_102b14.bb           | 14 ----------
 recipes-core/openjdk/openjre-8_102b14.bb           | 14 ----------
 .../openjdk8-fix-libpng-neon-build.patch           | 29 ++++++++++++++++++++
 4 files changed, 57 insertions(+), 32 deletions(-)
 create mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-libpng-neon-build.patch

-- 
2.7.4



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [meta-java][PATCH 1/5] openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib
  2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
@ 2017-04-23  6:54 ` liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 2/5] openjdk-8-cross.inc: fix wrong sysroot path liu.ming50
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: liu.ming50 @ 2017-04-23  6:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

For cross compiling, it should DEPENDS on alsa-lib instead of
alsa-lib-native.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 47fe35d..b328395 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -18,7 +18,7 @@ PRIVATE_LIBS = "\
 PACKAGECONFIG ??= "repack"
 PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender"
 PACKAGECONFIG[cups] = "--with-cups,,cups"
-PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib-native"
+PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib"
 
 PACKAGECONFIG[jce] = "--enable-unlimited-crypto,,"
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-java][PATCH 2/5] openjdk-8-cross.inc: fix wrong sysroot path
  2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 1/5] openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib liu.ming50
@ 2017-04-23  6:54 ` liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 3/5] openjdk-8-cross.inc: tweak PACKAGECONFIG default value liu.ming50
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: liu.ming50 @ 2017-04-23  6:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

The '--with-sys-root' should be set to ${STAGING_DIR_HOST} but not
${STAGING_DIR}.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index b328395..11e98b5 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -42,7 +42,7 @@ SRC_URI_append = "\
 EXTRA_OECONF_append = "\
     --with-jobs=${@java_get_parallel_make(d)} \
     \
-    --with-sys-root=${STAGING_DIR} \
+    --with-sys-root=${STAGING_DIR_HOST} \
     --with-tools-dir=${STAGING_DIR_NATIVE} \
     --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
     --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts \
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-java][PATCH 3/5] openjdk-8-cross.inc: tweak PACKAGECONFIG default value
  2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 1/5] openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 2/5] openjdk-8-cross.inc: fix wrong sysroot path liu.ming50
@ 2017-04-23  6:54 ` liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 4/5] openjdk-8/openjre-8: merge some redundant code liu.ming50
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: liu.ming50 @ 2017-04-23  6:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

When x11, alsa is being set in DISTRO_FEATURES, the users might expect
openjdk build with the related options as well. For instance, they might
be confused when the openjdk is still built as headless but x11 is
actually enabled from system aspect.

With this patch, the end users still can choose build openjdk without
these options by overriding PACKAGECONFIG.

Two small fixes are also needed to let openjdk build with x11:
- Add libxtst to DEPENDS.
- Pass ac_x_includes and ac_x_libraries to configure command.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 11e98b5..3973fcf 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -15,8 +15,12 @@ PRIVATE_LIBS = "\
     libsctp.so libsplashscreen.so libsunec.so libunpack.so libverify.so libzip.so \
 "
 
-PACKAGECONFIG ??= "repack"
-PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender"
+PACKAGECONFIG ??= " \
+    repack \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 cups', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+"
+PACKAGECONFIG[x11] = "--with-x,,libx11 xproto libxt libxext libxrender libxtst"
 PACKAGECONFIG[cups] = "--with-cups,,cups"
 PACKAGECONFIG[alsa] = "--with-alsa,,alsa-lib"
 
@@ -31,6 +35,11 @@ PACKAGECONFIG[shark] = "--with-jvm-variants=zeroshark,,llvm3.5,"
 
 PACKAGECONFIG[repack] = ",,,"
 
+CACHED_CONFIGUREVARS = " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'ac_x_includes=${STAGING_INCDIR}', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'ac_x_libraries=${STAGING_LIBDIR}', '', d)} \
+"
+
 require openjdk-8-common.inc
 
 JAVA_HOME[unexport] = "1"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-java][PATCH 4/5] openjdk-8/openjre-8: merge some redundant code
  2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
                   ` (2 preceding siblings ...)
  2017-04-23  6:54 ` [meta-java][PATCH 3/5] openjdk-8-cross.inc: tweak PACKAGECONFIG default value liu.ming50
@ 2017-04-23  6:54 ` liu.ming50
  2017-04-23  6:54 ` [meta-java][PATCH 5/5] openjdk-8-cross.inc: fix a libpng build issue liu.ming50
  2017-04-28  8:16 ` [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build Maxin B. John
  5 siblings, 0 replies; 7+ messages in thread
From: liu.ming50 @ 2017-04-23  6:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

A identical PATCHES_URI_append is being set both in openjdk-8 and
openjre-8, merge them into openjdk-8-cross.inc.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc | 14 ++++++++++++++
 recipes-core/openjdk/openjdk-8_102b14.bb | 14 --------------
 recipes-core/openjdk/openjre-8_102b14.bb | 14 --------------
 3 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 3973fcf..247438f 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -1,6 +1,20 @@
 JDK_HOME = "${libdir_jvm}/openjdk-8"
 JRE_HOME = "${libdir_jvm}/openjre-8"
 
+# some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
+# reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
+# by Roman Kennke (rkennke at redhat.com)
+PATCHES_URI_append = "\
+    file://openjdk8-restrict-to-staging-dir.patch;apply=no \
+    file://openjdk8-fix-shark-build.patch;apply=no \
+    file://openjdk8-fix-shark-stdc++11.patch;apply=no \
+    file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
+    file://openjdk8-fix-adlc-flags.patch;apply=no \
+    file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
+    file://openjdk8-fix-zero-mode-crash.patch;apply=no \
+    file://openjdk8-add-missing-linker-flags.patch;apply=no \
+"
+
 DEPENDS = "\
     openjdk-8-native zip-native ant-native libxslt \
     jpeg libpng krb5 libffi fontconfig freetype \
diff --git a/recipes-core/openjdk/openjdk-8_102b14.bb b/recipes-core/openjdk/openjdk-8_102b14.bb
index 210c897..efed329 100644
--- a/recipes-core/openjdk/openjdk-8_102b14.bb
+++ b/recipes-core/openjdk/openjdk-8_102b14.bb
@@ -1,20 +1,6 @@
 require openjdk-8-release-102b14.inc
 require openjdk-8-cross.inc
 
-# some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
-# reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
-# by Roman Kennke (rkennke at redhat.com)
-PATCHES_URI_append = "\
-    file://openjdk8-restrict-to-staging-dir.patch;apply=no \
-    file://openjdk8-fix-shark-build.patch;apply=no \
-    file://openjdk8-fix-shark-stdc++11.patch;apply=no \
-    file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
-    file://openjdk8-fix-adlc-flags.patch;apply=no \
-    file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
-    file://openjdk8-fix-zero-mode-crash.patch;apply=no \
-    file://openjdk8-add-missing-linker-flags.patch;apply=no \
-"
-
 do_install() {
     rm -rf ${D}${JDK_HOME}
     mkdir -p ${D}${JDK_HOME}
diff --git a/recipes-core/openjdk/openjre-8_102b14.bb b/recipes-core/openjdk/openjre-8_102b14.bb
index 88160e1..f47c62c 100644
--- a/recipes-core/openjdk/openjre-8_102b14.bb
+++ b/recipes-core/openjdk/openjre-8_102b14.bb
@@ -1,20 +1,6 @@
 require openjdk-8-release-102b14.inc
 require openjdk-8-cross.inc
 
-# some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
-# reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
-# by Roman Kennke (rkennke at redhat.com)
-PATCHES_URI_append = "\
-    file://openjdk8-restrict-to-staging-dir.patch;apply=no \
-    file://openjdk8-fix-shark-build.patch;apply=no \
-    file://openjdk8-fix-shark-stdc++11.patch;apply=no \
-    file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \
-    file://openjdk8-fix-adlc-flags.patch;apply=no \
-    file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
-    file://openjdk8-fix-zero-mode-crash.patch;apply=no \
-    file://openjdk8-add-missing-linker-flags.patch;apply=no \
-"
-
 do_install() {
     rm -rf ${D}${JRE_HOME}
     mkdir -p ${D}${JRE_HOME}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-java][PATCH 5/5] openjdk-8-cross.inc: fix a libpng build issue
  2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
                   ` (3 preceding siblings ...)
  2017-04-23  6:54 ` [meta-java][PATCH 4/5] openjdk-8/openjre-8: merge some redundant code liu.ming50
@ 2017-04-23  6:54 ` liu.ming50
  2017-04-28  8:16 ` [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build Maxin B. John
  5 siblings, 0 replies; 7+ messages in thread
From: liu.ming50 @ 2017-04-23  6:54 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

JDK/JRE fails to build for ARM NEON machines, due to a undefined symbol
in libpng, as follows:
| build/jdk/objs/libsplashscreen/pngrutil.o: In function `png_init_filter_functions':
| jdk/src/share/native/sun/awt/libpng/pngrutil.c:4002: undefined reference to `png_init_filter_functions_neon'

This is a known issue already fixed in openjdk upstream, back-port the fix.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 recipes-core/openjdk/openjdk-8-cross.inc           |  1 +
 .../openjdk8-fix-libpng-neon-build.patch           | 29 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-libpng-neon-build.patch

diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
index 247438f..ad3a44d 100644
--- a/recipes-core/openjdk/openjdk-8-cross.inc
+++ b/recipes-core/openjdk/openjdk-8-cross.inc
@@ -13,6 +13,7 @@ PATCHES_URI_append = "\
     file://openjdk8-silence-d_fortify_source-warning.patch;apply=no \
     file://openjdk8-fix-zero-mode-crash.patch;apply=no \
     file://openjdk8-add-missing-linker-flags.patch;apply=no \
+    file://openjdk8-fix-libpng-neon-build.patch;apply=no \
 "
 
 DEPENDS = "\
diff --git a/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-libpng-neon-build.patch b/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-libpng-neon-build.patch
new file mode 100644
index 0000000..dd6d8e3
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-libpng-neon-build.patch
@@ -0,0 +1,29 @@
+# HG changeset patch
+# User enevill
+# Date 1430816900 0
+#      Tue May 05 09:08:20 2015 +0000
+# Node ID 88d2b7d7285281d41bcff45af0dd983b0f72811e
+# Parent  51f5501a54a62aceed6342e7ea3a9a3c67f3885d
+8078245: AARCH64: JDK fails to build due to undefined symbol in libpng
+Summary: Add -DPNG_ARM_NEON_OPT=0 to LIBSPLASHSCREEN_CFLAGS flags
+Reviewed-by: dholmes, ihse, erikj
+
+Upstream-Status: Backport
+
+Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+---
+ jdk/make/lib/Awt2dLibraries.gmk |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git jdk/make/lib/Awt2dLibraries.gmk jdk/make/lib/Awt2dLibraries.gmk
+--- jdk/make/lib/Awt2dLibraries.gmk
++++ jdk/make/lib/Awt2dLibraries.gmk
+@@ -1205,7 +1205,7 @@ ifndef BUILD_HEADLESS_ONLY
+     LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/awt/splashscreen
+   endif
+
+-  LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE \
++  LIBSPLASHSCREEN_CFLAGS := -DSPLASHSCREEN -DPNG_NO_MMX_CODE -DPNG_ARM_NEON_OPT=0 \
+       $(foreach dir, $(LIBSPLASHSCREEN_DIRS), -I$(dir))
+
+   ifeq ($(OPENJDK_TARGET_OS), macosx)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build
  2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
                   ` (4 preceding siblings ...)
  2017-04-23  6:54 ` [meta-java][PATCH 5/5] openjdk-8-cross.inc: fix a libpng build issue liu.ming50
@ 2017-04-28  8:16 ` Maxin B. John
  5 siblings, 0 replies; 7+ messages in thread
From: Maxin B. John @ 2017-04-28  8:16 UTC (permalink / raw)
  To: liu.ming50; +Cc: openembedded-devel

Hi,

On Sun, Apr 23, 2017 at 08:54:51AM +0200, liu.ming50@gmail.com wrote:
> From: Ming Liu <liu.ming50@gmail.com>
> 
> This patch series fix some issues, so the openjdk-8/openjre-8 now can build
> with X11 system (headful).
> 
> Ming Liu (5):
>   openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib
>   openjdk-8-cross.inc: fix wrong sysroot path
>   openjdk-8-cross.inc: tweak PACKAGECONFIG default value
>   openjdk-8/openjre-8: merge some redundant code
>   openjdk-8-cross.inc: fix a libpng build issue
> 
>  recipes-core/openjdk/openjdk-8-cross.inc           | 32 +++++++++++++++++++---
>  recipes-core/openjdk/openjdk-8_102b14.bb           | 14 ----------
>  recipes-core/openjdk/openjre-8_102b14.bb           | 14 ----------
>  .../openjdk8-fix-libpng-neon-build.patch           | 29 ++++++++++++++++++++
>  4 files changed, 57 insertions(+), 32 deletions(-)
>  create mode 100644 recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-libpng-neon-build.patch
>

Pushed to master-next. Thanks a lot !

Best Regards,
Maxin


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-04-28  8:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-23  6:54 [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build liu.ming50
2017-04-23  6:54 ` [meta-java][PATCH 1/5] openjdk-8-cross.inc: change a dependency alsa-lib-native to alsa-lib liu.ming50
2017-04-23  6:54 ` [meta-java][PATCH 2/5] openjdk-8-cross.inc: fix wrong sysroot path liu.ming50
2017-04-23  6:54 ` [meta-java][PATCH 3/5] openjdk-8-cross.inc: tweak PACKAGECONFIG default value liu.ming50
2017-04-23  6:54 ` [meta-java][PATCH 4/5] openjdk-8/openjre-8: merge some redundant code liu.ming50
2017-04-23  6:54 ` [meta-java][PATCH 5/5] openjdk-8-cross.inc: fix a libpng build issue liu.ming50
2017-04-28  8:16 ` [meta-java][PATCH 0/5] Fix some issues of openjdk-8/openjre-8 headful build Maxin B. John

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.