bug#32894: Exception in validate-runpath phase

2018-10-01 Thread Julien Lepiller

Hi,

I'm trying to create a new package for openjdk versions we don't have 
yet. While building openjdk 10 on top of core-updates (because gcc on 
master has a bug that prevents building openjdk 9 and 10), I get a 
stacktrace at the end of the validate-runpath phase:





starting phase `validate-runpath'
validating RUNPATH of 74 binaries in 
"/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib"...

Backtrace:
  11 (primitive-load "/gnu/store/cyxf063m59nb288xnpy94gr4chq…")
In ice-9/eval.scm:
   191:35 10 (_ _)
In srfi/srfi-1.scm:
   863:16  9 (every1 # …)
In 
/gnu/store/p9wwyq2jfq2piwyc01qgsxm3hsxg2bnv-module-import/guix/build/gnu-build-system.scm:

   799:28  8 (_ _)
   557:16  7 (validate-runpath #:validate-runpath? _ # _ #:outputs _)
In 
/gnu/store/p9wwyq2jfq2piwyc01qgsxm3hsxg2bnv-module-import/guix/build/utils.scm:

   536:23  6 (every* # _)
   536:23  5 (every* # …)
In ice-9/boot-9.scm:
829:9  4 (catch srfi-34 # …)
In 
/gnu/store/p9wwyq2jfq2piwyc01qgsxm3hsxg2bnv-module-import/guix/build/gremlin.scm:

   305:26  3 (_)
In unknown file:
   2 (remove # (#))
   1 (find # …)
   0 (string-prefix? "libanl.so" 3659183287175258 # …)

ERROR: In procedure string-prefix?:
In procedure string-prefix?: Wrong type argument in position 2 
(expecting string): 3659183287175258





I tried to investigate the issue and I have found that that running 
(validate-needed-in-runpath "/gnu/...") sometimes fails on some files. 
More specifically, it always succeeds on *.so files and on most 
*.debuginfo files, but it fails on these files:


/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjsound.debuginfo
/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjimage.debuginfo
/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjaas_unix.debuginfo
/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libawt_xawt.debuginfo

with the following backtrace:



scheme@(guix build gremlin)> (validate-needed-in-runpath 
"/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjsound.debuginfo")

ERROR: In procedure string-prefix?:
In procedure string-prefix?: Wrong type argument in position 2 
(expecting string): 1


Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guix build gremlin) [1]> ,bt
In ice-9/boot-9.scm:
829:9  4 (catch srfi-34 #guix/build/gremlin.scm:285:2 ()> #guix/build/gremlin.scm:285:2 (key c)> _)

In guix/build/gremlin.scm:
   305:26  3 (_)
In unknown file:
   2 (remove # (1))
   1 (find #(libc-lib)> ("libanl.so" "libcrypt.so" "libc.so" "libdl.so" "libm.so" 
"libnsl.so" "libp?" ?))
   0 (string-prefix? "libanl.so" 1 # # 
# #)




Similarly for libawt_xawt, with the following error message:



In procedure string-prefix?: Wrong type argument in position 2 
(expecting string): 3659183287175258





Then, running:

(elf-dynamic-info (call-with-input-file "libjsoundalsa.debuginfo" 
(compose parse-elf get-bytevector-all)))

$79 = #< soname: #f needed: () rpath: () runpath: ()>

(elf-dynamic-info (call-with-input-file "libjsound.debuginfo" (compose 
parse-elf get-bytevector-all)))

$80 = #< soname: #f needed: (1) rpath: () runpath: ()>

(elf-dynamic-info (call-with-input-file "libawt_xawt.debuginfo" (compose 
parse-elf get-bytevector-all)))
$81 = #< soname: #f needed: (3659183287175258) rpath: 
() runpath: ()>




shows that the number in the exception comes from the needed field. I 
think it should be empty. You can find these three files for comparison 
at:


http://89.234.186.109/guix/libawt_xawt.debuginfo
http://89.234.186.109/guix/libjsoundalsa.debuginfo
http://89.234.186.109/guix/libjsound.debuginfo

Thank you.





bug#32770: Packaging SLIME/SWANK as Common Lisp library

2018-10-01 Thread Pierre Neidhardt
Another issue, Andy, is with the new `normalize-dependency' function that adds
support for the dependency syntax as specified by the ASDF grammar.  I think
your approach is good but it fails for `jpl-queues` because it produces the
following .asd file in the store:

