Re: bug#48941: [powerpc64le-linux] libfaketime CLOCK_MONOTONIC test hangs

2021-07-22 Thread Chris Marusich
Hi Kaelyn,

Thank you for the reply.

Kaelyn  writes:

> Are you using Guix on a foreign distro? This line looks like your
> distro's normal libc.so was being used and it was from glibc-2.31 or
> older. The x86-64 systems I have that run pure Guix don't have any
> /lib*/ directories. You might try running gdb with
> LD_LIBRARY_PATH=/gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/lib
> to have the Guix libc.so picked up before the other one. HTH

Yes, I'm using Guix on a foreign distro.  It isn't clear to me what is
trying to access the /lib directories.  That's what I'm trying to figure
out.  In a --pure environment using only Guix-built tools, one would
expect that I would not have to set LD_LIBRARY_PATH.  However, if I
can't figure it out, that's another trick I can try.

-- 
Chris


signature.asc
Description: PGP signature


Re: bug#48941: [powerpc64le-linux] libfaketime CLOCK_MONOTONIC test hangs

2021-07-22 Thread Thiago Jung Bauermann
Hello,

Em quarta-feira, 21 de julho de 2021, às 11:31:25 -03, Kaelyn escreveu:
> Hi,
> 
> ‐‐‐ Original Message ‐‐‐
> 
> On Wednesday, July 21st, 2021 at 1:08 AM, Chris Marusich 
 wrote:
> > Now run it:
> > 
> > --8<---cut here---start->8---
> > 
> > (gdb) run
> > 
> > Starting program:
> > /tmp/guix-build-libfaketime-0.9.9.drv-0/source/test/timetest
> > 
> > /bin/sh: /lib/powerpc64le-linux-gnu/libc.so.6: version `GLIBC_2.33' not
> > found (required by ../src/libfaketime.so.1) /bin/sh:
> > /lib/powerpc64le-linux-gnu/libc.so.6: version` GLIBC_2.32' not found
> > (required by
> > /gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/lib/libpthread.
> > so.0)
> Are you using Guix on a foreign distro? This line looks like your
> distro's normal libc.so was being used and it was from glibc-2.31 or
> older.

GDB uses the shell to launch the debugged program. That is probably where
‘/bin/sh’ is entering the picture here. I don’t know whether that has any 
relation to your foreign distro’s libc being used.

The output of `help run` in GDB mentions that the shell is specified by the 
‘$SHELL’ environment variable. Perhaps you have that set?

One way to see if this is the problem is to use the GDB command
`set startup-with-shell off` to make it launch the debugged program without 
the shell.

> The x86-64 systems I have that run pure Guix don't have any
> /lib*/ directories. You might try running gdb with
> LD_LIBRARY_PATH=/gnu/store/kmblbljiygayhlc5gb02an9imhy90ws9-glibc-2.33/l
> ib to have the Guix libc.so picked up before the other one. HTH

Another alternative worth trying is the ‘--container’ option to ‘guix 
environment’, to completely isolate GDB from the foreign distro. You might 
want to add the coreutils package to the ‘--ad-hoc’ list so that you can 
get amenities such as an ls command. :-)

-- 
Thanks,
Thiago