guix 0.7 installation

2014-08-30 Thread Federico Beffa
 I've tried to search for the emacs keyword with:
 guix package -s emacs

 and get a listing of some packages, but also the following error:
 ...

I then tried to install emacs anyway, but the gnu substitute was not responsive:

$ guix package -i emacs
;;; note: source file /usr/local/share/guile/site/2.0/srfi/srfi-37.scm
;;;   newer than compiled /usr/local/share/guile/site/2.0/srfi/srfi-37.go
The following package will be installed:
   emacs-24.3out/gnu/store/df5arx0v0f5dzqw2rvr6sr8glmxdbml5-emacs-24.3

substitute-binary: ;;; note: source file
/usr/local/share/guile/site/2.0/srfi/srfi-37.scm
substitute-binary: ;;;   newer than compiled
/usr/local/share/guile/site/2.0/srfi/srfi-37.go
substitute-binary: guix substitute-binary: warning: while fetching
http://hydra.gnu.org/0bhfhlas7rm13mp7hgjbbasj22fvva69.narinfo: server
is unresponsive
substitute-binary: guix substitute-binary: warning: try
`--no-substitutes' if the problem persists

So, I thought that maybe updating was a good idea:

$ guix pull
;;; note: source file /usr/local/share/guile/site/2.0/srfi/srfi-37.scm
;;;   newer than compiled /usr/local/share/guile/site/2.0/srfi/srfi-37.go
starting download of `guix-file.op6sCK' from
`http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-master.tar.gz'...
ERROR: In procedure put-bytevector: Wrong type argument in position 2
(expecting bytevector): #f
failed to download guix-file.op6sCK from
http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-master.tar.gz;
guix pull: error: failed to download up-to-date source, exiting

By the way, I'm using Debian 7.6 and the installed guile is 2.0.5+1-3.

Regards,
Fede



Re: [PATCH] profiles: Report about upgrades.

2014-08-30 Thread Ludovic Courtès
Alex Kost alez...@gmail.com skribis:

 +  (let* ((remove (manifest-matching-entries
 +  manifest (manifest-transaction-remove transaction)))
 + (install/upgrade (manifest-transaction-install transaction))
 + (install '())
 + (upgrade (append-map
 +   (lambda (entry)
 + (let ((matching
 +(manifest-matching-entries
 + manifest
 + (list (manifest-pattern
 +(name   (manifest-entry-name entry))
 +(output (manifest-entry-output 
 entry)))
 +   (when (null? matching)
 + (set! install (cons entry install)))
 +   matching))
 +   install/upgrade)))

Somehow I had overlooked the ‘set!’ here.  ;-)  I’ve just added an
auxiliary procedure, ‘manifest-transaction-effects’, which does that in
a functional way.  Let me know if there’s anything wrong.

Ludo’.



Re: New x86 machine

2014-08-30 Thread Ludovic Courtès
David Thompson dthomps...@worcester.edu skribis:

 From what I can tell, there is no official release tarball of Hydra.  I
 guess we'd have to settle for packaging a snapshot of the git repo?

Yes.

 When trying to build Hydra, I get the error configure: error: nix-store
 is required.  Do I need to have Nix installed, or is there a configure
 flag I can pass to use Guix?

Hydra requires Nix for its command-line interface and for its Perl
bindings.  But it uses only the low-level stuff (essentially what the
(guix store) module provides), which is compatible between Nix and Guix.

 For the brave hacker, there’s also this option:

   2b. Write a Hydra replacement in Scheme, probably building upon
   David’s neat guix-web.

 I wonder how difficult this would be.  I haven't explored the full
 feature set of Hydra, but I bet we have all the building blocks that we
 need.  It would be very interesting to explore this more.

I think we’d rather think in terms of the features we need.  The
3-process architecture described at
http://hydra.nixos.org/job/hydra/trunk/tarball/latest/download-by-type/doc/manual
under “Getting Started” should be mostly appropriate, I think.

Thanks,
Ludo’.



Re: guix 0.7 installation

2014-08-30 Thread Ludovic Courtès
Federico Beffa be...@ieee.org skribis:

 I've tried to search for the emacs keyword with:
 guix package -s emacs

 and get a listing of some packages, but also the following error:

This particular bug was fixed soon after 0.7:

  
http://git.savannah.gnu.org/cgit/guix.git/commit/?id=5e6feee61793a6b60aa352dcdbbed0155eb42e7f

Hopefully running ‘guix pull’ will pull the fix.

Thanks,
Ludo’.



Re: guix 0.7 installation

2014-08-30 Thread Ludovic Courtès
Federico Beffa be...@ieee.org skribis:

 I then tried to install emacs anyway, but the gnu substitute was not 
 responsive:

 $ guix package -i emacs

[...]

 substitute-binary: guix substitute-binary: warning: while fetching
 http://hydra.gnu.org/0bhfhlas7rm13mp7hgjbbasj22fvva69.narinfo: server
 is unresponsive

This message just means that hydra.gnu.org is not responding very
quickly, which unfortunately is often the case currently.

 So, I thought that maybe updating was a good idea:

 $ guix pull
 ;;; note: source file /usr/local/share/guile/site/2.0/srfi/srfi-37.scm
 ;;;   newer than compiled /usr/local/share/guile/site/2.0/srfi/srfi-37.go
 starting download of `guix-file.op6sCK' from
 `http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-master.tar.gz'...
 ERROR: In procedure put-bytevector: Wrong type argument in position 2
 (expecting bytevector): #f
 failed to download guix-file.op6sCK from
 http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-master.tar.gz;
 guix pull: error: failed to download up-to-date source, exiting

 By the way, I'm using Debian 7.6 and the installed guile is 2.0.5+1-3.

This is an old Guile version, whose web client has problems that Guix
tries to work around.  However, from a quick look, ‘guix pull’ uses a
path for its download that does not attempt to work around the 2.0.5
issues (namely it uses the (guix build download) module, instead of
(guix web-client).)

For now, would it be an option for you to upgrade to a newer Guile?
That would be the best solution.

Thanks,
Ludo’.



Re: [PATCHES] Add 'file' to %final-inputs; patch /usr/bin/file

2014-08-30 Thread Ludovic Courtès
m...@netris.org skribis:

 +(define* (patch-usr-bin-file #:key native-inputs inputs #:allow-other-keys)
 +  Patch occurrences of /usr/bin/file in configure script, if present.
 +  (let ((file configure)
 +(new (and= (assoc-ref (or native-inputs inputs) file)
 +(cut string-append  /bin/file
 +(when (and new (file-exists? file))
 +  (let ((st (stat file)))
 +(substitute* file
 +  ((/usr/bin/file old)
 +   (begin
 + (format (current-error-port)
 + patch-usr-bin-file: ~a: changing `~a' to `~a'~%
 + file old new)
 + new)))
 +(set-file-time file st)))
 +#t))

