unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd
@ 2020-09-26  9:09 Ludovic Courtès
  2020-09-26  9:15 ` Mathieu Othacehe
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-09-26  9:09 UTC (permalink / raw)
  To: 43629

Seen on i586-gnu (cross-compiled childhurd):

--8<---------------cut here---------------start------------->8---
root@childhurd ~# /gnu/store/*-guile-3.0.4/bin/guile -L /run/current-system/profile/share/guile/site/3.0/ -C /run/current-system/profile/lib/guile/3.0/site-ccache/
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.  
scheme@(guile-user)> ,use(guix scripts substitute)
scheme@(guile-user)>  (guix-substitute "--substitute" "/gnu/store/vq7zyb4hmlrafflmrcjbqccxp4dsx0s3-bash" "/tmp/t")

sha256:1as8649aqaibahhhrvkj10ci8shpi4hq5n7gnik8rhhy0dc1jarg
Downloading http://ci.guix.gnu.org/nar/lzip/vq7zyb4hmlrafflmrcjbqccxp4dsx0s3-bash...
 bash  717KiB                      +nan.0TiB/s 00:00 [                  ]   0.0%ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Wrong type to apply: #f

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)
scheme@(guile-user) [1]> ,q
--8<---------------cut here---------------end--------------->8---

Trick to get a proper backtrace, I added a breakpoint on
‘raise-exception’:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user) [1]> ,bt
In ice-9/boot-9.scm:
  1731:15  9 (with-exception-handler #<procedure 38e1cc0 at ice-9/boot-9.scm:1815:7 (exn)> _ #:unwind? _ #:unwind-for-type _)
  1736:10  8 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
  1731:15  7 (with-exception-handler #<procedure 38e1ca8 at ice-9/boot-9.scm:1815:7 (exn)> _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/substitute.scm:
  1162:10  6 (_)
  1008:19  5 (process-substitution _ "/tmp/t" #:cache-urls _ #:acl _ #:print-build-trace? _)
In guix/utils.scm:
   212:12  4 (decompressed-port _ _)
In lzlib.scm:
    589:2  3 (make-lzip-input-port #<input: string 5661038>)
   287:25  2 (_)
   287:25  1 (_)
In ice-9/boot-9.scm:
   1615:4  0 (raise-exception #<&compound-exception components: (#<&assertion-failure> #<&origin origin: #f> #<&message message: "Wrong type to apply: ~S"> #<&irritants irritants: (#f)> #<&exc?>)
--8<---------------cut here---------------end--------------->8---

This is because under the hood liblz.so could not be loaded (but the
actual error is silently swallowed):

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,m(lzlib)
scheme@(lzlib)> (lzlib-procedure int "LZ_decompress_open" '())
$1 = #f
scheme@(lzlib)> %liblz 
$2 = "liblz"
scheme@(lzlib)> (dynamic-link %liblz)
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure dynamic-link: file: "liblz", message: "file not found"

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(lzlib) [1]> ,q
--8<---------------cut here---------------end--------------->8---

Compare with a native build of guile-lzlib on GNU/Linux:

--8<---------------cut here---------------start------------->8---
scheme@(lzlib)> %liblz
$2 = "/gnu/store/jqr5bz89gfwhxcndnhq333dyclvkq7ws-lzlib-1.11/lib/liblz"
--8<---------------cut here---------------end--------------->8---

Indeed, the cross-compilation build log shows:

--8<---------------cut here---------------start------------->8---
checking dependency style of i586-pc-gnu-gcc... none
checking lzlib's file name... 
--8<---------------cut here---------------end--------------->8---

Ludo’.




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

* bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd
  2020-09-26  9:09 bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd Ludovic Courtès
@ 2020-09-26  9:15 ` Mathieu Othacehe
  2020-09-27 21:38   ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2020-09-26  9:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 43629


Hey Ludo,

> checking dependency style of i586-pc-gnu-gcc... none
> checking lzlib's file name... 

Oh, I guess the same goes for guile-zlib and all cross-compilation
targets. I'll have a look later on.

Thanks,

Mathieu
-- 
https://othacehe.org




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

* bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd
  2020-09-26  9:15 ` Mathieu Othacehe
@ 2020-09-27 21:38   ` Ludovic Courtès
  2020-09-28  9:40     ` Mathieu Othacehe
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-09-27 21:38 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 43629

Hi Mathieu,

Mathieu Othacehe <othacehe@gnu.org> skribis:

>> checking dependency style of i586-pc-gnu-gcc... none
>> checking lzlib's file name... 
>
> Oh, I guess the same goes for guile-zlib and all cross-compilation
> targets. I'll have a look later on.

Fixed in Guile-lzlib here:

  https://notabug.org/guile-lzlib/guile-lzlib/commit/82576e34b4870b8977e131a40831219f8c1ea521

Guile-zlib doesn’t have this problem because it uses pkg-config to
determine LIBZ_LIBDIR.

When you feel like it, we can have a .2 release of Guile-lzlib with this
fix.

Thanks,
Ludo’.




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

* bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd
  2020-09-27 21:38   ` Ludovic Courtès
@ 2020-09-28  9:40     ` Mathieu Othacehe
  2020-09-28 19:58       ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Othacehe @ 2020-09-28  9:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 43629


Hello,

> When you feel like it, we can have a .2 release of Guile-lzlib with this
> fix.

Done with af56f60ef0394b35ab7926d10a4f825c2b1245f6.

Thanks,

Mathieu




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

* bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd
  2020-09-28  9:40     ` Mathieu Othacehe
@ 2020-09-28 19:58       ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2020-09-28 19:58 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 43629-done

Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

>> When you feel like it, we can have a .2 release of Guile-lzlib with this
>> fix.
>
> Done with af56f60ef0394b35ab7926d10a4f825c2b1245f6.

Woohoo, thank you!

Ludo’.




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

end of thread, other threads:[~2020-09-28 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  9:09 bug#43629: Cross-compiled guile-lzlib unusable, causing ‘guix substitute’ to crash on GNU/Hurd Ludovic Courtès
2020-09-26  9:15 ` Mathieu Othacehe
2020-09-27 21:38   ` Ludovic Courtès
2020-09-28  9:40     ` Mathieu Othacehe
2020-09-28 19:58       ` 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).