--8<---cut here---start->8---
(asdf:defsystem
  "jpl-queues"
  :class
  asdf/bundle:prebuilt-system
  :version
  "0.1"
  :depends-on
  ("bordeaux-threads" (:version "jpl-util" "0.2"))
  :components
  ((:compiled-file "jpl-queues--system")))

(progn (asdf/source-registry:ensure-source-registry)
   (setf (gethash
   "bordeaux-threads"
   asdf/source-registry:*source-registry*)
 #p
 
"/gnu/store/67dhvxva7345r2xijz9yqp94s0fslrpn-sbcl-bordeaux-threads-0.8.5-1.354abb0/share/common-lisp/sbcl-bundle-systems/bordeaux-threads.asd"))
--8<---cut here---end--->8---

Note that jpl-util is missing from the registry link list.

It turns out that it fails because the match-lambda you've used to implement the
standard are case-sensitive, while the standard is case-insensitive.

Adn... jpl-queues uses ":VERSION" and not ":version" as you expected :(

I think the simple fix would be to make the two match-lambda case-insensitive
(both in generate-dependency-links and in make-asd-file).

What do you think?

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature


bug#32895: file progress reporter crashes on small files

2018-10-01 Thread Ricardo Wurmus
Downloading small files (such as cabal revisions) sometimes fails with a
backtrace like this:

--8<---cut here---start->8---
Starting download of 
/gnu/store/plr3hf9gjdcg2qhi3x4k2wjm8zajqibc-ghc-cryptohash-md5-0.11.100.1-2.cabal
>From 
>https://hackage.haskell.org/package/cryptohash-md5-0.11.100.1/revision/2.cabal...
downloading from 
https://hackage.haskell.org/package/cryptohash-md5-0.11.100.1/revision/2.cabal...
Backtrace: 7.6MiB/s 00:00 | 
3KiB transferred
In ice-9/boot-9.scm:
829:9 19 (catch _ _ # â¦)
829:9 18 (catch _ _ # â¦)
In guix/scripts/build.scm:
   749:24 17 (_)
In ice-9/boot-9.scm:
829:9 16 (catch _ _ # â¦)
In guix/ui.scm:
409:6 15 (_)
In guix/scripts/build.scm:
675:5 14 (_)
In srfi/srfi-1.scm:
   679:15 13 (append-map _ _ . _)
   592:17 12 (map1 (#))
In guix/scripts/build.scm:
   680:31 11 (_ _)
In guix/packages.scm:
   881:14 10 (cache! # # â¦)
In unknown file:
   9 (_ # # #)
In guix/grafts.scm:
303:4  8 (graft-derivation # # â¦)
181:4  7 (references-oracle # #)
   190:20  6 (_ _ _)
In guix/store.scm:
  1087:15  5 (_ # _ _)
   661:13  4 (process-stderr _ _)
In unknown file:
   3 (display "@ download-progress /gnu/store/plr3hf9gjdcg2â¦" â¦)
In guix/status.scm:
   457:13  2 (write! _ _ 186)
421:6  1 (_ (download-progress "/gnu/store/plr3hf9gjdcg2qhi3â¦" â¦) â¦)
In guix/progress.scm:
   214:25  0 (display-download-progress "2.cabal" #f #:start-time _ # â¦)

guix/progress.scm:214:25: In procedure display-download-progress:
In procedure /: Wrong type argument in position 1: #f
--8<---cut here---end--->8---

This happens because “transferred” in the “else” branch of (@ (guix
progress) display-download-progress) is #f instead of a number.  This
could be the result of running string->number on an invalid string in
“print-build-event”.


--
Ricardo