Re: [RFC v6 00/23] RISC-V glibc port for the 32-bit

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [RFC v6 00/23] RISC-V glibc port for the 32-bit

Alistair Francis-2
On Mon, Jan 13, 2020 at 12:44 AM Joseph Myers <[hidden email]> wrote:

>
> On Sun, 12 Jan 2020, Alistair Francis wrote:
>
> > This is a list of the tests that are currently failing when running make
> > check:
>
> Could you give more details for the FAILing tests of why they are failing?
>
> > FAIL: conform/ISO11/stdalign.h/conform
> > FAIL: conform/POSIX/sys/mman.h/conform
>
> No ports should be added where any compilation tests are failing.  You
> need to fix all the compilation tests so that build-many-glibcs.py results
> can remain clean.

Yep.

The errors I get are strange though, I'm not sure how to debug:

# cat conform/ISO11/stdalign.h/conform.out
Traceback (most recent call last):
  File "conformtest.py", line 26, in <module>
    import tempfile
  File "/usr/lib/python3.7/tempfile.py", line 45, in <module>
    from random import Random as _Random
  File "/usr/lib/python3.7/random.py", line 58, in <module>
    NV_MAGICCONST = 4 * _exp(-0.5)/_sqrt(2.0)
ValueError: math domain error

# cat conform/POSIX/sys/mman.h/conform.out
Traceback (most recent call last):
  File "conformtest.py", line 26, in <module>
    import tempfile
  File "/usr/lib/python3.7/tempfile.py", line 45, in <module>
    from random import Random as _Random
  File "/usr/lib/python3.7/random.py", line 58, in <module>
    NV_MAGICCONST = 4 * _exp(-0.5)/_sqrt(2.0)
ZeroDivisionError: float division by zero

Alistair

>
> --
> Joseph S. Myers
> [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [RFC v6 00/23] RISC-V glibc port for the 32-bit

Joseph Myers
On Tue, 14 Jan 2020, Alistair Francis wrote:

> Yep.
>
> The errors I get are strange though, I'm not sure how to debug:
>
> # cat conform/ISO11/stdalign.h/conform.out
> Traceback (most recent call last):
>   File "conformtest.py", line 26, in <module>
>     import tempfile
>   File "/usr/lib/python3.7/tempfile.py", line 45, in <module>
>     from random import Random as _Random
>   File "/usr/lib/python3.7/random.py", line 58, in <module>
>     NV_MAGICCONST = 4 * _exp(-0.5)/_sqrt(2.0)
> ValueError: math domain error

That suggests you've got a broken python installation.  If you're doing
native testing on RV32, I suggest doing cross-testing (using
cross-test-ssh.sh) instead, so that python runs on a known-good build
system, until the RV32 system is stable enough.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [RFC v6 00/23] RISC-V glibc port for the 32-bit

Alistair Francis-2
On Wed, Jan 15, 2020 at 8:08 AM Joseph Myers <[hidden email]> wrote:

>
> On Tue, 14 Jan 2020, Alistair Francis wrote:
>
> > Yep.
> >
> > The errors I get are strange though, I'm not sure how to debug:
> >
> > # cat conform/ISO11/stdalign.h/conform.out
> > Traceback (most recent call last):
> >   File "conformtest.py", line 26, in <module>
> >     import tempfile
> >   File "/usr/lib/python3.7/tempfile.py", line 45, in <module>
> >     from random import Random as _Random
> >   File "/usr/lib/python3.7/random.py", line 58, in <module>
> >     NV_MAGICCONST = 4 * _exp(-0.5)/_sqrt(2.0)
> > ValueError: math domain error
>
> That suggests you've got a broken python installation.  If you're doing
> native testing on RV32, I suggest doing cross-testing (using
> cross-test-ssh.sh) instead, so that python runs on a known-good build
> system, until the RV32 system is stable enough.

Thanks for the tip!

When running on my x86_64 machine and using this command to run the
tests on RV32:

make test-wrapper='/slow-scratch/alistair/software/glibc/scripts/cross-test-ssh.sh
--ssh "ssh -p 2222" --timeoutfactor 100 root@127.0.0.1' tests

I get this result:

FAIL: elf/check-abi-libc
Summary of test results:
      1 FAIL
   1204 PASS
     15 XFAIL

The failure for elf/check-abi-libc.out is:

--- ../sysdeps/unix/sysv/linux/riscv/libc.abilist       2020-01-14
16:27:58.805195715 -0800
+++ /slow-scratch/alistair/software/glibc/build/libc.symlist
2020-01-14 18:48:08.711608082 -0800
@@ -510 +510 @@ GLIBC_2.31 _mcount F
-GLIBC_2.31 _nl_default_dirname D 0x12
+GLIBC_2.31 _nl_default_dirname D 0x16

I have tried making this change before, but then the test case fails
when running ./scripts/build-many-glibcs.py

Any ideas why there are conflicting values for _nl_default_dirname and
which one should it be?

Also, as it seems like all the conform tests are passing when run via
cross compile can I assume the failure is related to Python and mark
it as passing?

Alistair

>
> --
> Joseph S. Myers
> [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [RFC v6 00/23] RISC-V glibc port for the 32-bit

Joseph Myers
On Wed, 15 Jan 2020, Alistair Francis wrote:

> --- ../sysdeps/unix/sysv/linux/riscv/libc.abilist       2020-01-14
> 16:27:58.805195715 -0800
> +++ /slow-scratch/alistair/software/glibc/build/libc.symlist
> 2020-01-14 18:48:08.711608082 -0800
> @@ -510 +510 @@ GLIBC_2.31 _mcount F
> -GLIBC_2.31 _nl_default_dirname D 0x12
> +GLIBC_2.31 _nl_default_dirname D 0x16

You need to use --prefix=/usr; the length of the prefix affect the ABI.

--
Joseph S. Myers
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [RFC v6 00/23] RISC-V glibc port for the 32-bit

Alistair Francis-2
On Thu, Jan 16, 2020 at 7:50 AM Joseph Myers <[hidden email]> wrote:

>
> On Wed, 15 Jan 2020, Alistair Francis wrote:
>
> > --- ../sysdeps/unix/sysv/linux/riscv/libc.abilist       2020-01-14
> > 16:27:58.805195715 -0800
> > +++ /slow-scratch/alistair/software/glibc/build/libc.symlist
> > 2020-01-14 18:48:08.711608082 -0800
> > @@ -510 +510 @@ GLIBC_2.31 _mcount F
> > -GLIBC_2.31 _nl_default_dirname D 0x12
> > +GLIBC_2.31 _nl_default_dirname D 0x16
>
> You need to use --prefix=/usr; the length of the prefix affect the ABI.

Ah, thanks.

So it looks like all the conform tests are passing :)

I'm running the full suit of tests via cross compiling with NFS mount
as well. When the 2.32 window opens up I should be ready to go.

Thanks for all of your help Joseph.

Alistair

>
> --
> Joseph S. Myers
> [hidden email]