Skip to contentSkip to conversation

openjdk-8: add a glibc 2.32 compatibility patch

PATCH In review Alexander Kanavin 2 participants 4 messages Aug 13, 2020 – Aug 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 openjdk-8: add a glibc 2.32 compatibility patch

---
 .../openjdk/openjdk-8-release-common.inc      |  1 +
 .../2010-Remove-usage-of-sys-sysctl.h.patch   | 39 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch
recipes-core/openjdk/openjdk-8-release-common.inc +1 -0
index 02210a1..c43fd22 100644
@@ -20,6 +20,7 @@ PATCHES_URI = "\
     file://2007-jdk-no-genx11-in-headless.patch \
     file://2008-jdk-no-unused-deps.patch \
     file://2009-jdk-use-gcc-instead-of-ld-to-link-genSocketOptionRegistry.patch \
+    file://2010-Remove-usage-of-sys-sysctl.h.patch \
 "
 HOTSPOT_UB_PATCH = "\
     file://1001-hotspot-fix-crash-on-JNI_CreateJavaVM.patch \
recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch new file +39 -0
new file mode 100644
index 0000000..f6d7681
@@ -0,0 +1,39 @@
+From 3ed9b4a109cf2f31b97ab8ba317d67886452523c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Thu, 13 Aug 2020 17:59:42 +0200
+Subject: [PATCH] Remove usage of sys/sysctl.h
+
+This header has been removed in glibc 2.32, and isn't used for
+anything.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c | 1 -
+ jdk/src/solaris/native/java/net/PlainSocketImpl.c         | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+index cd15654e..4d8abe03 100644
+--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+@@ -41,7 +41,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+ 
+diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+index 170957e7..9aafbc09 100644
+--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+@@ -43,7 +43,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #endif
+ 
+ #include "jvm.h"
Signature · 1 line
2.28.0
#1 lore raw

Hi,
thank you for your patch!

This is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

regards;rl

Quoted 67 lines · Alexander Kanavin
---
 .../openjdk/openjdk-8-release-common.inc      |  1 +
 .../2010-Remove-usage-of-sys-sysctl.h.patch   | 39 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch
recipes-core/openjdk/openjdk-8-release-common.inc +1 -0
index 02210a1..c43fd22 100644
@@ -20,6 +20,7 @@ PATCHES_URI = "\
     file://2007-jdk-no-genx11-in-headless.patch \
     file://2008-jdk-no-unused-deps.patch \
     file://2009-jdk-use-gcc-instead-of-ld-to-link-genSocketOptionRegistry.patch \
+    file://2010-Remove-usage-of-sys-sysctl.h.patch \
 "
 HOTSPOT_UB_PATCH = "\
     file://1001-hotspot-fix-crash-on-JNI_CreateJavaVM.patch \
recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch new file +39 -0
new file mode 100644
index 0000000..f6d7681
@@ -0,0 +1,39 @@
+From 3ed9b4a109cf2f31b97ab8ba317d67886452523c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Thu, 13 Aug 2020 17:59:42 +0200
+Subject: [PATCH] Remove usage of sys/sysctl.h
+
+This header has been removed in glibc 2.32, and isn't used for
+anything.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c | 1 -
+ jdk/src/solaris/native/java/net/PlainSocketImpl.c         | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+index cd15654e..4d8abe03 100644
+--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+@@ -41,7 +41,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+ 
+diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+index 170957e7..9aafbc09 100644
+--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+@@ -43,7 +43,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #endif
+ 
+ #include "jvm.h"
Signature · 1 line
2.28.0
#2 lore raw

Thanks Richard.

There's also a problem with te cacao recipe: upstream has disappeared, which renders fresh builds impossible:

--2020-08-20 10:22:51--
https://bitbucket.org/cacaovm/cacao-staging/get/2d6f6c14daf9.zip
Resolving bitbucket.org (bitbucket.org)... 2406:da00:ff00::22c5:2ef4, 2406:da00:ff00::22c3:9b0a, 2406:da00:ff00::22c2:513, ... Connecting to bitbucket.org (bitbucket.org)|2406:da00:ff00::22c5:2ef4|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden

2020-08-20 10:22:52 ERROR 403: Forbidden.

