pkgsrc-Users archive

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

Re: NumPy build on older processor X86_V2 glitch



Jim Spath <jspath55%gmail.com@localhost> writes:

> I have been building QGIS 3 on older machines I have, to check out the
> range of PostgreSQL database support. On one Intel machine, I get
> errors on py-numpy, so the dependency py-gdal won't build. Running a
> QGIS version built on an AMD says the processor is missing X86_V2:
>
> RuntimeError: NumPy was built with baseline optimizations: (X86_V2)
> but your machine doesn't support:(X86_V2).
> Python version: 3.13.12 (main, Jun 1 2026, 09:01:00) [GCC 12.5.0]
> QGIS version: 3.44.11-Solothurn 'Solothurn', exported


IMHO you are running into a bug either in numpy or pkgsrc, depending on
opinions.

pkgsrc's declared policy is that we build for the logical host, which is
what the base OS says is supported.  For NetBSD/i386 that's "i486", and
for NetBSD/amd64 that's the base x86_64 definition.  That's why NetBSD
and most things work on your ancient Core 2 Duo, which I acknowledge was
really cool in 2006.

Some programs think it's ok to do CPU detection at compile time and
build for that CPU.  As a default, that's simply wrong (it's fine to
ahve an option for those who want more efficient non-portable binaries).
A number of programs do runtime detection (I think openssl on arm is
like this).


I'm unclear on what X86_V[234] mean exactly; I think it's groups of cpu
feature flags that are semantically not so different from
i386/486/586/686 generations.

It seems like numpy has two bugs:
  uses compile-time detection at all
  perceives features that are not there


I have an i7-9700 with AVX and AVX2 but not AVX512_ICL.

On a i7-12700K I can get at, cpuctl says AVX, AVX2, and AVXVNNI, but not
AVX512_ICL.

I would suggest reading numpy's configure tests.



Home | Main Index | Thread Index | Old Index