From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: WIP: IcedTea7
Date: Tue, 24 Mar 2015 12:10:44 +0100 [thread overview]
Message-ID: <idjwq261wi3.fsf@bimsb-sys02.mdc-berlin.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 7406 bytes --]
Hi Guix,
I'm having problems building OpenJDK 7 with our OpenJDK 6. Attached is
the package definition I'm using.
The package build can be resumed in a session spawned by "guix
environment --pure icedtea7" on Fedora 21, so I suspect it is linking to
something that's available only on the host system. Unfortunately, I
don't understand the build error. What is this to do with glibc?
Here's the output as the build procedure fails:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Building lib:/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/lib/amd64/headless/libmawt.so
Begin parallel compiles: /buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk/jdk/make/sun/headless
make[6]: Entering directory '/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk/jdk/make/sun/headless'
logname: no login name
INFO: ENABLE_FULL_DEBUG_SYMBOLS=1
INFO: no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.
gcc -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer -D_LITTLE_ENDIAN -g -g -DHEADLESS=true -DNDEBUG -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.7.0_71"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LP64=1 -DUSE_PTHREADS -I. -I/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/tmp/sun/sun.awt/headless/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -I../../../src/share/native/common -I../../../src/solaris/native/common -I../../../src/share/native/sun/awt -I../../../src/solaris/native/sun/awt -DHEADLESS=true -I/gnu/store/q6xjdq8p6fx6s6n5i9jlpp56znmc4dia-cups-2.0.1/include -DUSE_SYSTEM_CUPS -I/gnu/store/af6yzmcj64q1y3v8aa4b13r3kfak01d7-freetype-2.5.5/include/freetype2 -I/gnu/store/hpbhilz8fxc6mrisvmjig01l79dyczqi-fontconfig-2.11.92/include -I/gnu/store/b671frr777ny62n2rg3sjs6by2m44q5y-expat-2.1.0/include -I/gnu/store/af6yzmcj64q1y3v8aa4b13r3kfak01d7-freetype-2.5.5/include/freetype2 -I/gnu/store/b671frr777ny62n2rg3sjs6by2m44q5y-expat-2.1.0/include -DUSE_SYSTEM_FONTCONFIG -I../../../src/share/native/sun/awt/debug -I../../../src/share/native/sun/awt/../font -I../../../src/solaris/native/sun/awt/../font -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/shell -I../../../src/share/native/sun/awt/alphacomposite -I../../../src/share/native/sun/awt/medialib -I../../../src/solaris/native/sun/awt/medialib -I../../../src/share/native/sun/awt/../java2d -I../../../src/solaris/native/sun/awt/../java2d -I../../../src/share/native/sun/awt/../java2d/loops -I../../../src/share/native/sun/awt/../java2d/pipe -I../../../src/share/native/sun/awt/../java2d/opengl -I../../../src/solaris/native/sun/awt/../java2d/opengl -I../../../src/solaris/native/sun/awt/../java2d/x11 -I../../../src/share/native/sun/awt/../dc/doe -I../../../src/share/native/sun/awt/../dc/path -I../../../src/solaris/native/sun/awt/../jdga -I../../../src/solaris/native/sun/awt -I -c -o /buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/tmp/sun/sun.awt/headless/obj64/awt_Font.o ../../../src/solaris/native/sun/awt/awt_Font.c
gcc -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer -D_LITTLE_ENDIAN -g -g -DHEADLESS=true -DNDEBUG -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.7.0_71"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LP64=1 -DUSE_PTHREADS -I. -I/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/tmp/sun/sun.awt/headless/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -I../../../src/share/native/common -I../../../src/solaris/native/common -I../../../src/share/native/sun/awt -I../../../src/solaris/native/sun/awt -DHEADLESS=true -I/gnu/store/q6xjdq8p6fx6s6n5i9jlpp56znmc4dia-cups-2.0.1/include -DUSE_SYSTEM_CUPS -I/gnu/store/af6yzmcj64q1y3v8aa4b13r3kfak01d7-freetype-2.5.5/include/freetype2 -I/gnu/store/hpbhilz8fxc6mrisvmjig01l79dyczqi-fontconfig-2.11.92/include -I/gnu/store/b671frr777ny62n2rg3sjs6by2m44q5y-expat-2.1.0/include -I/gnu/store/af6yzmcj64q1y3v8aa4b13r3kfak01d7-freetype-2.5.5/include/freetype2 -I/gnu/store/b671frr777ny62n2rg3sjs6by2m44q5y-expat-2.1.0/include -DUSE_SYSTEM_FONTCONFIG -I../../../src/share/native/sun/awt/debug -I../../../src/share/native/sun/awt/../font -I../../../src/solaris/native/sun/awt/../font -I../../../src/share/native/sun/awt/image -I../../../src/share/native/sun/awt/image/cvutils -I../../../src/share/native/sun/awt/shell -I../../../src/share/native/sun/awt/alphacomposite -I../../../src/share/native/sun/awt/medialib -I../../../src/solaris/native/sun/awt/medialib -I../../../src/share/native/sun/awt/../java2d -I../../../src/solaris/native/sun/awt/../java2d -I../../../src/share/native/sun/awt/../java2d/loops -I../../../src/share/native/sun/awt/../java2d/pipe -I../../../src/share/native/sun/awt/../java2d/opengl -I../../../src/solaris/native/sun/awt/../java2d/opengl -I../../../src/solaris/native/sun/awt/../java2d/x11 -I../../../src/share/native/sun/awt/../dc/doe -I../../../src/share/native/sun/awt/../dc/path -I../../../src/solaris/native/sun/awt/../jdga -I../../../src/solaris/native/sun/awt -I -c -o /buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/tmp/sun/sun.awt/headless/obj64/awt_MToolkit.o ../../../src/solaris/native/sun/awt/awt_MToolkit.c
../../../src/solaris/native/sun/awt/awt_Font.c: In function ?Java_java_awt_Font_initIDs?:
../../../src/solaris/native/sun/awt/awt_Font.c:86:12: warning: unused parameter ?env? [-Wunused-parameter]
(JNIEnv *env, jclass cls)
^
../../../src/solaris/native/sun/awt/awt_Font.c:86:24: warning: unused parameter ?cls? [-Wunused-parameter]
(JNIEnv *env, jclass cls)
^
../../../src/solaris/native/sun/awt/awt_Font.c: In function ?Java_sun_awt_FontDescriptor_initIDs?:
../../../src/solaris/native/sun/awt/awt_Font.c:173:12: warning: unused parameter ?env? [-Wunused-parameter]
(JNIEnv *env, jclass cls)
^
../../../src/solaris/native/sun/awt/awt_Font.c:173:24: warning: unused parameter ?cls? [-Wunused-parameter]
(JNIEnv *env, jclass cls)
^
../../../src/solaris/native/sun/awt/awt_Font.c: In function ?Java_sun_awt_PlatformFont_initIDs?:
../../../src/solaris/native/sun/awt/awt_Font.c:218:12: warning: unused parameter ?env? [-Wunused-parameter]
(JNIEnv *env, jclass cls)
^
../../../src/solaris/native/sun/awt/awt_Font.c:218:24: warning: unused parameter ?cls? [-Wunused-parameter]
(JNIEnv *env, jclass cls)
^
/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk/jdk/make/common/internal/NativeCompileRules.gmk:74: recipe for target '/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/tmp/sun/sun.awt/headless/obj64/awt_Font.o' failed
make[6]: *** [/buildtmp/nix-build-icedtea7-2.5.3.drv-1/icedtea-2.5.3/openjdk.build/tmp/sun/sun.awt/headless/obj64/awt_Font.o] Error 1
make[6]: *** Waiting for unfinished jobs....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And here's a patch containing the definition of the icedtea7 package.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-icedtea7.patch --]
[-- Type: text/x-patch, Size: 9087 bytes --]
From e7088fa033401887c59cea0d80f7a7931af51201 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 24 Mar 2015 12:09:29 +0100
Subject: [PATCH] WIP: icedtea7
---
gnu/packages/java.scm | 159 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 158 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 3e7e4d5..738f429 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -20,6 +20,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages attr)
@@ -45,7 +46,8 @@
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages zip)
- #:use-module (gnu packages texinfo))
+ #:use-module (gnu packages texinfo)
+ #:use-module ((srfi srfi-1) #:select (fold alist-delete)))
(define-public ant
(package
@@ -562,3 +564,158 @@ build process and its dependencies, whereas Make uses Makefile format.")
;; IcedTea is released under the GPL2 + Classpath exception, which is the
;; same license as both GNU Classpath and OpenJDK.
(license license:gpl2+)))
+
+(define-public icedtea7
+ (let* ((version "2.5.3")
+ (drop (lambda (name hash)
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://icedtea.classpath.org/download/drops/"
+ "/icedtea7/" version "/" name ".tar.bz2"))
+ (sha256 (base32 hash))))))
+ (package (inherit icedtea6)
+ (name "icedtea7")
+ (version "2.5.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://icedtea.wildebeest.org/download/source/icedtea-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1w7i6j4wmg2ixv7d24mad6gphspnkb9w30azjdp4jqn2zqn95wpl"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* "Makefile.in"
+ ;; do not leak information about the build host
+ (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
+ "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
+ (arguments
+ (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ ,@(package-arguments icedtea6))
+ ((#:configure-flags flags)
+ `(let ((jdk (assoc-ref %build-inputs "icedtea6"))
+ (ant (assoc-ref %build-inputs "ant")))
+ `("--disable-bootstrap"
+ ;"--disable-bootstrap-tools"
+ "--without-rhino"
+ "--enable-nss"
+ "--enable-infinality"
+ "--enable-system-gio"
+ "--enable-system-gtk"
+ "--enable-system-gif"
+ "--enable-system-png"
+ "--enable-system-jpeg"
+ "--enable-system-zlib"
+ "--enable-system-lcms"
+ "--enable-system-fontconfig"
+ "--disable-downloading"
+ "--disable-xrender" ;; TODO: more X11 extensions are needed
+ ;see /usr/include/X11/extensions
+ ;;"--with-openjdk-src-dir=./openjdk"
+ ,(string-append "--with-ant-home=" ant)
+ ,(string-append "--with-jdk-home=" jdk)
+ )))
+ ((#:phases phases)
+ `(alist-replace
+ 'unpack
+ (lambda* (#:key source inputs #:allow-other-keys)
+ (let ((target (string-append "icedtea-" ,version)))
+ (and (zero? (system* "tar" "xvf" source))
+ (chdir target)
+ (zero? (begin
+ (system* "tar" "xvjf" (assoc-ref inputs "openjdk-drop"))
+ (system* "mv" "icedtea7-forest-2-5-49dc79ef05ab"
+ "openjdk")))
+ (zero? (begin
+ (system* "tar" "xvjf" (assoc-ref inputs "corba-drop"))
+ (system* "mv" "corba-4aed5efcd8df"
+ "openjdk/corba")))
+ (zero? (begin
+ (system* "tar" "xvjf" (assoc-ref inputs "jdk-drop"))
+ (system* "mv" "jdk-6b81c7cc733e"
+ "openjdk/jdk")))
+ (zero? (begin
+ (system* "tar" "xvjf" (assoc-ref inputs "hotspot-drop"))
+ (system* "mv" "hotspot-1d0d98e7c981"
+ "openjdk/hotspot"))))
+ (format #t "copying stuff\n")
+ ;; TODO: we already unpack them. Can I disable the tarball check?
+ (copy-file (assoc-ref inputs "openjdk-drop") "openjdk.tar.bz2")
+ (copy-file (assoc-ref inputs "corba-drop") "corba.tar.bz2")
+ (copy-file (assoc-ref inputs "hotspot-drop") "hotspot.tar.bz2")
+
+ (copy-file (assoc-ref inputs "jaxp-drop") "jaxp.tar.bz2")
+ (copy-file (assoc-ref inputs "jaxws-drop") "jaxws.tar.bz2")
+ (copy-file (assoc-ref inputs "jdk-drop") "jdk.tar.bz2")
+ (copy-file (assoc-ref inputs "langtools-drop") "langtools.tar.bz2")))
+ (alist-replace
+ 'set-additional-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
+ (("ALSA_INCLUDE=/usr/include/alsa/version.h")
+ (string-append "ALSA_INCLUDE="
+ (assoc-ref inputs "alsa-lib")
+ "/include/alsa/version.h")))
+ (setenv "CC" "gcc")
+ (setenv "JAVA_HOME"
+ (assoc-ref %build-inputs "icedtea6"))
+ (setenv "ALT_PREVIOUS_RELEASE_IMAGE"
+ (assoc-ref inputs "icedtea6"))
+ (setenv "CPATH"
+ (string-append (assoc-ref inputs "libxrender")
+ "/include/X11/extensions" ":"
+ (assoc-ref inputs "libxtst")
+ "/include/X11/extensions" ":"
+ (assoc-ref inputs "libxinerama")
+ "/include/X11/extensions" ":"
+ (or (getenv "CPATH") "")))
+ (setenv "ALT_CUPS_HEADERS_PATH"
+ (string-append (assoc-ref inputs "cups")
+ "/include"))
+ (setenv "ALT_FREETYPE_HEADERS_PATH"
+ (string-append (assoc-ref inputs "freetype")
+ "/include"))
+ (setenv "ALT_FREETYPE_LIB_PATH"
+ (string-append (assoc-ref inputs "freetype")
+ "/lib")))
+ (alist-delete 'patch-patches ,phases))))))
+ (native-inputs
+ `(("ant" ,ant)
+ ("icedtea6" ,icedtea6 "jdk")
+ ("openjdk7-src"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append
+ "http://download.java.net/openjdk/jdk7/"
+ "promoted/b147/openjdk-7-fcs-src-b147-27_jun_2011.zip"))
+ (sha256
+ (base32
+ "1qhwlz9y5qmwmja4qnxg6sn3pgsg1i11fb9j41w8l26acyhk34rs"))))
+ ("openjdk-drop"
+ ,(drop "openjdk"
+ "1jfmyls21i41l1sprw019ibrraqk4bsi3bz6iq78kmgmc83s789v"))
+ ("corba-drop"
+ ,(drop "corba"
+ "0g64gmdr1h06cjw3c3ng6raglwrq4xpkcgcfp0agrdw20zb2rswc"))
+ ("jaxp-drop"
+ ,(drop "jaxp"
+ "1vvjl9s7cr5pdbqn9pwhcjjkd4vifmg0wrqy3n1viwpkg0hah4rd"))
+ ("jaxws-drop"
+ ,(drop "jaxws"
+ "07pbrqf9n3aldzzj9m200sg911r6wgarli9i3vnilgr00x9xhqss"))
+ ("jdk-drop"
+ ,(drop "jdk"
+ "0bz1ldm4pkxk572psxw31c835z4ww62929kr7qhws3myd6lxvi20"))
+ ("langtools-drop"
+ ,(drop "langtools"
+ "1l0xxxj02z36zwjr9vaa1niwb43qvry18z44j8h5ljwzf4hnqvsi"))
+ ("hotspot-drop"
+ ,(drop "hotspot"
+ "0a5a2cmf5qn02ppgpqb4pvd4liqm6lms82qbkq1f8zzljxz1z3lc"))
+ ,@(fold alist-delete (package-native-inputs icedtea6)
+ '("openjdk6-src" "ant-bootstrap" "gcj")))))))
--
2.1.0
[-- Attachment #3: Type: text/plain, Size: 52 bytes --]
I would be very glad for any pointers.
~~ Ricardo
next reply other threads:[~2015-03-24 11:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 11:10 Ricardo Wurmus [this message]
2015-03-29 13:20 ` WIP: IcedTea7 Ludovic Courtès
2015-03-31 8:13 ` Ricardo Wurmus
2015-04-15 15:44 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=idjwq261wi3.fsf@bimsb-sys02.mdc-berlin.net \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
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.