From e3ac9836ab585c0b4134c7c0857cc275c403ad32 Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Thu, 16 Apr 2015 14:04:02 -0400 Subject: icedtea7-native compile failure undefined reference to `main' On hosts without /usr/include/X11/extensions, icedtea7-native compile results in a build failure while trying to create an object file: +/data/home/.../git/csu/../sysdeps/x86_64/start.S:118: undefined reference to `main' [2015-03-31 15:22:53.115930161+00:00] | collect2: error: ld returned 1 exit status The compile line shows: (-c gets eaten) ... -I -c -o The makefile tries to do the following which results in a faulty build line if /usr/include/X11/extensions doesn't exist: CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \ $(wildcard /usr/include/X11/extensions)) This looks like a missed line from the following patch which removes the need for X11/extensions: icedtea-ecj-disable-compilation.patch Signed-off-by: Amy Fong Signed-off-by: Jackie Huang --- .../icedtea-x11_extension_cleanup.patch | 42 ++++++++++++++++++++++ recipes-core/icedtea/openjdk-7-release-03b147.inc | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 recipes-core/icedtea/openjdk-7-03b147/icedtea-x11_extension_cleanup.patch (limited to 'recipes-core') diff --git a/recipes-core/icedtea/openjdk-7-03b147/icedtea-x11_extension_cleanup.patch b/recipes-core/icedtea/openjdk-7-03b147/icedtea-x11_extension_cleanup.patch new file mode 100644 index 0000000..1b92c9a --- /dev/null +++ b/recipes-core/icedtea/openjdk-7-03b147/icedtea-x11_extension_cleanup.patch @@ -0,0 +1,42 @@ +icedtea7-native compile failure undefined reference to `main' + +On hosts without /usr/include/X11/extensions, icedtea7-native compile +results in a build failure while trying to create an object file: + ++/data/home/.../git/csu/../sysdeps/x86_64/start.S:118: undefined reference to `main' +[2015-03-31 15:22:53.115930161+00:00] | collect2: error: ld returned 1 exit status + +The compile line shows: (-c gets eaten) +... -I -c -o + +The makefile tries to do the following which results in a faulty build +line if /usr/include/X11/extensions doesn't exist: + + CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \ + $(wildcard /usr/include/X11/extensions)) + +This looks like a missed line from the following patch which removes the need for X11/extensions: + icedtea-ecj-disable-compilation.patch + +Upstream-Status: Pending + +Signed-off-by: Amy Fong +--- + openjdk/jdk/make/sun/awt/mawt.gmk | 6 ------ + 1 file changed, 6 deletions(-) + +--- openjdk/jdk/make/sun/awt/mawt.gmk ++++ openjdk/jdk/make/sun/awt/mawt.gmk +@@ -258,12 +258,6 @@ + -I$(PLATFORM_SRC)/native/$(PKGDIR) \ + $(EVENT_MODEL) + +-ifeq ($(PLATFORM), linux) +- # Checking for the X11/extensions headers at the additional location +- CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \ +- $(wildcard /usr/include/X11/extensions)) +-endif +- + ifeq ($(PLATFORM), solaris) + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions + endif diff --git a/recipes-core/icedtea/openjdk-7-release-03b147.inc b/recipes-core/icedtea/openjdk-7-release-03b147.inc index b1cf6e9..dbdc045 100644 --- a/recipes-core/icedtea/openjdk-7-release-03b147.inc +++ b/recipes-core/icedtea/openjdk-7-release-03b147.inc @@ -85,6 +85,7 @@ OPENJDK_PATCHES = " \ file://icedtea-disable-x11-in-headless.patch;apply=no \ file://icedtea-disable-sun.applet-for-tools-in-headless.patch;apply=no \ file://icedtea-hotspot-fix-undefined-behaviour.patch;apply=no \ + file://icedtea-x11_extension_cleanup.patch;apply=no \ " OPENJDK_HEADLESS_PATCHES = " \ @@ -104,5 +105,6 @@ export DISTRIBUTION_PATCHES = " \ patches/icedtea-openjdk-remove-currency-data-generation-expi.patch \ patches/icedtea-change-to-gdb-debug-format.patch \ patches/icedtea-hotspot-fix-undefined-behaviour.patch \ + patches/icedtea-x11_extension_cleanup.patch \ ${CLEAN_X11_DISTRIBUTION_PATCH} \ " -- cgit v1.2.3-54-g00ecf