all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: fix some issues cross-compiling glib
@ 2014-11-18 10:34 John Darrington
  2014-11-18 20:36 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-11-18 10:34 UTC (permalink / raw)
  To: guix-devel

From: John Darrington <john@darrington.wattle.id.au>

* gnu/packages/glib.scm (glib) : Moved inputs to native-inputs,
  and change "inputs" to "%build-inputs"
---
 gnu/packages/glib.scm |   47 ++++++++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index ac1b095..9fe016d 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -133,35 +133,44 @@ shared NFS home directories.")
               "bin"           ; glib-mkenums, gtester, etc.; depends on Python
               "doc"))         ; 20 MiB of GTK-Doc reference
    (inputs
-    `(("coreutils" ,coreutils)
-      ("libffi" ,libffi)
+    `(("libffi" ,libffi)
       ("zlib" ,zlib)
       ("tzdata" ,tzdata)))     ; for tests/gdatetime.c
+
    (native-inputs
     `(("gettext" ,gnu-gettext)
       ("dbus" ,dbus)                              ; for GDBus tests
+      ("coreutils" ,coreutils)
       ("pkg-config" ,pkg-config)
+      ;; The following ought to be achieved by (native-self-input #t).
+      ;; Unfortunately it seems to only set glib:out.  We want glib:bin
+      ,@(if (%current-target-system) 
+            `(("native-glib" ,glib "bin"))
+            '())
       ("python" ,python-wrapper)
       ("perl" ,perl)                              ; needed by GIO tests
       ("bash" ,bash)))
-   (arguments
-    '(#:phases (alist-cons-before
-                'build 'pre-build
-                (lambda* (#:key inputs outputs #:allow-other-keys)
-                  ;; For tests/gdatetime.c.
-                  (setenv "TZDIR"
-                          (string-append (assoc-ref inputs "tzdata")
-                                         "/share/zoneinfo"))
 
-                  ;; Some tests want write access there.
-                  (setenv "XDG_CACHE_HOME" (getcwd))
-
-                  (substitute* '("glib/gspawn.c"
-                                 "glib/tests/utils.c"
-                                 "tests/spawn-test.c")
-                    (("/bin/sh")
-                     (string-append (assoc-ref inputs "bash") "/bin/sh"))))
-                %standard-phases)
+   (arguments
+    `(#:phases 
+       (alist-cons-before
+        'build 'pre-build
+        (lambda* (#:key inputs outputs #:allow-other-keys)
+          ;; For tests/gdatetime.c.
+          (setenv "TZDIR"
+                  (string-append (assoc-ref inputs "tzdata")
+                                 "/share/zoneinfo"))
+          
+          ;; Some tests want write access there.
+          (setenv "XDG_CACHE_HOME" (getcwd))
+          
+          (substitute* '("glib/gspawn.c"
+                         "glib/tests/utils.c"
+                         "tests/spawn-test.c")
+            (("/bin/sh")
+             (string-append 
+              (assoc-ref %build-inputs "bash") "/bin/sh"))))
+        %standard-phases)
 
       ;; Note: `--docdir' and `--htmldir' are not honored, so work around it.
       #:configure-flags (list (string-append "--with-html-dir="
-- 
1.7.10.4

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

* Re: [PATCH] gnu: fix some issues cross-compiling glib
  2014-11-18 10:34 [PATCH] gnu: fix some issues cross-compiling glib John Darrington
@ 2014-11-18 20:36 ` Ludovic Courtès
  2014-11-18 20:54   ` John Darrington
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-11-18 20:36 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> From: John Darrington <john@darrington.wattle.id.au>
>
> * gnu/packages/glib.scm (glib) : Moved inputs to native-inputs,
>   and change "inputs" to "%build-inputs"

OK for the former, but why the latter?  In general I think it’s
stylistically better to refer to the ‘inputs’ argument.

Also, what about somehow grouping big-rebuild changes together?  I’m
slightly worried by the post-release chaos that might occur.  :-)
Maybe core-updates, or maybe a more specific branch for
cross-compilation fixes?

> +      ;; The following ought to be achieved by (native-self-input #t).
> +      ;; Unfortunately it seems to only set glib:out.  We want glib:bin

Missing period at end of sentence.

(And you found a bug!)

Thanks,
Ludo’.

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

* Re: [PATCH] gnu: fix some issues cross-compiling glib
  2014-11-18 20:36 ` Ludovic Courtès
@ 2014-11-18 20:54   ` John Darrington
  2014-11-19  8:53     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-11-18 20:54 UTC (permalink / raw)
  To: Ludovic Court??s; +Cc: guix-devel, John Darrington

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

On Tue, Nov 18, 2014 at 09:36:10PM +0100, Ludovic Court??s wrote:
     John Darrington <jmd@gnu.org> skribis:
     
     > From: John Darrington <john@darrington.wattle.id.au>
     >
     > * gnu/packages/glib.scm (glib) : Moved inputs to native-inputs,
     >   and change "inputs" to "%build-inputs"
     
     OK for the former, but why the latter?  In general I think it???s
     stylistically better to refer to the ???inputs??? argument.

I don't know why,  but it fails to build with "inputs".  (assoc-ref "inputs" "bash")
returns #f  
     
     Also, what about somehow grouping big-rebuild changes together?  I???m
     slightly worried by the post-release chaos that might occur.  :-)
     Maybe core-updates, or maybe a more specific branch for
     cross-compilation fixes?

