Skip to contentSkip to conversation

icedtea7-native fails on hosts without /usr/include/X11/extensions

PATCH In review Amy Fong 2 participants 2 messages Apr 14, 2015

lore
Share & tools
lore

Amy Fong

author
#0 lore raw

PATCH 1/1 icedtea7-native fails on hosts without /usr/include/X11/extensions

From 4789a5dc622cc8537df28596a4beb66db4ba4774 Mon Sep 17 00:00:00 2001
From: Amy Fong <[email protected]>
Date: Tue, 14 Apr 2015 13:10:22 -0400
Subject: [PATCH] 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

---
 recipes-core/icedtea/icedtea7-native.inc           |  2 ++
 .../openjdk-7-03b147/headless_x11_cleanup.patch    | 35 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 recipes-core/icedtea/openjdk-7-03b147/headless_x11_cleanup.patch
recipes-core/icedtea/icedtea7-native.inc +2 -0
index 81e9b66..f555d70 100644
@@ -30,6 +30,7 @@ SRC_URI = " \
 
 SRC_URI += "file://icedtea-unzip.patch"
 SRC_URI += "file://icedtea-unzip-phase2.patch;apply=no"
+SRC_URI += "file://headless_x11_cleanup.patch;apply=no"
 
 S = "${WORKDIR}/${ICEDTEA}"
 B = "${S}/build"
@@ -149,6 +150,7 @@ do_configure_append() {
 	oe_runmake patch-boot
 
 	cd ${S} && cat ${WORKDIR}/icedtea-unzip-phase2.patch | patch -p1
+	cd ${S} && cat ${WORKDIR}/headless_x11_cleanup.patch | patch -p1
 }
 
 EXTRA_OEMAKE = ' \
recipes-core/icedtea/openjdk-7-03b147/headless_x11_cleanup.patch new file +35 -0
new file mode 100644
index 0000000..5b3e650
@@ -0,0 +1,35 @@
+---
+ build/openjdk-boot/jdk/make/sun/awt/mawt.gmk |    6 ------
+ build/openjdk/jdk/make/sun/awt/mawt.gmk      |    6 ------
+ 2 files changed, 12 deletions(-)
+
+--- a/build/openjdk-boot/jdk/make/sun/awt/mawt.gmk
++++ b/build/openjdk-boot/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
+--- a/build/openjdk/jdk/make/sun/awt/mawt.gmk
++++ b/build/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
Signature · 1 line
2.1.4
#1 lore raw

Hello Amy,

Quoted 17 lines · Amy Fong

From 4789a5dc622cc8537df28596a4beb66db4ba4774 Mon Sep 17 00:00:00 2001
From: Amy Fong <[email protected]>
Date: Tue, 14 Apr 2015 13:10:22 -0400
Subject: [PATCH] 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:

Quoted 7 lines
   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

The right mailing list for this is openembedded-devel, as described in the README.

Quoted 19 lines
---
 recipes-core/icedtea/icedtea7-native.inc           |  2 ++
 .../openjdk-7-03b147/headless_x11_cleanup.patch    | 35 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 recipes-core/icedtea/openjdk-7-03b147/headless_x11_cleanup.patch
recipes-core/icedtea/icedtea7-native.inc +1 -0
index 81e9b66..f555d70 100644
@@ -30,6 +30,7 @@ SRC_URI = " \
 
 SRC_URI += "file://icedtea-unzip.patch"
 SRC_URI += "file://icedtea-unzip-phase2.patch;apply=no"
+SRC_URI += "file://headless_x11_cleanup.patch;apply=no"
 
 S = "${WORKDIR}/${ICEDTEA}"
 B = "${S}/build"

recipes-core/icedtea/icedtea7-native.inc do_configure_append() { · line 154

Quoted 5 lines
recipes-core/icedtea/icedtea7-native.inc +1 -0
@@ -149,6 +150,7 @@ do_configure_append() {
        oe_runmake patch-boot
 
        cd ${S} && cat ${WORKDIR}/icedtea-unzip-phase2.patch | patch -p1
+       cd ${S} && cat ${WORKDIR}/headless_x11_cleanup.patch | patch -p1
 }

This should be done if X11 is not available.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750