I guess we need to put the zip somewhere else, and fetch it from there?

Alex

Quoted 92 lines · Richard Leitner

Hi,
thank you for your patch!

This is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

regards;rl

Quoted 6 lines · Alexander Kanavin
---
 .../openjdk/openjdk-8-release-common.inc      |  1 +
 .../2010-Remove-usage-of-sys-sysctl.h.patch   | 39 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644

recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch

Review

Quoted 2 lines
(quoted diff) +0 -0

b/recipes-core/openjdk/openjdk-8-release-common.inc

recipes-core/openjdk/openjdk-8-release-common.inc PATCHES_URI = "\ · line 22

Quoted 7 lines

index 02210a1..c43fd22 100644

recipes-core/openjdk/openjdk-8-release-common.inc +0 -0
@@ -20,6 +20,7 @@ PATCHES_URI = "\
     file://2007-jdk-no-genx11-in-headless.patch \
     file://2008-jdk-no-unused-deps.patch \
 

file://2009-jdk-use-gcc-instead-of-ld-to-link-genSocketOptionRegistry.patch \

Quoted 5 lines
recipes-core/openjdk/openjdk-8-release-common.inc +1 -0
+    file://2010-Remove-usage-of-sys-sysctl.h.patch \
 "
 HOTSPOT_UB_PATCH = "\
     file://1001-hotspot-fix-crash-on-JNI_CreateJavaVM.patch \

diff --git

a/recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch b/recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch

Quoted 4 lines

new file mode 100644
index 0000000..f6d7681
--- /dev/null
+++

b/recipes-core/openjdk/patches-openjdk-8/2010-Remove-usage-of-sys-sysctl.h.patch

Quoted 7 lines
recipes-core/openjdk/openjdk-8-release-common.inc +6 -0
@@ -0,0 +1,39 @@
+From 3ed9b4a109cf2f31b97ab8ba317d67886452523c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Thu, 13 Aug 2020 17:59:42 +0200
+Subject: [PATCH] Remove usage of sys/sysctl.h
+
+This header has been removed in glibc 2.32, and isn't used for

recipes-core/openjdk/openjdk-8-release-common.inc line 16

Quoted 10 lines
recipes-core/openjdk/openjdk-8-release-common.inc +10 -0
+anything.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c | 1 -
+ jdk/src/solaris/native/java/net/PlainSocketImpl.c         | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c

b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c

recipes-core/openjdk/openjdk-8-release-common.inc line 28

Quoted 12 lines
recipes-core/openjdk/openjdk-8-release-common.inc +12 -0
+index cd15654e..4d8abe03 100644
+--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+@@ -41,7 +41,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+
+diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c

b/jdk/src/solaris/native/java/net/PlainSocketImpl.c

Quoted 14 lines
recipes-core/openjdk/openjdk-8-release-common.inc +11 -1
+index 170957e7..9aafbc09 100644
+--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
++++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+@@ -43,7 +43,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #endif
+
+ #include "jvm.h"
--

2.28.0

#3 lore raw
Quoted 12 lines · Alexander Kanavin

Thanks Richard.

There's also a problem with te cacao recipe: upstream has disappeared, which renders fresh builds impossible:

--2020-08-20 10:22:51--
https://bitbucket.org/cacaovm/cacao-staging/get/2d6f6c14daf9.zip
Resolving bitbucket.org (bitbucket.org)... 2406:da00:ff00::22c5:2ef4, 2406:da00:ff00::22c3:9b0a, 2406:da00:ff00::22c2:513, ... Connecting to bitbucket.org (bitbucket.org)|2406:da00:ff00::22c5:2ef4|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden

Quoted 3 lines
2020-08-20 10:22:52 ERROR 403: Forbidden.

I guess we need to put the zip somewhere else, and fetch it from there?

Thanks for the catch!

It seems Bitbucked shut down their mercurial repositories...
The cacao-staging repository there is unavailable [1], but the cacao one got migrated to git [2].
I'll take a look at it and will send a patch for that ASAP.

I guess it's better to use cacao than cacao-staging in any case ;-)

[1] https://bitbucket.org/cacaovm/cacao-staging
[2] https://bitbucket.org/cacaovm/cacao.git

regards;rl