gmp-6.0.0a

2014-04-15 Thread Andreas Enge
Hello,

I am trying to upgrade gmp to 6.0.0a, with a small added complication since
the tarball unpacks into a directory gmp-6.0.0a... The patch is attached.

The configure phase of libstdc++ now fails (config.log attached), with the
following error message:

checking for exception model to use... configure: error: unable to detect 
exception model

The corresponding lines in config.log seem to be the following:

x86_64-guix-linux-gnu-g++: error trying to exec 'cc1plus': execvp: No such file 
or directory
configure:15050: $? = 1
configure:15077: error: unable to detect exception model

Do you have an idea what is happening?

Andreas

>From 722111abb7c15b77bc10a2afe0f0fd34106dc250 Mon Sep 17 00:00:00 2001
From: Andreas Enge 
Date: Tue, 15 Apr 2014 09:36:32 +0200
Subject: [PATCH] gnu: gmp: Upgrade to 6.0.0a.

* gnu/packages/multiprecision.scm (gmp): Upgrade to 6.0.0a.
* gnu/packages/base.scm (gcc-boot0): Modify symbolic link to point to
gmp-6.0.0 instead of the non-existing gmp-6.0.0a.
---
 gnu/packages/base.scm   | 9 +++--
 gnu/packages/multiprecision.scm | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index b986662..8771d2b 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès 
+;;; Copyright © 2014 Andreas Enge 
 ;;; Copyright © 2012 Nikita Karetnikov 
 ;;; Copyright © 2014 Mark H Weaver 
 ;;;
@@ -728,9 +729,13 @@ identifier SYSTEM."
   source)))
  (list gmp mpfr mpc))
 
