Problem with natively built binaries on Hurd from Guix

2015-07-14 Thread Manolis Ragkousis
Hello guys,

I asked the same question yesterday in the irc, but I thought I
should repost it to the mailing list so more people can see it.

When I try to run the binaries, I get "error while loading shared
libraries: libmachuser.so.1: cannot open shared object file: No
such file or directory"

libmachuser.so.1 does exist in the expected path and trying to
run a binary with "LD_LIBRARY_PATH=/gnu/store/...-glibc-bootstrap-0/lib ./a.out"
works.

The output of 'objdump -x
/gnu/store/...-glibc-bootstrap-0/lib/libc.so.0.3 |grep RUNPATH'
does not return anything, while the output of "objdump -x
/gnu/store...-glibc-bootstrap-0/lib/libc.so.3 | grep NEED"
returns:
  NEEDED   ld.so.1
  NEEDED   libmachuser.so.1
  NEEDED   libhurduser.so.0.3
  VERNEED  0x00016054
  VERNEEDNUM   0x0001

The problem is that  libc.so depends on lib*user.so, but doesn't
have them in its RUNPATH. But if we change the RUNPATH of
libc.so,  ld.so complains and fails if libc.so's RUNPATH is non-empty.

What can we do? How can we solve this?

Manolis



Re: Problem with natively built binaries on Hurd from Guix

2015-07-15 Thread Ludovic Courtès
Hi Manolis,

I just remembered how I addressed it when I cross-built the Hurd with
Nix: Given that libc.so is an ld script on GNU/Hurd, simply add
libhurduser.so and libmachuser.so in there, next to libc.so.0.3 (see
.)

I think it can be a relative file name (so literally “libhurduser.so”
would do.)

HTH!

Ludo’.