* Packages with libraries and binaries
@ 2013-09-22 12:06 Andreas Enge
2013-09-22 19:37 ` Nikita Karetnikov
2013-09-22 19:44 ` Ludovic Courtès
0 siblings, 2 replies; 8+ messages in thread
From: Andreas Enge @ 2013-09-22 12:06 UTC (permalink / raw)
To: guix-devel
When trying to use cdparanoia, I noticed the following:
$ ldd `which cdparanoia`
linux-vdso.so.1 => (0x00007fff1e9dd000)
libcdda_interface.so.0 => not found
libcdda_paranoia.so.0 => not found
libm.so.6 => /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/libm.so.6 (0x00007fb37355b000)
librt.so.1 => /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/librt.so.1 (0x00007fb373353000)
libc.so.6 => /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/libc.so.6 (0x00007fb372fa5000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb372d89000)
/nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fb373877000)
The two missing libraries are part of the package itself; apparently, they
do not get encoded into the rpath. Could this be handled somehow by the build
system? Should it be done in the package definition? Or should I set an
LD_LIBRARY_PATH?
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Packages with libraries and binaries
2013-09-22 12:06 Packages with libraries and binaries Andreas Enge
@ 2013-09-22 19:37 ` Nikita Karetnikov
2013-09-22 19:44 ` Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Nikita Karetnikov @ 2013-09-22 19:37 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
> The two missing libraries are part of the package itself; apparently, they
> do not get encoded into the rpath. Could this be handled somehow by the build
> system? Should it be done in the package definition? Or should I set an
> LD_LIBRARY_PATH?
You can adjust RPATH with patchelf. Here’s an example [1] (ignore the
comment about shared libs).
Does it answer your question?
[1] https://lists.gnu.org/archive/html/guix-devel/2013-07/txt5Qs_mNF2lH.txt
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Packages with libraries and binaries
2013-09-22 12:06 Packages with libraries and binaries Andreas Enge
2013-09-22 19:37 ` Nikita Karetnikov
@ 2013-09-22 19:44 ` Ludovic Courtès
2013-10-04 17:55 ` Andreas Enge
2013-10-04 17:58 ` Andreas Enge
1 sibling, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2013-09-22 19:44 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> skribis:
> When trying to use cdparanoia, I noticed the following:
>
> $ ldd `which cdparanoia`
>
> linux-vdso.so.1 => (0x00007fff1e9dd000)
> libcdda_interface.so.0 => not found
> libcdda_paranoia.so.0 => not found
> libm.so.6 => /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/libm.so.6 (0x00007fb37355b000)
> librt.so.1 => /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/librt.so.1 (0x00007fb373353000)
> libc.so.6 => /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/libc.so.6 (0x00007fb372fa5000)
> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb372d89000)
> /nix/store/53afsq4c7r10hn77h3iyyavy2bs02403-glibc-2.17/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fb373877000)
That’s an indication that cdparanoia doesn’t use Libtool...
> The two missing libraries are part of the package itself; apparently, they
> do not get encoded into the rpath. Could this be handled somehow by the build
> system? Should it be done in the package definition? Or should I set an
> LD_LIBRARY_PATH?
In such cases, we must set the RUNPATH, using patchelf as Nikita notes.
The recommended way to do that is to use ‘augment-rpath’ from (guix
build rpath), as done in python.scm (make sure to add ‘patchelf’ as an
input).
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Packages with libraries and binaries
2013-09-22 19:44 ` Ludovic Courtès
@ 2013-10-04 17:55 ` Andreas Enge
2013-10-05 12:52 ` Ludovic Courtès
2013-10-04 17:58 ` Andreas Enge
1 sibling, 1 reply; 8+ messages in thread
From: Andreas Enge @ 2013-10-04 17:55 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
On Sun, Sep 22, 2013 at 09:44:18PM +0200, Ludovic Courtès wrote:
> In such cases, we must set the RUNPATH, using patchelf as Nikita notes.
> The recommended way to do that is to use ‘augment-rpath’ from (guix
> build rpath), as done in python.scm (make sure to add ‘patchelf’ as an
> input).
When copy-pasting the phases argument from python-2 into cdparanoia, the
build phase fails as follows:
phase `strip' succeeded after 0 seconds
starting phase `add-lib-to-runpath'
Backtrace:
In ice-9/boot-9.scm:
157: 15 [catch #t #<catch-closure 1cb5d20> ...]
In unknown file:
?: 14 [apply-smob/1 #<catch-closure 1cb5d20>]
In ice-9/boot-9.scm:
63: 13 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 12 [eval # #]
In ice-9/boot-9.scm:
2320: 11 [save-module-excursion #<procedure 1ce4bc0 at ice-9/boot-9.scm:3961:3 ()>]
3966: 10 [#<procedure 1ce4bc0 at ice-9/boot-9.scm:3961:3 ()>]
1645: 9 [%start-stack load-stack ...]
1650: 8 [#<procedure 1ceadb0 ()>]
In unknown file:
?: 7 [primitive-load "/nix/store/m95ni0aq76l1vrlvdjrz2g4gw13md321-cdparanoia-10.2-guile-builder"]
In ice-9/eval.scm:
387: 6 [eval # ()]
In /nix/store/5kbwbhzkvndzlx0yldg3532xn7j74cwz-module-import/guix/build/gnu-build-system.scm:
368: 5 [#<procedure 1ef74c0 at /nix/store/5kbwbhzkvndzlx0yldg3532xn7j74cwz-module-import/guix/build/gnu-build-system.scm:364:9 (expr)> #]
In ice-9/r4rs.scm:
90: 4 [dynamic-wind #<procedure 221f540 at ice-9/eval.scm:416:20 ()> ...]
In ice-9/eval.scm:
387: 3 [eval # #]
386: 2 [eval # #]
393: 1 [eval # #]
In unknown file:
?: 0 [memoize-variable-access! #<memoized cut> #<directory (guile-user) 1ca7c60>]
ERROR: In procedure memoize-variable-access!:
ERROR: Unbound variable: cut
As if an import of module srfi-26 were missing somewhere, but both python and
cdparanoia use the same gnu build system.
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Packages with libraries and binaries
2013-10-04 17:55 ` Andreas Enge
@ 2013-10-05 12:52 ` Ludovic Courtès
2013-10-06 9:50 ` Andreas Enge
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2013-10-05 12:52 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> skribis:
> On Sun, Sep 22, 2013 at 09:44:18PM +0200, Ludovic Courtès wrote:
>> In such cases, we must set the RUNPATH, using patchelf as Nikita notes.
>> The recommended way to do that is to use ‘augment-rpath’ from (guix
>> build rpath), as done in python.scm (make sure to add ‘patchelf’ as an
>> input).
>
> When copy-pasting the phases argument from python-2 into cdparanoia, the
> build phase fails as follows:
>
> phase `strip' succeeded after 0 seconds
> starting phase `add-lib-to-runpath'
[...]
> ERROR: In procedure memoize-variable-access!:
> ERROR: Unbound variable: cut
>
> As if an import of module srfi-26 were missing somewhere, but both python and
> cdparanoia use the same gnu build system.
Exactly. You need that snippet, as in python.scm:
--8<---------------cut here---------------start------------->8---
#:modules ((guix build gnu-build-system)
(guix build utils)
(guix build rpath)
(srfi srfi-26))
#:imported-modules ((guix build gnu-build-system)
(guix build utils)
(guix build rpath))
--8<---------------cut here---------------end--------------->8---
#:modules tells what modules are to be imported in the lexical
environment of the build program, while #:imported-modules says what
.scm/.go files need to be available in the build chroot (since srfi-26
is part of Guile, it’s listed in the former but not the latter.)
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Packages with libraries and binaries
2013-09-22 19:44 ` Ludovic Courtès
2013-10-04 17:55 ` Andreas Enge
@ 2013-10-04 17:58 ` Andreas Enge
2013-10-05 12:53 ` Ludovic Courtès
1 sibling, 1 reply; 8+ messages in thread
From: Andreas Enge @ 2013-10-04 17:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
And can I use the same code for libraries using other libraries of the same
package, by changing "bin" to "lib" in the code snippet?
For instance, one has
$ ldd /nix/store/bplvsx34rzpn85vly086l0jhmhil9ncg-icu4c-50.1.1/lib/libicuuc.so
...
libicudata.so.50 => not found
...
where the unfound library resides in the same directory.
Andreas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Packages with libraries and binaries
2013-10-04 17:58 ` Andreas Enge
@ 2013-10-05 12:53 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2013-10-05 12:53 UTC (permalink / raw)
To: Andreas Enge; +Cc: guix-devel
Andreas Enge <andreas@enge.fr> skribis:
> And can I use the same code for libraries using other libraries of the same
> package, by changing "bin" to "lib" in the code snippet?
>
> For instance, one has
> $ ldd /nix/store/bplvsx34rzpn85vly086l0jhmhil9ncg-icu4c-50.1.1/lib/libicuuc.so
> ...
> libicudata.so.50 => not found
> ...
>
> where the unfound library resides in the same directory.
Yes, in this case the RUNPATH of libicuuc.so needs to be augmented to
contain $out/lib, where libicudata.so lives.
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-06 9:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-22 12:06 Packages with libraries and binaries Andreas Enge
2013-09-22 19:37 ` Nikita Karetnikov
2013-09-22 19:44 ` Ludovic Courtès
2013-10-04 17:55 ` Andreas Enge
2013-10-05 12:52 ` Ludovic Courtès
2013-10-06 9:50 ` Andreas Enge
2013-10-04 17:58 ` Andreas Enge
2013-10-05 12:53 ` 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).