unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: Guix-devel@gnu.org
Subject: Re: [PATCH] gnu: base: Add Glibc-Hurd.
Date: Mon, 02 Jun 2014 23:38:22 +0200	[thread overview]
Message-ID: <874n03gfg1.fsf@gnu.org> (raw)
In-Reply-To: <CAFtzXzMejvh-j6qkQ0qhA0MFydtK5TYTJzP8AyBvZ2C619hNWw@mail.gmail.com> (Manolis Ragkousis's message of "Mon, 2 Jun 2014 21:09:18 +0000")

Manolis Ragkousis <manolis837@gmail.com> skribis:

> From f3a0685b57d8ff7135d2d04ef0c3cb3a78f0fc90 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Tue, 3 Jun 2014 00:00:01 +0000
> Subject: [PATCH] gnu: base: Add Glibc-Hurd.
>
> * gnu/packages/base.scm (glibc/hurd): New variable.
> * gnu/packages/patches/glibc-make-4.0.patch: New patch.
> * gnu/packages/patches/glibc-manual-fix.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.

[...]

> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "git://git.sv.gnu.org/hurd/glibc")
> +             (commit "a9d8d3808f18de4da9b587e9bdfb6cca4704344b")))
> +       (sha256
> +        (base32
> +         "0jmczzdyps5syhrqyf7lgl3h77br8s74qw0417jp8b4f29ks7pbz"))
> +       (file-name (string-append name "-" version))
> +       (modules '((guix build utils)))

I believe the ‘modules’ field can be omitted.

> +    (propagated-inputs `(("gnumach-headers" ,gnumach-headers)
> +                         ("hurd-headers" ,hurd-headers)
> +                         ("hurd-minimal" ,hurd-minimal)))

Add a one-line comment saying why they’re propagated.

> +    (arguments
> +     `(#:out-of-source? #t
> +       #:configure-flags
> +       (list "--enable-add-ons"
> +             "--host=i686-pc-gnu"
> +             "--disable-profile"
> +             "--disable-multi-arch"
> +
> +             ;; Library functions can not contact the nscd daemon
> +             ;; so we disable it.
> +             "--disable-nscd"
> +             
> +             ;; Installs NIS and RPC related headers that 
> +             ;; are not installed by default
> +             "--enable-obsolete-rpc"
> +
> +             ;; Install the rpc data base file under `$out/etc/rpc'.
> +             (string-append "--sysconfdir="
> +                            (assoc-ref %outputs "out")
> +                            "/etc")
> +
> +             (string-append "--localedir=" (assoc-ref %outputs "locales")
> +                            "/share/locale")
> +             (string-append "libc_cv_localedir="
> +                            (assoc-ref %outputs "locales")
> +                            "/share/locale")
> +             
> +             ;; Use our Bash instead of /bin/sh.
> +             (string-append "BASH_SHELL="
> +                            (assoc-ref %build-inputs "bash")
> +                            "/bin/bash"))

Is --host the only thing that differs from ‘glibc’?  If so, we need to
factorize things.

> +       #:tests? #f
> +       #:phases  (alist-cons-after 
> +                  'unpack 'bootstrap 
> +                  (lambda* (#:key inputs #:allow-other-keys)
> +                    (copy-recursively (assoc-ref inputs "libpthread") "libpthread")
> +                    (copy-file "libpthread/sysdeps/generic/bits/pthread.h" 
> +                               "bits/pthread.h")
> +                    (copy-file "libpthread/sysdeps/generic/bits/thread-attr.h" 
> +                               "bits/thread-attr.h")
> +                    (copy-file "libpthread/sysdeps/generic/bits/mutex-attr.h" 
> +                               "bits/mutex-attr.h")

Seems to me that ‘copy-recursively’ will come in handy here.  :-)

However, why do the headers need to be copied in the first place?  I
believe the sysdeps headers of add-ons are automatically picked up the
libc’s build system normally.  Could you check what’s going on?

> +                    (zero? (system* "patch" "-p1" "-i" 
> +                                    (assoc-ref %build-inputs 
> +                                               "patch/libpthread-patch")))
> +                    #t)

Remove #t, otherwise the result of ‘zero?’ is ignored.

> --- /dev/null
> +++ b/gnu/packages/patches/glibc-make-4.0.patch
> @@ -0,0 +1,12 @@
> +Allow libc to be compiled with GNU Make 4.0.
> +
> +--- glibc-2.18/configure	2013-08-11 00:52:55.000000000 +0200
> ++++ glibc-2.18/configure	2013-10-16 16:53:09.000000000 +0200
> +@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE...
> +   ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
> +   case $ac_prog_version in
> +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> +-    3.79* | 3.[89]*)
> ++    3.79* | 3.[89]* | 4.*)
> +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

(This is a sign that hurd/glibc.git is still at 2.18, which sucks.)

> --- /dev/null
> +++ b/gnu/packages/patches/glibc-manual-fix.patch
> @@ -0,0 +1,12 @@
> +diff --git a/manual/contrib.texi b/manual/contrib.texi
> +index 3b9d23c..376b40d 100644
> +--- a/manual/contrib.texi
> ++++ b/manual/contrib.texi
> +@@ -1,3 +1,4 @@
> ++@end deftypefun
> + @node Contributors, Free Manuals, Platform, Top
> + @c %MENU% Who wrote what parts of the GNU C Library
> + @appendix Contributors to @theglibc{}

What’s this?  (Missing explanation.)

Thanks!

Ludo’.

  reply	other threads:[~2014-06-02 21:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 21:09 [PATCH] gnu: base: Add Glibc-Hurd Manolis Ragkousis
2014-06-02 21:38 ` Ludovic Courtès [this message]
2014-06-06 22:23   ` Manolis Ragkousis
2014-06-09 19:27     ` Ludovic Courtès
2014-06-18 19:56       ` Manolis Ragkousis
2014-06-21 15:20         ` Ludovic Courtès
2014-07-17 15:39           ` Manolis Ragkousis

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874n03gfg1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=Guix-devel@gnu.org \
    --cc=manolis837@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).