Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc: python310 issues -> no ca-certificates



Hi David!

On Tue, 2023-07-18 09:35:02 +0100, David Brownlee <abs%netbsd.org@localhost> wrote:
> On Tue, 18 Jul 2023 at 09:05, Jan-Benedict Glaw <jbglaw%lug-owl.de@localhost> wrote:
> > Without expecting much of an issue there, I tried to build
> > security/ca-certificates, which in turn depends on Python3.
> >
> >   Python 3.10 is pulled in as a dependency, but fails checking for
> > floating point endianess, so I preliminarily fixed that by
> >
> >         CONFIGURE_ENV+=               ax_cv_c_float_words_bigendian=no
> >
> >   Interestingly, it breaks later on with a missing nextafter():
> >
> > gcc -pthread -shared -L. -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -O2 -O0 -D_FORTIFY_SOURCE=2 -I/usr/include -I/usr/pkg/include -I/usr/include -I/usr/pkg/include build/temp.netbsd-10.99.5-vax-3.10/usr/pkgsrc/lang/python310/work/Python-3.10.12/Modules/_ctypes/_ctypes.o build/temp.netbsd-10.99.5-vax-3.10/usr/pkgsrc/lang/python310/work/Python-3.10.12/Modules/_ctypes/callbacks.o build/temp.netbsd-10.99.5-vax-3.10/usr/pkgsrc/lang/python310/work/Python-3.10.12/Modules/_ctypes/callproc.o build/temp.netbsd-10.99.5-vax-3.10/usr/pkgsrc/lang/python310/work/Python-3.10.12/Modules/_ctypes/cfield.o build/temp.netbsd-10.99.5-vax-3.10/usr/pkgsrc/lang/python310/work/Python-3.10.12/Modules/_ctypes/stgdict.o -L. -L/usr/lib -L/usr/pkg/lib -Wl,-R/usr/X11R7/lib -lffi -o build/lib.netbsd-10.99.5-vax-3.10/_ctypes.so
> > *** WARNING: renaming "math" since importing it failed: /usr/pkgsrc/lang/python310/work/Python-3.10.12/build/lib.netbsd-10.99.5-vax-3.10/math.so: Undefined PLT symbol "nextafter" (symnum = 19)
> > *** Signal 4
> 
> nextafter(3) should be in libm - does that line work with -lm at the end?

I haven't tested, but probably it won't. In your reply, you lost that
part here:

root@:~/tests# cat x.c 
#include <math.h>
#include <stdio.h>

int
main (int argc, char *argv[])
{
        double foo = nextafter (1.23456, 2.0000001);

        printf ("nextafter() = %lf\n", foo);

        return 0;
}

root@:~/tests# gcc x.c -lm -o nextafter-test
ld: /tmp//ccKaK1vz.o: in function `main':
x.c:(.text+0x1e): undefined reference to `nextafter'
root@:~/tests# readelf --symbols /lib/libm.so |grep nextafter
root@:~/tests# 

> >   I also found that CPython 3.11 seems to have dropped support for
> > non-IEEE-754 systems. (Whatever that means: I haven't checked in
> > detail.) It seems that with 3.10, there's not too much in the way of
> > getting something to work, and if we want to keep Python (which
> > unfortunately is quite widely used these days, even for quite basic
> > stuff like formatting some x509 certs), we'd fix libm and also check
> > for newer versions.
> 
> That's... annoying with 3.11, but it should be worth getting 3.10
> working if we can (thanks for poking at it :)

So let's first see where `nextafter()` went to. And then... Let's find
out what needs to be done to somewhat "support" VAX FP.  If specific
things (rounding, signed zero, Inf etc.) don't work as per IEEE754,
but general math support works, that would probably also be a thing
for newer Python versions. I haven't yet checked if there's a whole
lot of code explicitely requiring proper IEEE FP support, or if that's
just the one thing that's tested (and thus, VAX FP would be
"unsupported" as it wouldn't pass the test suite.)

MfG, JBG

-- 

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index