-   ;; Create symlinks like `gmp' -> `gmp-5.0.5'.
+   ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
,@(map (lambda (lib)
-`(symlink ,(package-full-name lib)
+;; Drop trailing letters, as gmp-6.0.0a unpacks
+;; into gmp-6.0.0.
+`(symlink ,(string-trim-right
+(package-full-name lib)
+char-set:letter)
   ,(package-name lib)))
   (list gmp mpfr mpc
(alist-cons-after
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index b77e307..377d922 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -27,7 +27,7 @@
 (define-public gmp
   (package
(name "gmp")
-   (version "5.1.3")
+   (version "6.0.0a")
(source (origin
 (method url-fetch)
 (uri
@@ -35,7 +35,7 @@
 version ".tar.xz"))
 (sha256
  (base32
-  "0wbhn3wih61vjcs94q531fipfvvzqfq2v4qr03rl3xaggyiyvqny"
+  "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"
(build-system gnu-build-system)
(native-inputs `(("m4" ,m4)))
(outputs '("out" "debug"))
-- 
1.8.4

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by package-unused configure version-unused, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ../libstdc++-v3/configure 
CONFIG_SHELL=/gnu/store/3zx03qfbpykc93pn9k1gflvmm2wqj4xz-bootstrap-binaries-0/bin/bash
 
SHELL=/gnu/store/3zx03qfbpykc93pn9k1gflvmm2wqj4xz-bootstrap-binaries-0/bin/bash 
--prefix=/gnu/store/3xiwgxlw4icf2bbhrmw973rnf4i872q4-libstdc++-4.8.2 
--enable-fast-install --disable-shared --disable-libstdcxx-threads 
--disable-libstdcxx-pch 
--with-gxx-include-dir=/gnu/store/3xiwgxlw4icf2bbhrmw973rnf4i872q4-libstdc++-4.8.2/include

## - ##
## Platform. ##
## - ##

hostname = localhost
uname -m = x86_64
uname -r = 3.2.0-4-amd64
uname -s = Linux
uname -v = #1 SMP Debian 3.2.54-2

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: /gnu/store/90jg9rb36bjcqwlphla6wz5rv6bfridy-glibc-2.19/bin
PATH: /gnu/store/90jg9rb36bjcqwlphla6wz5rv6bfridy-glibc-2.19/sbin
PATH: 
/gnu/store/g6kjvj6aixlm3flsqlxsdxg7r4y7fhbs-gcc-cross-boot0-wrapped-4.8.2/bin
PATH: /gnu/store/6fh46aczz3z5r776q8frnqnyb7v5426w-binutils-cross-boot0-2.24/bin
PATH: /gnu/store/6i0s4cdrhvmhzg3fvn5ayd94biw0vcc9-make-boot0-4.0/bin
PATH: /gnu/store/47ydh0cpjkfaws4843k81aky9gbmdm7v-diffutils-3.3/bin
PATH: /gnu/store/b7rwrd4rilkq5fvg9cshba8bjcvph78v-findutils-4.4.2/bin
PATH: /gnu/store/d90rml7rbl5971mqkyh9bp1645dk7nzk-binutils-bootstrap-0/bin
PATH: /gnu/store/3zx03qfbpykc93pn9k1gflvmm2wqj4xz-bootstrap-binaries-0/bin
PATH: /gnu/store/3zx03qfbpykc93pn9k1gflvmm2wqj4xz-bootstrap-binaries-0/

Re: gmp-6.0.0a

2014-04-15 Thread Ludovic Courtès
Andreas Enge  skribis:

> I am trying to upgrade gmp to 6.0.0a, with a small added complication since
> the tarball unpacks into a directory gmp-6.0.0a... The patch is attached.
>
> The configure phase of libstdc++ now fails (config.log attached), with the
> following error message:
>
> checking for exception model to use... configure: error: unable to detect 
> exception model
>
> The corresponding lines in config.log seem to be the following:
>
> x86_64-guix-linux-gnu-g++: error trying to exec 'cc1plus': execvp: No such 
> file or directory
> configure:15050: $? = 1
> configure:15077: error: unable to detect exception model

With your patch, running

  ./pre-inst-env guix build -e '(@@ (gnu packages base) libstdc++)'

successfully yields

  /gnu/store/3xiwgxlw4icf2bbhrmw973rnf4i872q4-libstdc++-4.8.2

Do you have
/gnu/store/1xr4irpaw7pg1i1szbl5hzg5wks3cfgz-gcc-cross-boot0-4.8.2/libexec/gcc/x86_64-guix-linux-gnu/4.8.2/cc1plus?

Ludo’.



Re: gmp-6.0.0a

2014-04-15 Thread Andreas Enge
On Tue, Apr 15, 2014 at 11:37:49AM +0200, Ludovic Courtès wrote:
> With your patch, running
>   ./pre-inst-env guix build -e '(@@ (gnu packages base) libstdc++)'
> successfully yields
>   /gnu/store/3xiwgxlw4icf2bbhrmw973rnf4i872q4-libstdc++-4.8.2
> Do you have
> /gnu/store/1xr4irpaw7pg1i1szbl5hzg5wks3cfgz-gcc-cross-boot0-4.8.2/libexec/gcc/x86_64-guix-linux-gnu/4.8.2/cc1plus?

No, it happens while I am still compiling gcc-cross-boot0. The libstdc++ is
triggered automatically. So could it be a problem with parallel builds of
several packages? Lacking specification of an input?

Andreas




Re: [Nix-dev] [PATCH] Allow roots to refer to arbitrary files in the store

2014-04-15 Thread Shea Levy
On Mon, Apr 14, 2014 at 04:59:15PM +0200, Ludovic Courtès wrote:
> l...@gnu.org (Ludovic Courtès) skribis:
> 
> > Shea Levy  skribis:
> >
> >> On Mon, Apr 14, 2014 at 03:38:01PM +0200, Ludovic Courtès wrote:
> >>> The patch below allows files such as /nix/store/foo to be protected from
> >>> GC if a root refers to them.  This makes it easy for a build hook to use
> >>> such files for its temporary working files.
> >>> 
> >>> WDYT?
> >>> 
> >>
> >> It seems a bit odd to me to be using the store as a temporary file
> >> location. What's wrong with $TMPDIR?
> >
> > Well, this is useful for build hooks, because it guarantees that any
> > garbage they leave there will eventually be reclaimed.
> 
> It also guarantees that this thing lives on the same file system as the
> store, which means that rename(2) can be used to move it to its final
> location in the store.
> 

Hmm using the store as an auto-collected $TMPDIR seems wrong, but this
is a decent argument. Do you have a specific use case already planned?

> 
> Ludo’.



Re: Installing a C tool chain

2014-04-15 Thread Sergio Durigan Junior
On Monday, April 14 2014, Ludovic Courtès wrote:

>> Is it deprecated to use -Werror with the autotoools?
>
> In general, using -Werror is very risky, because a slight change in a
> third-party header, or in compiler warnings, can cause the project to
> fail to build.  In Guile building with -Werror is opt-in for this
> reason.

In GDB we use it by default, and it generally does a good service for us
without causing headaches, but of course, as Ludo said, this is mostly a
project's decision.  However, I wouldn't say that using -Werror is
deprecated :-).

-- 
Sergio



Re: [PATCH] gnu: Add glibc-hurd-headers

2014-04-15 Thread Manolis Ragkousis
The updated patch.
From 4f78389df586fd15c84248fe96743b4fb308edea Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis 
Date: Tue, 15 Apr 2014 16:54:46 +
Subject: [PATCH] gnu: Add glibc-hurd-headers.

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

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e6a2242..2656faf 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -32,10 +32,12 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages hurd)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages pkg-config)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix utils)
@@ -508,6 +510,63 @@ with the Linux kernel.")
(license lgpl2.0+)
(home-page "http://www.gnu.org/software/libc/";)))
 
+(define-public glibc/hurd-headers
+  (package (inherit glibc)
+   (name "glibc-hurd-headers")
+   (version "2.18")
+   (source (origin
+ (method git-fetch)
+ (uri (git-reference
+   (url "git://git.sv.gnu.org/hurd/glibc")
+   (commit "14258ada6a678171a59b1e095863e83b47f9d21c")))
+ (sha256
+  (base32
+   "016x7fz5500rlgwxi9dpwm6971c3xl3jkgllgjfk5s5czwvx5yh2"))
+ (file-name (string-append name "-" version))
+ (patches (list (search-patch "glibc-make-4.0.patch")
+
+   (propagated-inputs `(("gnumach-headers" ,gnumach-headers)
+("hurd-headers" ,hurd-headers)))
+   (native-inputs `(("mig" ,mig)
+("perl" ,perl)))
+
+   (outputs '("out"))
+
+   (arguments
+`(#:strip-binaries? #f
+  #:out-of-source? #t
+  #:tests? #f
+  #:configure-flags
+  (list "--host=i686-pc-gnu"
+"--enable-addons"
+
+;; Installs NIS and RPC related headers that
+;; are not installed by default
+"--enable-obsolete-rpc"
+
+(string-append "--with-headers="
+   (assoc-ref %build-inputs "gnumach-headers")
+   "/include:"
+   (assoc-ref %build-inputs "hurd-headers")
+   "/include")
+
+;; Use our Bash instead of /bin/sh.
+(string-append "BASH_SHELL="
+   (assoc-ref %build-inputs "bash")
+   "/bin/bash"))
+  #: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.0



Re: gmp-6.0.0a

2014-04-15 Thread Ludovic Courtès
Andreas Enge  skribis:

> On Tue, Apr 15, 2014 at 11:37:49AM +0200, Ludovic Courtès wrote:
>> With your patch, running
>>   ./pre-inst-env guix build -e '(@@ (gnu packages base) libstdc++)'
>> successfully yields
>>   /gnu/store/3xiwgxlw4icf2bbhrmw973rnf4i872q4-libstdc++-4.8.2
>> Do you have
>> /gnu/store/1xr4irpaw7pg1i1szbl5hzg5wks3cfgz-gcc-cross-boot0-4.8.2/libexec/gcc/x86_64-guix-linux-gnu/4.8.2/cc1plus?
>
> No, it happens while I am still compiling gcc-cross-boot0.

Are you sure?  This one has "--disable-libstdc++-v3".

I can even build gcc-final, which leads to:

  /gnu/store/7i56mxclndvcsn8lgc5pg0dh5w4khir7-gcc-4.8.2

Ludo’.



Re: [Nix-dev] [PATCH] Allow roots to refer to arbitrary files in the store

2014-04-15 Thread Ludovic Courtès
Shea Levy  skribis:

> On Mon, Apr 14, 2014 at 04:59:15PM +0200, Ludovic Courtès wrote:
>> l...@gnu.org (Ludovic Courtès) skribis:
>> 
>> > Shea Levy  skribis:
>> >
>> >> On Mon, Apr 14, 2014 at 03:38:01PM +0200, Ludovic Courtès wrote:
>> >>> The patch below allows files such as /nix/store/foo to be protected from
>> >>> GC if a root refers to them.  This makes it easy for a build hook to use
>> >>> such files for its temporary working files.
>> >>> 
>> >>> WDYT?
>> >>> 
>> >>
>> >> It seems a bit odd to me to be using the store as a temporary file
>> >> location. What's wrong with $TMPDIR?
>> >
>> > Well, this is useful for build hooks, because it guarantees that any
>> > garbage they leave there will eventually be reclaimed.
>> 
>> It also guarantees that this thing lives on the same file system as the
>> store, which means that rename(2) can be used to move it to its final
>> location in the store.
>> 
>
> Hmm using the store as an auto-collected $TMPDIR seems wrong, but this
> is a decent argument. Do you have a specific use case already planned?

Yup, the build hook, as I wrote (specifically, for the temporary it uses
when restoring from a Nar.)

The other option is to use the temporary root file (that’s what
build-remote.pl does.)  That’s nice, but it requires exposing a lot of
implementation details (GC lock, GC roots directory, etc.)

Ludo’.



Re: [PATCH] gnu: Add glibc-hurd-headers

2014-04-15 Thread Ludovic Courtès
Manolis Ragkousis  skribis:

> +(define-public glibc/hurd-headers
> +  (package (inherit glibc)
> +   (name "glibc-hurd-headers")

Indentation still wrong.

> +   (arguments
> +`(#:strip-binaries? #f
> +  #:out-of-source? #t
> +  #:tests? #f
> +  #:configure-flags
> +  (list "--host=i686-pc-gnu"
> +"--enable-addons"
> +
> +;; Installs NIS and RPC related headers that
> +;; are not installed by default
> +"--enable-obsolete-rpc"
> +
> +(string-append "--with-headers="
> +   (assoc-ref %build-inputs 
> "gnumach-headers")
> +   "/include:"
> +   (assoc-ref %build-inputs "hurd-headers")
> +   "/include")
> +
> +;; Use our Bash instead of /bin/sh.
> +(string-append "BASH_SHELL="
> +   (assoc-ref %build-inputs "bash")
> +   "/bin/bash"))
> +  #: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)))

Sorry, I didn’t get initially that it needed this much of the initial
arguments.  #:phases is the only thing that differs, right?

If that is the case, then indeed something like this is enough:

  (arguments
`(#:tests? #f
  ,@(substitute-keyword-arguments (package-arguments glibc/hurd)
  ((#:phases _)
   '(alist-replace ...)

In general the guideline is to keep things as simple and concise as
possible.  In some cases, making things more concise will actually make
them more difficult to understand, which is not desirable.

HTH!

Ludo’.



Update on VM support

2014-04-15 Thread Ludovic Courtès
Hello!

A summary of the recent changes in (gnu system vm) & co.:

  • This module now uses QEMU’s 9p file system support (-virtfs) to
share files with the host (previously it used Samba to expose a CIFS
share to the guest, because that’s what QEMU made easy to support
historically, but it was much slower, less flexible, and required a
custom patch to share more than one directory.)

  • The build-side part of the code has been moved to (guix build vm)
and modularized.  It is much more readable and flexible now.  :-)

  • When building a VM that shares its store with the host, as with
‘guix system vm’, unionfs-fuse is used to get a writable file
system.  That file system is the union of the real root provided by
the image, which is read-only, and a writable tmpfs.

That improves development and testing with ‘guix system vm’.  Some of it
will also be reusable for the installation CD/USB key image.

Ludo’.



Re: [PATCH] Allow roots to refer to arbitrary files in the store

2014-04-15 Thread Ludovic Courtès
Eelco Dolstra  skribis:

> On 14/04/14 16:59, Ludovic Courtès wrote:
>
> The patch below allows files such as /nix/store/foo to be protected from
> GC if a root refers to them.  This makes it easy for a build hook to use
> such files for its temporary working files.
>
> WDYT?

 It seems a bit odd to me to be using the store as a temporary file
 location. What's wrong with $TMPDIR?
>>>
>>> Well, this is useful for build hooks, because it guarantees that any
>>> garbage they leave there will eventually be reclaimed.
>> 
>> It also guarantees that this thing lives on the same file system as the
>> store, which means that rename(2) can be used to move it to its final
>> location in the store.
>
> The problem with your patch is that those roots don't get cleaned up
> automatically.  A better solution is to generalize the handling of temporary
> store paths like lock files and chroot directories; check out the calls to
> isActiveTempFile() in tryToDelete() in gc.cc. Those don't get deleted while 
> the
> associated build is still running, but do get deleted afterwards.

Hmm yes, I know.

I wanted to avoid going at lengths to expose all that but OK.  That
raises the barrier for build hook implementors...

Thanks,
Ludo’.



Re: gmp-6.0.0a

2014-04-15 Thread Andreas Enge
On Tue, Apr 15, 2014 at 05:36:45PM +0200, Ludovic Courtès wrote:
> I can even build gcc-final, which leads to:
>   /gnu/store/7i56mxclndvcsn8lgc5pg0dh5w4khir7-gcc-4.8.2

Okay, as it seems to work for you, I just pushed to core-updates, and we will
see what happens. If it breaks, we can try to repair it after the Easter
holidays.

Andreas