I can push it to core-updates if you like.  How big is big?  

     
-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH] gnu: fix some issues cross-compiling glib
  2014-11-18 20:54   ` John Darrington
@ 2014-11-19  8:53     ` Ludovic Courtès
  2014-11-19 10:07       ` John Darrington
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-11-19  8:53 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel, John Darrington

John Darrington <john@darrington.wattle.id.au> skribis:

> On Tue, Nov 18, 2014 at 09:36:10PM +0100, Ludovic Court??s wrote:
>      John Darrington <jmd@gnu.org> skribis:
>      
>      > From: John Darrington <john@darrington.wattle.id.au>
>      >
>      > * gnu/packages/glib.scm (glib) : Moved inputs to native-inputs,
>      >   and change "inputs" to "%build-inputs"
>      
>      OK for the former, but why the latter?  In general I think it???s
>      stylistically better to refer to the ???inputs??? argument.
>
> I don't know why,  but it fails to build with "inputs".  (assoc-ref "inputs" "bash")
> returns #f  

You probably need (assoc-ref (or native-inputs inputs) "bash"), meaning
you’ll refer to the native Bash both when compiling natively and when
cross-compiling (as done in ATLAS and OpenSSL.)

>      Also, what about somehow grouping big-rebuild changes together?  I???m
>      slightly worried by the post-release chaos that might occur.  :-)
>      Maybe core-updates, or maybe a more specific branch for
>      cross-compilation fixes?
>
> I can push it to core-updates if you like.  How big is big?  

core-updates no longer exists.  Perhaps let’s just make a
‘cross-compilation’ branch (or ‘arm’?) with all such changes.
Then we’ll arrange for Hydra to build that branch, and merge it once
it’s stable and mostly built.

WDYT?

Thanks,
Ludo’.

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

* Re: [PATCH] gnu: fix some issues cross-compiling glib
  2014-11-19  8:53     ` Ludovic Courtès
@ 2014-11-19 10:07       ` John Darrington
  2014-11-19 12:47         ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: John Darrington @ 2014-11-19 10:07 UTC (permalink / raw)
  To: Ludovic Court??s; +Cc: guix-devel, John Darrington

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

On Wed, Nov 19, 2014 at 09:53:24AM +0100, Ludovic Court??s wrote:
     
     You probably need (assoc-ref (or native-inputs inputs) "bash"), meaning
     you???ll refer to the native Bash both when compiling natively and when
     cross-compiling (as done in ATLAS and OpenSSL.)

OK, I will try that.
     
     core-updates no longer exists.  Perhaps let???s just make a
     ???cross-compilation??? branch (or ???arm????) with all such changes.
     Then we???ll arrange for Hydra to build that branch, and merge it once
     it???s stable and mostly built.
     
     WDYT?

Ok.  Had you in mind to have this branch natively compiled for Arm, or cross-compiled?

If the former, then obviously the necessary hardware will be needed.  If the latter,
then there are still some obstacles to overcome before it'll work.

J'

     

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH] gnu: fix some issues cross-compiling glib
  2014-11-19 10:07       ` John Darrington
@ 2014-11-19 12:47         ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-11-19 12:47 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel, John Darrington

John Darrington <john@darrington.wattle.id.au> skribis:

> On Wed, Nov 19, 2014 at 09:53:24AM +0100, Ludovic Court??s wrote:

[...]

>      core-updates no longer exists.  Perhaps let???s just make a
>      ???cross-compilation??? branch (or ???arm????) with all such changes.
>      Then we???ll arrange for Hydra to build that branch, and merge it once
>      it???s stable and mostly built.
>      
>      WDYT?
>
> Ok.  Had you in mind to have this branch natively compiled for Arm, or cross-compiled?

Possibly the latter.  But my point was that this branch would collect
cross-compilation-related patches, or maybe ARM-related patches, which
seems to be what you’re working on currently.

Ludo’.

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

end of thread, other threads:[~2014-11-19 12:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 10:34 [PATCH] gnu: fix some issues cross-compiling glib John Darrington
2014-11-18 20:36 ` Ludovic Courtès
2014-11-18 20:54   ` John Darrington
2014-11-19  8:53     ` Ludovic Courtès
2014-11-19 10:07       ` John Darrington
2014-11-19 12:47         ` 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.