Having seen this commit:

  commit 6646747c020402fd077a719af99627d9cf3fe54d

  gnu: gawk: Patch /usr/bin/file in extension/configure on MIPS.

  * gnu/packages/gawk.scm (gawk): When building for MIPS, patch 
/usr/bin/file in
extension/configure.

I was thinking that perhaps the ‘patch-usr-bin-file’ phase should
operate on all the executable ‘configure’ files found in the source
tree, recursively.  WDYT?

Also, perhaps the procedure that does the actual patching could be moved
to (guix build utils), and then called from ‘patch-usr-bin-file’.

(This change can wait for the next core-updates if this one is going to
be merged real soon.)

Thanks,
Ludo’.



Re: guix 0.7 installation

2014-08-30 Thread Federico Beffa
 This is an old Guile version, whose web client has problems that Guix
 tries to work around.  However, from a quick look, ‘guix pull’ uses a
 path for its download that does not attempt to work around the 2.0.5
 issues (namely it uses the (guix build download) module, instead of
 (guix web-client).)

 For now, would it be an option for you to upgrade to a newer Guile?
 That would be the best solution.

OK. To update guile I thought I would follow the guix README file and
build guix with guix.
So, I've given the command:

$ guix package 
--install={autoconf,automake,bzip2,gcc-toolchain,gettext,guile,libgcrypt,pkg-config,sqlite}

and got the packages installed :-)
At the end of the process I've been told to define the following
environment variables:

   export PKG_CONFIG_PATH=/home/beffa/.guix-profile/lib/pkgconfig
   export ACLOCAL_PATH=/home/beffa/.guix-profile/share/aclocal

On top of those I've defined the PATH as follows:

export PATH=$HOME/.guix-profile/bin:$PATH

The README file mentions all of the following veriables: ACLOCAL_PATH,
CPATH, LIBRARY_PATH, PKG_CONFIG_PATH. However, only the above ones
have been mentioned during the installation phase and defined.

Then I've cleaned up the build area with make distclean and
according to the README file I've issued

./configure --with-libgcrypt-prefix=$HOME/.guix-profile/

Unfortunately I've got a new error:

$ ./configure --with-libgcrypt-prefix=$HOME/.guix-profile/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/beffa/Downloads/guix-0.7':
configure: error: C compiler cannot create executables

Please find attached the full config.log.

What do you think? Would I be better downloading and installing a
newer guile version the traditional way?

Thanks for your help!
Regards,
Fede
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU Guix configure 0.7, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --with-libgcrypt-prefix=/home/beffa/.guix-profile/

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

hostname = leo
uname -m = x86_64
uname -r = 3.2.0-4-amd64
uname -s = Linux
uname -v = #1 SMP Debian 3.2.60-1+deb7u3

/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: /home/beffa/.guix-profile/bin
PATH: /home/beffa/.guix-profile/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games


## --- ##
## Core tests. ##
## --- ##

configure:2501: checking for a BSD-compatible install
configure:2569: result: /usr/bin/install -c
configure:2580: checking whether build environment is sane
configure:2635: result: yes
configure:2786: checking for a thread-safe mkdir -p
configure:2825: result: /bin/mkdir -p
configure:2832: checking for gawk
configure:2862: result: no
configure:2832: checking for mawk
configure:2848: found /usr/bin/mawk
configure:2859: result: mawk
configure:2870: checking whether make sets $(MAKE)
configure:2892: result: yes
configure:2921: checking whether make supports nested variables
configure:2938: result: yes
configure:3079: checking for style of include used by make
configure:3107: result: GNU
configure:3178: checking for gcc
configure:3194: found /home/beffa/.guix-profile/bin/gcc
configure:3205: result: gcc
configure:3434: checking for C compiler version
configure:3443: gcc --version 5
gcc (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3454: $? = 0
configure:3443: gcc -v 5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/gnu/store/qj9nmaalc5dbrs6y03bv0744w3bn63x6-gcc-4.9.1/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: 
Thread model: posix
gcc version 4.9.1 (GCC) 
configure:3454: $? = 0
configure:3443: gcc -V 5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3454: $? = 1
configure:3443: gcc -qversion 5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3454: $? = 1
configure:3474: checking whether the C compiler works
configure:3496: gcc