* [PATCH] gnu: hurd: Add Hurd Minimal. @ 2014-05-24 19:57 Manolis Ragkousis 2014-05-24 22:05 ` Nikita Karetnikov 2014-05-24 23:12 ` Ludovic Courtès 0 siblings, 2 replies; 14+ messages in thread From: Manolis Ragkousis @ 2014-05-24 19:57 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 251 bytes --] This patch adds Hurd minimal package which builds 'libihash.a' and a patch which disables linking of libihash against glibc. Next is the glibc/hurd package, but I will send it later/tomorrow cause there is something I need to ask the Hurd guys first. [-- Attachment #2: 0001-gnu-hurd-Add-Hurd-Minimal.patch --] [-- Type: text/x-patch, Size: 6069 bytes --] From 137cb57dfb6b983521f758992a4424301acb4281 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis <manolis837@gmail.com> Date: Sat, 24 May 2014 17:17:49 +0000 Subject: [PATCH] gnu: hurd: Add Hurd Minimal. * gnu/packages/hurd.scm (hurd-minimal): New variable. * gnu/packages/patches/hurd-minimal.patch: New patch. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/hurd.scm | 66 ++++++++++++++++++++++++++++++++- gnu/packages/patches/minimal-hurd.patch | 47 +++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/minimal-hurd.patch diff --git a/gnu-system.am b/gnu-system.am index 314db3e..4f7a110 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -308,6 +308,7 @@ dist_patch_DATA = \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/gtkglext-remove-pangox-dependency.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ + gnu/packages/patches/hurd-minimal.patch \ gnu/packages/patches/inkscape-stray-comma.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/libffi-mips-n32-fix.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index f1e7dbc..c70b1c3 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -24,7 +24,9 @@ #:use-module (gnu packages flex) #:use-module (gnu packages bison) #:use-module (gnu packages perl) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (guix git-download)) (define-public gnumach-headers (package @@ -128,3 +130,65 @@ communication.") "This package provides C headers of the GNU Hurd, used to build the GNU C Library and other user programs.") (license gpl2+))) + +(define-public hurd-minimal + (package + (name "hurd-minimal") + (version "0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.savannah.gnu.org/hurd/hurd") + (commit "353fe33eb2481a14dc324c7c2e52b2032df86465"))) + (sha256 + (base32 + "1662cnz7mabqmq9ap3hw7aiigg1pdpb3gjm6fxxjj8lrbggsgh4d")) + (file-name (string-append name "-" version)) + (patches (list (search-patch "hurd-minimal.patch"))))) + (build-system gnu-build-system) + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) + (native-inputs + `(("autoconf" ,autoconf-wrapper) + ("mig" ,mig))) + (outputs '("out")) + + (arguments + `(#:out-of-source? #t + #:phases (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; We need to copy libihash.a to the output folder manually, + ;; since there is no target for that in the makefile + (copy-recursively "libihash" + (string-append out "/libihash")) + #t)) + (alist-replace + 'build + (lambda _ + (zero? (system* "make" "-Clibihash" "libihash.a"))) + (alist-cons-before + 'configure 'bootstrap + (lambda* (#:key inputs source #:allow-other-keys) + (let ((glibc (assoc-ref inputs "glibc-hurd-headers"))) + (zero? (system* "autoreconf" "-vif")) + #t)) + %standard-phases))) + #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants + ;; that. + "--host=i686-pc-gnu" + + ;; Reduce set of dependencies. + "--disable-ncursesw" + "--disable-test" + "--without-libbz2" + "--without-libz" + "--without-parted") + #:tests? #f)) + (home-page "http://www.gnu.org/software/hurd/hurd.html") + (synopsis "GNU Hurd libraries") + (description + "This package provides libihash, needed to build the GNU C +Library for GNU/Hurd") + (license gpl2+))) diff --git a/gnu/packages/patches/minimal-hurd.patch b/gnu/packages/patches/minimal-hurd.patch new file mode 100644 index 0000000..bfc5bc9 --- /dev/null +++ b/gnu/packages/patches/minimal-hurd.patch @@ -0,0 +1,47 @@ +diff --git a/configure.ac b/configure.ac +index ecabfdf..7ede6db 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,6 +83,13 @@ AC_PROG_INSTALL + AC_PROG_AWK + AC_PROG_SED + ++if test "x$cross_compiling" = "xyes"; then ++ # It may be that we don't have a working libc yet, for instance ++ # because we're bootstrapping the cross-compilation tool chain. ++ # Thus, use this undocumented Autoconf macro designed for this. ++ AC_NO_EXECUTABLES ++ echo done ++fi + AC_PROG_CC + # Require GCC. + if test x$GCC != xyes; then + +diff --git a/configure.ac b/configure.ac +index 873ced8..e160db1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -156,8 +156,9 @@ else + fi + AC_SUBST(VERSIONING) + +-# Check if libc contains getgrouplist and/or uselocale. +-AC_CHECK_FUNCS(getgrouplist uselocale) ++# We do not need to check if libc contains getgrouplist ++# and/or uselocale for now. ++# AC_CHECK_FUNCS(getgrouplist uselocale) + + + # From glibc HEAD, 2007-11-07. +@@ -293,9 +294,9 @@ AC_SUBST([XKB_BASE]) + AC_DEFINE_UNQUOTED([X11_PREFIX], "$X11_PREFIX") + AC_SUBST([X11_KEYSYMDEF_H]) + +-# Check for Sun RPC headers and library. ++# Check only for Sun RPC headers. We do not need the library yet. + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no]) +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) + AC_SUBST([HAVE_SUN_RPC]) + + if test -f ./$ac_unique_file; then -- 1.9.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-24 19:57 [PATCH] gnu: hurd: Add Hurd Minimal Manolis Ragkousis @ 2014-05-24 22:05 ` Nikita Karetnikov 2014-05-24 22:42 ` Ludovic Courtès 2014-05-24 23:12 ` Ludovic Courtès 1 sibling, 1 reply; 14+ messages in thread From: Nikita Karetnikov @ 2014-05-24 22:05 UTC (permalink / raw) To: Manolis Ragkousis; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 360 bytes --] > ++if test "x$cross_compiling" = "xyes"; then > ++ # It may be that we don't have a working libc yet, for instance > ++ # because we're bootstrapping the cross-compilation tool chain. > ++ # Thus, use this undocumented Autoconf macro designed for this. > ++ AC_NO_EXECUTABLES > ++ echo done > ++fi Would you like to report it to the Autoconf team? [-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-24 22:05 ` Nikita Karetnikov @ 2014-05-24 22:42 ` Ludovic Courtès 0 siblings, 0 replies; 14+ messages in thread From: Ludovic Courtès @ 2014-05-24 22:42 UTC (permalink / raw) To: Nikita Karetnikov; +Cc: Guix-devel Nikita Karetnikov <nikita@karetnikov.org> skribis: >> ++if test "x$cross_compiling" = "xyes"; then >> ++ # It may be that we don't have a working libc yet, for instance >> ++ # because we're bootstrapping the cross-compilation tool chain. >> ++ # Thus, use this undocumented Autoconf macro designed for this. >> ++ AC_NO_EXECUTABLES >> ++ echo done >> ++fi > > Would you like to report it to the Autoconf team? Not needed, it’s already documented as a dirty hack for this corner case: # AC_NO_EXECUTABLES # ----------------- # FIXME: The GCC team has specific needs which the current Autoconf # framework cannot solve elegantly. This macro implements a dirty # hack until Autoconf is able to provide the services its users # need. # # Several of the support libraries that are often built with GCC can't # assume the tool-chain is already capable of linking a program: the # compiler often expects to be able to link with some of such # libraries. (From lang.m4.) Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-24 19:57 [PATCH] gnu: hurd: Add Hurd Minimal Manolis Ragkousis 2014-05-24 22:05 ` Nikita Karetnikov @ 2014-05-24 23:12 ` Ludovic Courtès [not found] ` <CAFtzXzMEQnzdvSV5+6NNjEZizoRyoJf4PhBGXqXeTeu7vjU_mg@mail.gmail.com> 1 sibling, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2014-05-24 23:12 UTC (permalink / raw) To: Manolis Ragkousis; +Cc: Guix-devel Manolis Ragkousis <manolis837@gmail.com> skribis: > This patch adds Hurd minimal package which builds 'libihash.a' and a > patch which disables linking of libihash against glibc. Next is the > glibc/hurd package, but I will send it later/tomorrow cause there is > something I need to ask the Hurd guys first. Great, keep up the good work. :-) > From 137cb57dfb6b983521f758992a4424301acb4281 Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis <manolis837@gmail.com> > Date: Sat, 24 May 2014 17:17:49 +0000 > Subject: [PATCH] gnu: hurd: Add Hurd Minimal. > > * gnu/packages/hurd.scm (hurd-minimal): New variable. > * gnu/packages/patches/hurd-minimal.patch: New patch. > * gnu-system.am (dist_patch_DATA): Add it. [...] > +(define-public hurd-minimal > + (package > + (name "hurd-minimal") > + (version "0.5") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "git://git.savannah.gnu.org/hurd/hurd") > + (commit "353fe33eb2481a14dc324c7c2e52b2032df86465"))) It may be OK currently if the version of hurd-headers does not match that of the actual hurd, but we’ll have to be cautious. Eventually we should consider changing hurd-headers to use the same source (and hurd-minimal and hurd would just use (package-source hurd-headers).) > + (outputs '("out")) Can be omitted (it’s the same as the default value.) > + (arguments > + `(#:out-of-source? #t > + #:phases (alist-replace > + 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + ;; We need to copy libihash.a to the output folder manually, > + ;; since there is no target for that in the makefile > + (copy-recursively "libihash" > + (string-append out "/libihash")) This creates /gnu/store/.../libihash/{libihash.a,Makefile,ihash.c,ihash.o,...}. Is it really what’d intended? I would expect that the intent is to create /gnu/store/.../{lib/libihash.a,include/ihash.h}, no? > + (lambda* (#:key inputs source #:allow-other-keys) > + (let ((glibc (assoc-ref inputs "glibc-hurd-headers"))) > + (zero? (system* "autoreconf" "-vif")) > + #t)) Can be simplified to: (lambda _ (zero? (system* "autoreconf" "-vfi"))) Note that the effect of the trailing #t above was to ignore the result of ‘system*’, which means ignoring errors when they occur. > --- /dev/null > +++ b/gnu/packages/patches/minimal-hurd.patch Please add a line or two in the patch saying what it does, and linking to the original discussion. > @@ -0,0 +1,47 @@ > +diff --git a/configure.ac b/configure.ac > +index ecabfdf..7ede6db 100644 > +--- a/configure.ac > ++++ b/configure.ac > +@@ -83,6 +83,13 @@ AC_PROG_INSTALL > + AC_PROG_AWK > + AC_PROG_SED > + > ++if test "x$cross_compiling" = "xyes"; then > ++ # It may be that we don't have a working libc yet, for instance > ++ # because we're bootstrapping the cross-compilation tool chain. > ++ # Thus, use this undocumented Autoconf macro designed for this. > ++ AC_NO_EXECUTABLES > ++ echo done > ++fi I gather that this works as advertised, but could you confirm by replying to <http://lists.gnu.org/archive/html/bug-hurd/2014-04/msg00139.html>? That would allow us to push the patch upstream. > +-# Check if libc contains getgrouplist and/or uselocale. > +-AC_CHECK_FUNCS(getgrouplist uselocale) > ++# We do not need to check if libc contains getgrouplist > ++# and/or uselocale for now. > ++# AC_CHECK_FUNCS(getgrouplist uselocale) I’ve just posted a patch for that, we’ll see. > +-# Check for Sun RPC headers and library. > ++# Check only for Sun RPC headers. We do not need the library yet. > + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no]) > +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) > ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) > + AC_SUBST([HAVE_SUN_RPC]) What’s the problem that’s addressed here? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <CAFtzXzMEQnzdvSV5+6NNjEZizoRyoJf4PhBGXqXeTeu7vjU_mg@mail.gmail.com>]
* Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. [not found] ` <CAFtzXzMEQnzdvSV5+6NNjEZizoRyoJf4PhBGXqXeTeu7vjU_mg@mail.gmail.com> @ 2014-05-26 8:24 ` Manolis Ragkousis 2014-05-26 9:22 ` Ludovic Courtès 0 siblings, 1 reply; 14+ messages in thread From: Manolis Ragkousis @ 2014-05-26 8:24 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel >> + (outputs '("out")) > > Can be omitted (it’s the same as the default value.) > Removed it. >> + (arguments >> + `(#:out-of-source? #t >> + #:phases (alist-replace >> + 'install >> + (lambda* (#:key outputs #:allow-other-keys) >> + (let ((out (assoc-ref outputs "out"))) >> + ;; We need to copy libihash.a to the output folder manually, >> + ;; since there is no target for that in the makefile >> + (copy-recursively "libihash" >> + (string-append out "/libihash")) > > This creates > /gnu/store/.../libihash/{libihash.a,Makefile,ihash.c,ihash.o,...}. Is > it really what’d intended? > > I would expect that the intent is to create > /gnu/store/.../{lib/libihash.a,include/ihash.h}, no? > I will create two folders, lib with libihash.a and include with ihash.h. What do you think? >> + (lambda* (#:key inputs source #:allow-other-keys) >> + (let ((glibc (assoc-ref inputs "glibc-hurd-headers"))) >> + (zero? (system* "autoreconf" "-vif")) >> + #t)) > > Can be simplified to: > > (lambda _ > (zero? (system* "autoreconf" "-vfi"))) > Simplified. > Please add a line or two in the patch saying what it does, and linking > to the original discussion. > ok, I will place a link with the discussion from bug hurd and explain what it does. >> ++if test "x$cross_compiling" = "xyes"; then >> ++ # It may be that we don't have a working libc yet, for instance >> ++ # because we're bootstrapping the cross-compilation tool chain. >> ++ # Thus, use this undocumented Autoconf macro designed for this. >> ++ AC_NO_EXECUTABLES >> ++ echo done >> ++fi > > I gather that this works as advertised, but could you confirm by > replying to > <http://lists.gnu.org/archive/html/bug-hurd/2014-04/msg00139.html>? > That would allow us to push the patch upstream. > I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail with > syntax error near unexpected token `fi'. Other than that it works. I will confirm there. >> +-# Check for Sun RPC headers and library. >> ++# Check only for Sun RPC headers. We do not need the library yet. >> + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no]) >> +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) >> ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) >> + AC_SUBST([HAVE_SUN_RPC]) > > What’s the problem that’s addressed here? It tries to link with a library in glibc (which at that point doesn't yet exist ), but it cant because of the AC_NO_EXECUTABLES flag saying that linking is not allowed after this flag is passed. So I am just disabling the test, to get the job done. Thanks, Manolis ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-26 8:24 ` Fwd: " Manolis Ragkousis @ 2014-05-26 9:22 ` Ludovic Courtès 2014-05-29 20:55 ` Manolis Ragkousis 0 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2014-05-26 9:22 UTC (permalink / raw) To: Manolis Ragkousis; +Cc: Guix-devel Manolis Ragkousis <manolis837@gmail.com> skribis: >>> + (arguments >>> + `(#:out-of-source? #t >>> + #:phases (alist-replace >>> + 'install >>> + (lambda* (#:key outputs #:allow-other-keys) >>> + (let ((out (assoc-ref outputs "out"))) >>> + ;; We need to copy libihash.a to the output folder manually, >>> + ;; since there is no target for that in the makefile >>> + (copy-recursively "libihash" >>> + (string-append out "/libihash")) >> >> This creates >> /gnu/store/.../libihash/{libihash.a,Makefile,ihash.c,ihash.o,...}. Is >> it really what’d intended? >> >> I would expect that the intent is to create >> /gnu/store/.../{lib/libihash.a,include/ihash.h}, no? >> > I will create two folders, lib with libihash.a and include with > ihash.h. What do you think? Yes, that’s what I’d expect. Double-check to make sure ihash.h doesn’t include any other file that’d need to be installed. (Please use “directory” rather than “folder” in comments & co.) >>> ++if test "x$cross_compiling" = "xyes"; then >>> ++ # It may be that we don't have a working libc yet, for instance >>> ++ # because we're bootstrapping the cross-compilation tool chain. >>> ++ # Thus, use this undocumented Autoconf macro designed for this. >>> ++ AC_NO_EXECUTABLES >>> ++ echo done >>> ++fi >> >> I gather that this works as advertised, but could you confirm by >> replying to >> <http://lists.gnu.org/archive/html/bug-hurd/2014-04/msg00139.html>? >> That would allow us to push the patch upstream. >> > > I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail with >> syntax error near unexpected token `fi'. Oh I see, this macro actually expands to nothing. > Other than that it works. I will confirm there. Thanks. >>> +-# Check for Sun RPC headers and library. >>> ++# Check only for Sun RPC headers. We do not need the library yet. >>> + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no]) >>> +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) >>> ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) >>> + AC_SUBST([HAVE_SUN_RPC]) >> >> What’s the problem that’s addressed here? > > It tries to link with a library in glibc (which at that point doesn't > yet exist ), > but it cant because of the AC_NO_EXECUTABLES flag saying that linking > is not allowed after this flag is passed. So I am just disabling the test, to > get the job done. OK, I see. Make sure to mention it in the patch comment as well. Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-26 9:22 ` Ludovic Courtès @ 2014-05-29 20:55 ` Manolis Ragkousis 2014-05-30 16:06 ` Ludovic Courtès 0 siblings, 1 reply; 14+ messages in thread From: Manolis Ragkousis @ 2014-05-29 20:55 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 24 bytes --] Updated patch. Manolis [-- Attachment #2: 0001-gnu-hurd-Add-Hurd-Minimal.patch --] [-- Type: text/x-patch, Size: 6518 bytes --] From dbb64e3e1d3e4b7f380c1dcea2b5ef283f64ea3c Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis <manolis837@gmail.com> Date: Wed, 28 May 2014 22:07:43 +0000 Subject: [PATCH] gnu: hurd: Add Hurd Minimal. * gnu/packages/hurd.scm (hurd-minimal): New variable. * gnu/packages/patches/hurd-minimal.patch: New patch. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/hurd.scm | 67 ++++++++++++++++++++++++++++++++- gnu/packages/patches/hurd-minimal.patch | 52 +++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/hurd-minimal.patch diff --git a/gnu-system.am b/gnu-system.am index ee00a7a..4ce2000 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -314,6 +314,7 @@ dist_patch_DATA = \ gnu/packages/patches/guix-test-networking.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ + gnu/packages/patches/hurd-minimal.patch \ gnu/packages/patches/inkscape-stray-comma.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/libffi-mips-n32-fix.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index f1e7dbc..48602c5 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -20,11 +20,14 @@ #:use-module (guix licenses) #:use-module (guix download) #:use-module (guix packages) + #:use-module (gnu packages) #:use-module (guix build-system gnu) #:use-module (gnu packages flex) #:use-module (gnu packages bison) #:use-module (gnu packages perl) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (guix git-download)) (define-public gnumach-headers (package @@ -128,3 +131,65 @@ communication.") "This package provides C headers of the GNU Hurd, used to build the GNU C Library and other user programs.") (license gpl2+))) + +(define-public hurd-minimal + (package + (name "hurd-minimal") + (version "0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.savannah.gnu.org/hurd/hurd") + (commit "353fe33eb2481a14dc324c7c2e52b2032df86465"))) + (sha256 + (base32 + "1662cnz7mabqmq9ap3hw7aiigg1pdpb3gjm6fxxjj8lrbggsgh4d")) + (file-name (string-append name "-" version)) + (patches (list (search-patch "hurd-minimal.patch"))))) + (build-system gnu-build-system) + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) + (native-inputs + `(("autoconf" ,autoconf-wrapper) + ("mig" ,mig))) + + (arguments + `(#:phases (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; We need to copy libihash.a to the output directory manually, + ;; since there is no target for that in the makefile. + (mkdir-p (string-append out "/include")) + (copy-file "libihash/ihash.h" + (string-append out "/include/ihash.h")) + (mkdir-p (string-append out "/lib")) + (copy-file "libihash/libihash.a" + (string-append out "/lib/libihash.a")) + #t)) + (alist-replace + 'build + (lambda _ + (zero? (system* "make" "-Clibihash" "libihash.a"))) + (alist-cons-before + 'configure 'bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vfi"))) + %standard-phases))) + #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants + ;; that. + "--host=i686-pc-gnu" + + ;; Reduce set of dependencies. + "--disable-ncursesw" + "--disable-test" + "--without-libbz2" + "--without-libz" + "--without-parted") + #:tests? #f)) + (home-page "http://www.gnu.org/software/hurd/hurd.html") + (synopsis "GNU Hurd libraries") + (description + "This package provides libihash, needed to build the GNU C +Library for GNU/Hurd") + (license gpl2+))) diff --git a/gnu/packages/patches/hurd-minimal.patch b/gnu/packages/patches/hurd-minimal.patch new file mode 100644 index 0000000..8522428 --- /dev/null +++ b/gnu/packages/patches/hurd-minimal.patch @@ -0,1 +1,52 @@ +We need to disable linking with glibc in order to build +libihash, which is a dependency of glibc. +After the flag AC_NO_EXECUTABLES is passed, linking is +not allowed so we disable those tests. + +diff --git a/configure.ac b/configure.ac +index ecabfdf..7ede6db 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,6 +83,13 @@ AC_PROG_INSTALL + AC_PROG_AWK + AC_PROG_SED + ++if test "x$cross_compiling" = "xyes"; then ++ # It may be that we don't have a working libc yet, for instance ++ # because we're bootstrapping the cross-compilation tool chain. ++ # Thus, use this undocumented Autoconf macro designed for this. ++ AC_NO_EXECUTABLES ++ AC_MSG_WARN("cross-compiling, disabling linking") ++fi + AC_PROG_CC + # Require GCC. + if test x$GCC != xyes; then + +diff --git a/configure.ac b/configure.ac +index 873ced8..e160db1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -156,8 +156,9 @@ else + fi + AC_SUBST(VERSIONING) + +-# Check if libc contains getgrouplist and/or uselocale. +-AC_CHECK_FUNCS(getgrouplist uselocale) ++# We do not need to check if libc contains getgrouplist ++# and/or uselocale for now. ++# AC_CHECK_FUNCS(getgrouplist uselocale) + + + # From glibc HEAD, 2007-11-07. +@@ -293,9 +294,9 @@ AC_SUBST([XKB_BASE]) + AC_DEFINE_UNQUOTED([X11_PREFIX], "$X11_PREFIX") + AC_SUBST([X11_KEYSYMDEF_H]) + +-# Check for Sun RPC headers and library. ++# Check only for Sun RPC headers. We do not need the library yet. + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no]) +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) + AC_SUBST([HAVE_SUN_RPC]) + + if test -f ./$ac_unique_file; then -- 1.9.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-29 20:55 ` Manolis Ragkousis @ 2014-05-30 16:06 ` Ludovic Courtès 2014-06-01 14:45 ` Manolis Ragkousis 0 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2014-05-30 16:06 UTC (permalink / raw) To: Manolis Ragkousis; +Cc: Guix-devel Manolis Ragkousis <manolis837@gmail.com> skribis: > From dbb64e3e1d3e4b7f380c1dcea2b5ef283f64ea3c Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis <manolis837@gmail.com> > Date: Wed, 28 May 2014 22:07:43 +0000 > Subject: [PATCH] gnu: hurd: Add Hurd Minimal. > > * gnu/packages/hurd.scm (hurd-minimal): New variable. > * gnu/packages/patches/hurd-minimal.patch: New patch. > * gnu-system.am (dist_patch_DATA): Add it. Looks good to me! > + (uri (git-reference > + (url "git://git.savannah.gnu.org/hurd/hurd") > + (commit "353fe33eb2481a14dc324c7c2e52b2032df86465"))) Could you just upgrade to Hurd commit a5ca1de? That will allow you to get rid of part of hurd-minimal.patch. Then we’re all set, I swear! ;-) Thank you, Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-05-30 16:06 ` Ludovic Courtès @ 2014-06-01 14:45 ` Manolis Ragkousis 2014-06-01 15:20 ` Manolis Ragkousis 0 siblings, 1 reply; 14+ messages in thread From: Manolis Ragkousis @ 2014-06-01 14:45 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 193 bytes --] > Could you just upgrade to Hurd commit a5ca1de? That will allow you to > get rid of part of hurd-minimal.patch. Done! Samuel updated the hurd repo, moments after I sent the updated patch :P [-- Attachment #2: 0001-gnu-hurd-Add-Hurd-Minimal.patch --] [-- Type: text/x-patch, Size: 3700 bytes --] From e9cfcad27c463c10e18bf7b7d3c3881674e252d5 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis <manolis837@gmail.com> Date: Wed, 28 May 2014 22:07:43 +0000 Subject: [PATCH] gnu: hurd: Add Hurd Minimal. * gnu/packages/hurd.scm (hurd-minimal): New variable. --- gnu/packages/hurd.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index f1e7dbc..84243a1 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -20,11 +20,14 @@ #:use-module (guix licenses) #:use-module (guix download) #:use-module (guix packages) + #:use-module (gnu packages) #:use-module (guix build-system gnu) #:use-module (gnu packages flex) #:use-module (gnu packages bison) #:use-module (gnu packages perl) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (guix git-download)) (define-public gnumach-headers (package @@ -128,3 +131,65 @@ communication.") "This package provides C headers of the GNU Hurd, used to build the GNU C Library and other user programs.") (license gpl2+))) + +(define-public hurd-minimal + (package + (name "hurd-minimal") + (version "0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.savannah.gnu.org/hurd/hurd") + (commit "a5ca1de1eb575294dbc865a2c4ff643efc117ef4"))) + (sha256 + (base32 + "17vqdlpy1ifw4ijhc3ydkp8p5d406c7aq4ghpmg4a1h1wlwy32kr")) + (file-name (string-append name "-" version)))) + (build-system gnu-build-system) + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) + (native-inputs + `(("autoconf" ,autoconf-wrapper) + ("mig" ,mig))) + + (arguments + `(#:phases (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; We need to copy libihash.a to the output directory manually, + ;; since there is no target for that in the makefile. + (mkdir-p (string-append out "/include")) + (copy-file "libihash/ihash.h" + (string-append out "/include/ihash.h")) + (mkdir-p (string-append out "/lib")) + (copy-file "libihash/libihash.a" + (string-append out "/lib/libihash.a")) + #t)) + (alist-replace + 'build + (lambda _ + (zero? (system* "make" "-Clibihash" "libihash.a"))) + (alist-cons-before + 'configure 'bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vfi"))) + %standard-phases))) + #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants + ;; that. + "--host=i686-pc-gnu" + + ;; Reduce set of dependencies. + "--disable-ncursesw" + "--disable-test" + "--without-libbz2" + "--without-libz" + "--without-parted") + #:tests? #f)) + (home-page "http://www.gnu.org/software/hurd/hurd.html") + (synopsis "GNU Hurd libraries") + (description + "This package provides libihash, needed to build the GNU C +Library for GNU/Hurd") + (license gpl2+))) + -- 1.9.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-06-01 14:45 ` Manolis Ragkousis @ 2014-06-01 15:20 ` Manolis Ragkousis 2014-06-01 22:00 ` Ludovic Courtès 0 siblings, 1 reply; 14+ messages in thread From: Manolis Ragkousis @ 2014-06-01 15:20 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 63 bytes --] By mistake I sent the patch incomplete. Here is the right one. [-- Attachment #2: 0001-gnu-hurd-Add-Hurd-Minimal.patch --] [-- Type: text/x-patch, Size: 5598 bytes --] From ab370d1aa6ca8b136f877791cebaa1cb82d4753d Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis <manolis837@gmail.com> Date: Sun, 1 Jun 2014 18:17:03 +0000 Subject: [PATCH] gnu: hurd: Add Hurd Minimal. * gnu/packages/hurd.scm (hurd-minimal): New variable. * gnu/packages/patches/hurd-minimal.patch: New patch. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/hurd.scm | 67 ++++++++++++++++++++++++++++++++- gnu/packages/patches/hurd-minimal.patch | 21 +++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/hurd-minimal.patch diff --git a/gnu-system.am b/gnu-system.am index 6525bbf..c2e67e7 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -315,6 +315,7 @@ dist_patch_DATA = \ gnu/packages/patches/guix-test-networking.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ + gnu/packages/patches/hurd-minimal.patch \ gnu/packages/patches/inkscape-stray-comma.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/libffi-mips-n32-fix.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index f1e7dbc..346a37b 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -20,11 +20,14 @@ #:use-module (guix licenses) #:use-module (guix download) #:use-module (guix packages) + #:use-module (gnu packages) #:use-module (guix build-system gnu) #:use-module (gnu packages flex) #:use-module (gnu packages bison) #:use-module (gnu packages perl) - #:use-module (gnu packages autotools)) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (guix git-download)) (define-public gnumach-headers (package @@ -128,3 +131,65 @@ communication.") "This package provides C headers of the GNU Hurd, used to build the GNU C Library and other user programs.") (license gpl2+))) + +(define-public hurd-minimal + (package + (name "hurd-minimal") + (version "0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.savannah.gnu.org/hurd/hurd") + (commit "a5ca1de1eb575294dbc865a2c4ff643efc117ef4"))) + (sha256 + (base32 + "17vqdlpy1ifw4ijhc3ydkp8p5d406c7aq4ghpmg4a1h1wlwy32kr")) + (file-name (string-append name "-" version)) + (patches (list (search-patch "hurd-minimal.patch"))))) + (build-system gnu-build-system) + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) + (native-inputs + `(("autoconf" ,autoconf-wrapper) + ("mig" ,mig))) + + (arguments + `(#:phases (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; We need to copy libihash.a to the output directory manually, + ;; since there is no target for that in the makefile. + (mkdir-p (string-append out "/include")) + (copy-file "libihash/ihash.h" + (string-append out "/include/ihash.h")) + (mkdir-p (string-append out "/lib")) + (copy-file "libihash/libihash.a" + (string-append out "/lib/libihash.a")) + #t)) + (alist-replace + 'build + (lambda _ + (zero? (system* "make" "-Clibihash" "libihash.a"))) + (alist-cons-before + 'configure 'bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vfi"))) + %standard-phases))) + #:configure-flags '(;; Pretend we're on GNU/Hurd; 'configure' wants + ;; that. + "--host=i686-pc-gnu" + + ;; Reduce set of dependencies. + "--disable-ncursesw" + "--disable-test" + "--without-libbz2" + "--without-libz" + "--without-parted") + #:tests? #f)) + (home-page "http://www.gnu.org/software/hurd/hurd.html") + (synopsis "GNU Hurd libraries") + (description + "This package provides libihash, needed to build the GNU C +Library for GNU/Hurd") + (license gpl2+))) diff --git a/gnu/packages/patches/hurd-minimal.patch b/gnu/packages/patches/hurd-minimal.patch new file mode 100644 index 0000000..72322ff --- /dev/null +++ b/gnu/packages/patches/hurd-minimal.patch @@ -0,0 +1,21 @@ +We need to disable linking with glibc in order to build +libihash, which is a dependency of glibc. +After the flag AC_NO_EXECUTABLES is passed, linking is +not allowed so we disable those tests. + +diff --git a/configure.ac b/configure.ac +index f8856db..a381219 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -297,9 +297,9 @@ AC_SUBST([XKB_BASE]) + AC_DEFINE_UNQUOTED([X11_PREFIX], "$X11_PREFIX") + AC_SUBST([X11_KEYSYMDEF_H]) + +-# Check for Sun RPC headers and library. ++# Check only for Sun RPC headers. We do not need the library yet. + AC_CHECK_HEADER([rpc/types.h], [HAVE_SUN_RPC=yes], [HAVE_SUN_RPC=no]) +-AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) ++# AC_SEARCH_LIBS([clnt_create], [], [:], [HAVE_SUN_RPC=no]) + AC_SUBST([HAVE_SUN_RPC]) + + if test -f ./$ac_unique_file; then -- 1.9.3 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-06-01 15:20 ` Manolis Ragkousis @ 2014-06-01 22:00 ` Ludovic Courtès 2014-06-02 16:28 ` Andreas Enge 0 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2014-06-01 22:00 UTC (permalink / raw) To: Manolis Ragkousis; +Cc: Guix-devel Manolis Ragkousis <manolis837@gmail.com> skribis: > From ab370d1aa6ca8b136f877791cebaa1cb82d4753d Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis <manolis837@gmail.com> > Date: Sun, 1 Jun 2014 18:17:03 +0000 > Subject: [PATCH] gnu: hurd: Add Hurd Minimal. > > * gnu/packages/hurd.scm (hurd-minimal): New variable. > * gnu/packages/patches/hurd-minimal.patch: New patch. > * gnu-system.am (dist_patch_DATA): Add it. Pushed, thanks! After pushing I realized that: > + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) ... we don’t have this bit yet. I guess it’s next? :-) Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-06-01 22:00 ` Ludovic Courtès @ 2014-06-02 16:28 ` Andreas Enge 2014-06-02 16:31 ` Manolis Ragkousis 2014-06-02 21:30 ` Ludovic Courtès 0 siblings, 2 replies; 14+ messages in thread From: Andreas Enge @ 2014-06-02 16:28 UTC (permalink / raw) To: Ludovic Courtès; +Cc: Guix-devel On Mon, Jun 02, 2014 at 12:00:53AM +0200, Ludovic Courtès wrote: > After pushing I realized that: > > + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) > ... we don’t have this bit yet. This has broken hydra: gnu/packages/hurd.scm:151:12: In procedure inputs: gnu/packages/hurd.scm:151:12: In procedure module-lookup: Unbound variable: glibc/hurd-headers > I guess it’s next? :-) If it does not arrive quickly, I would suggest to revert the patch for the time being. Andreas ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-06-02 16:28 ` Andreas Enge @ 2014-06-02 16:31 ` Manolis Ragkousis 2014-06-02 21:30 ` Ludovic Courtès 1 sibling, 0 replies; 14+ messages in thread From: Manolis Ragkousis @ 2014-06-02 16:31 UTC (permalink / raw) To: Andreas Enge; +Cc: Guix-devel [-- Attachment #1: Type: text/plain, Size: 44 bytes --] I will send the glibc/hurd package tonight. [-- Attachment #2: Type: text/html, Size: 62 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Fwd: [PATCH] gnu: hurd: Add Hurd Minimal. 2014-06-02 16:28 ` Andreas Enge 2014-06-02 16:31 ` Manolis Ragkousis @ 2014-06-02 21:30 ` Ludovic Courtès 1 sibling, 0 replies; 14+ messages in thread From: Ludovic Courtès @ 2014-06-02 21:30 UTC (permalink / raw) To: Andreas Enge; +Cc: Guix-devel Andreas Enge <andreas@enge.fr> skribis: > On Mon, Jun 02, 2014 at 12:00:53AM +0200, Ludovic Courtès wrote: >> After pushing I realized that: >> > + (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) >> ... we don’t have this bit yet. > > This has broken hydra: > gnu/packages/hurd.scm:151:12: In procedure inputs: > gnu/packages/hurd.scm:151:12: In procedure module-lookup: Unbound variable: glibc/hurd-headers Oops! >> I guess it’s next? :-) > > If it does not arrive quickly, I would suggest to revert the patch for the > time being. Indeed, I’ve reverted it. (We should add a paragraph on reversion in HACKING, so we all have the same expectations.) Now to review the libc/Hurd changes. Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-06-02 21:30 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-05-24 19:57 [PATCH] gnu: hurd: Add Hurd Minimal Manolis Ragkousis 2014-05-24 22:05 ` Nikita Karetnikov 2014-05-24 22:42 ` Ludovic Courtès 2014-05-24 23:12 ` Ludovic Courtès [not found] ` <CAFtzXzMEQnzdvSV5+6NNjEZizoRyoJf4PhBGXqXeTeu7vjU_mg@mail.gmail.com> 2014-05-26 8:24 ` Fwd: " Manolis Ragkousis 2014-05-26 9:22 ` Ludovic Courtès 2014-05-29 20:55 ` Manolis Ragkousis 2014-05-30 16:06 ` Ludovic Courtès 2014-06-01 14:45 ` Manolis Ragkousis 2014-06-01 15:20 ` Manolis Ragkousis 2014-06-01 22:00 ` Ludovic Courtès 2014-06-02 16:28 ` Andreas Enge 2014-06-02 16:31 ` Manolis Ragkousis 2014-06-02 21:30 ` Ludovic Courtès
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.