unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: base: Add Hurd glibc headers.
@ 2014-04-22 20:03 Manolis Ragkousis
  2014-04-22 22:22 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2014-04-22 20:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

This patch adds the glibc headers for hurd. It assumes that glibc/hurd exists.

Ludovic if I try to use

>      (zero? (system* "make"
>                      (string-append out "/include/gnu/stubs.h")))))

as you suggested, I am getting

>make[2]: *** No rule to make target '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/build/elf/soinit.os', needed by '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/build/libc.so'.  Stop.
>make[2]: Leaving directory '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/glibc-hurd-2.18/mach'
>Makefile:233: recipe for target 'mach/subdir_install' failed
>make[1]: *** [mach/subdir_install] Error 2
>make[1]: Leaving directory '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/glibc-hurd-2.18'
>Makefile:9: recipe for target '/gnu/store/dgf45yi11yn08fq8hm1cp49yqhyg0nl6-glibc-hurd-headers-cross-i686-pc-gnu-2.18/include/gnu/stubs.h' failed
>make: *** [/gnu/store/dgf45yi11yn08fq8hm1cp49yqhyg0nl6-glibc-hurd-headers-cross-i686-pc-gnu-2.18/include/gnu/stubs.h] Error 2

and it cannot be built. I am sending you the log as well so you can
see for yourself.

[-- Attachment #2: add_hurd_glibc_headers.patch --]
[-- Type: text/x-patch, Size: 1383 bytes --]

From 2105424303a99b0722d75145d3988b257af92058 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 22 Apr 2014 22:43:48 +0300
Subject: [PATCH] gnu: base: Add Hurd glibc headers.

* gnu/packages/base.scm (glibc/hurd-headers): New variable.
---
 gnu/packages/base.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 09cbe89..cc5a697 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -508,6 +508,27 @@ with the Linux kernel.")
    (license lgpl2.0+)
    (home-page "http://www.gnu.org/software/libc/")))
 
+(define-public glibc/hurd-headers
+  (package (inherit glibc/hurd)
+    (name "glibc-hurd-headers")
+    (outputs `("out"))
+    (arguments
+     `(#:tests? #f
+       ,@(substitute-keyword-arguments (package-arguments glibc/hurd)
+           ((#:phases _)
+            '(alist-replace
+              'install
+              (lambda _
+                (zero? (system* "make" "install-headers" )))
+              (alist-delete
+               'build
+               (alist-cons-before
+                'configure 'pre-configure
+                (lambda _
+                  (substitute* "configure"
+                    (("/bin/pwd") "pwd")))
+                %standard-phases)))))))))
+
 (define-public tzdata
   (package
     (name "tzdata")
-- 
1.9.2


[-- Attachment #3: xjnd3jrfywgkrimyrv1kc973kr6j9m-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv.bz2 --]
[-- Type: application/x-bzip2, Size: 75467 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: base: Add Hurd glibc headers.
  2014-04-22 20:03 [PATCH] gnu: base: Add Hurd glibc headers Manolis Ragkousis
@ 2014-04-22 22:22 ` Ludovic Courtès
  2014-04-25 18:06   ` Manolis Ragkousis
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2014-04-22 22:22 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> skribis:

> This patch adds the glibc headers for hurd. It assumes that glibc/hurd exists.
>
> Ludovic if I try to use
>
>>      (zero? (system* "make"
>>                      (string-append out "/include/gnu/stubs.h")))))
>
> as you suggested, I am getting
>
>>make[2]: *** No rule to make target '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/build/elf/soinit.os', needed by '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/build/libc.so'.  Stop.
>>make[2]: Leaving directory '/tmp/nix-build-glibc-hurd-headers-cross-i686-pc-gnu-2.18.drv-9/glibc-hurd-2.18/mach'
>>Makefile:233: recipe for target 'mach/subdir_install' failed

It may be enough to create an empty gnu/stubs.h.  Could you try that
instead?

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: base: Add Hurd glibc headers.
  2014-04-22 22:22 ` Ludovic Courtès
@ 2014-04-25 18:06   ` Manolis Ragkousis
  2014-04-26  8:54     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2014-04-25 18:06 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

> It may be enough to create an empty gnu/stubs.h.  Could you try that
> instead?

Updated the patch with creating an empty gnu/stubs.h file. It seems to
be enough.

[-- Attachment #2: gnu_add_hurd_glibc_headers.patch --]
[-- Type: text/x-patch, Size: 1571 bytes --]

From de09416868b7dab1d44313bf2b9ab201efe16e62 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Fri, 25 Apr 2014 20:56:23 +0000
Subject: [PATCH] gnu: base: Add Hurd glibc headers.

* gnu/packages/base.scm (glibc/hurd-headers): New variable.
---
 gnu/packages/base.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 09cbe89..142e2f8 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -508,6 +508,29 @@ with the Linux kernel.")
    (license lgpl2.0+)
    (home-page "http://www.gnu.org/software/libc/")))
 
+(define-public glibc/hurd-headers
+  (package (inherit glibc/hurd)
+    (name "glibc-hurd-headers")
+    (outputs `("out"))
+    (arguments
+     `(#:tests? #f
+       ,@(substitute-keyword-arguments (package-arguments glibc/hurd)
+           ((#:phases _)
+            '(alist-replace
+              'install
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((out (assoc-ref outputs "out")))
+                  (zero? (system* "make" "install-headers"))
+                  (close-port (open-output-file (string-append out "/include/gnu/stubs.h")))))
+              (alist-delete
+               'build
+               (alist-cons-before
+                'configure 'pre-configure
+                (lambda _
+                  (substitute* "configure"
+                    (("/bin/pwd") "pwd")))
+                %standard-phases)))))))))
+
 (define-public tzdata
   (package
     (name "tzdata")
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: base: Add Hurd glibc headers.
  2014-04-25 18:06   ` Manolis Ragkousis
@ 2014-04-26  8:54     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-04-26  8:54 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> skribis:

>> It may be enough to create an empty gnu/stubs.h.  Could you try that
>> instead?
>
> Updated the patch with creating an empty gnu/stubs.h file. It seems to
> be enough.

Good news!

> From de09416868b7dab1d44313bf2b9ab201efe16e62 Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Fri, 25 Apr 2014 20:56:23 +0000
> Subject: [PATCH] gnu: base: Add Hurd glibc headers.
>
> * gnu/packages/base.scm (glibc/hurd-headers): New variable.

OK, looks good to me.

> +                  (close-port (open-output-file (string-append out "/include/gnu/stubs.h")))))

Please keep lines below 80 chars.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-26  8:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-22 20:03 [PATCH] gnu: base: Add Hurd glibc headers Manolis Ragkousis
2014-04-22 22:22 ` Ludovic Courtès
2014-04-25 18:06   ` Manolis Ragkousis
2014-04-26  8:54     ` Ludovic Courtès

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).