Skip to contentSkip to conversation

icedtea7-native: Add missing dependencies

PATCH New Ricardo Ribalda Delgado 1 participant 2 messages Sep 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 icedtea7-native: Add missing dependencies

Without this patch icedtea uses host make and linux32

checking for make... /usr/bin/make
checking for linux32... /usr/bin/linux32

---
 recipes-core/icedtea/icedtea7-native.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/icedtea/icedtea7-native.inc +1 -1
index d4c5c29e6f9f..4314fb51b259 100644
@@ -8,7 +8,7 @@ DEPENDS = "virtual/javac-native virtual/java-native classpath-native \
            giflib-native jpeg-native libpng-native \
            glib-2.0-native freetype-native zlib-native \
            fontconfig-native zip-native \
-	   unzip-native \
+	   unzip-native make-native util-linux-native\
           "
 
 PACKAGECONFIG ??= ""
Signature · 1 line
2.9.3
#1 lore raw

PATCH 2/2 icedtea7-native: Fix IOException constructor compile error

Under some circumstances, the bootstrap error fails with the following error:

build-bootstrap-javac:
[javac] Compiling 1 source file to build/openjdk.build-boot/langtools/build/bootstrap/classes [javac] 1. ERROR in /com/sun/tools/javac/file/ZipFileIndex.java
[javac] super(message, cause);
[javac] The constructor IOException(String, Throwable) is undefined

The reason for that error is that rt.jar does not contain the openjdk classes but the ones from classpath 0.99.

The error eventually goes away after a couple of hours :S.

After some tedious debug, I figured out that the problem was the timestamp handling of zip/unzip.

The Makefile launches zip with the following options:

$(ZIP) -qur

which only updates the content of the classes that have a timestamp older than the new ones.

According to zip manpage:
"""
Note that under many operating systems, the TZ (timezone) environment variable must be set correctly in order for -f and -u to work properly """

On this patch, I remove the -u option from zip, always replacing the classes inside rt.jar with the classes from openjdk. I cannot think of an scenario where this may fail.

---
 recipes-core/icedtea/icedtea7-native.inc                 |  1 +
 recipes-core/icedtea/openjdk-7-03b147/timezoneszip.patch | 13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 recipes-core/icedtea/openjdk-7-03b147/timezoneszip.patch
recipes-core/icedtea/icedtea7-native.inc +1 -0
index 4314fb51b259..727998c94e6c 100644
@@ -41,6 +41,7 @@ SRC_URI = " \
   ${OPENJDK_PATCHES} \
   file://allow-headless-build.patch;striplevel=0 \
   file://jaxws_fix_NullPointerException.patch;apply=no \
+  file://timezoneszip.patch \
   "
 
 S = "${WORKDIR}/${ICEDTEA}"
recipes-core/icedtea/openjdk-7-03b147/timezoneszip.patch new file +13 -0
new file mode 100644
index 000000000000..befb7c79b9f9
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index 5eaff4c40aac..a4f0f63f3e43 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2294,7 +2294,7 @@ if LACKS_SUN_AWT_TOOLKIT
+ 	   mkdir -p `dirname $$destpath` ; \
+ 	   cp -a ../../$$dirs $$destpath ; \
+ 	 done ; \
+-	 $(ZIP) -qur $(STAGE1_BOOT_DIR)/jre/lib/rt.jar \
++	 $(ZIP) -qr $(STAGE1_BOOT_DIR)/jre/lib/rt.jar \
+ 	 com java javax sun );
+ endif
+ 	mkdir -p stamps
Signature · 1 line
2.9.3