Index | Thread | Search

From:
Daniel Dickman <didickman@gmail.com>
Subject:
Re: Numpy segfaults on amd64
To:
Stuart Henderson <stu@spacehopper.org>
Cc:
Stuart Cassoff <exokoide@yahoo.ca>, OpenBSD Ports <ports@openbsd.org>
Date:
Fri, 16 Jan 2026 15:03:01 -0500

Download raw body.

Thread

> On Jan 16, 2026, at 1:21 PM, Stuart Henderson <stu@spacehopper.org> wrote:
> 
>> aggressive optimizations. A quick google search leads me to believe
>> that your Core 2 Duo E8400 only goes up to SSE 4.1, so to fix I think we
>> need an older baseline when numpy is being compiled. Maybe it is using
>> SSE4.2 or AVX features which are trippping up your box.
> 
> Stuart, if you run 'make' in py-numpy on this machine, what do you get
> in the lines after 'CPU Optimization Options'? And, make sure you have
> the lang/python/3/python.port.mk tweak I just committed and what do the
> compiler lines look like?

The box where the package is built would still need to be fixed though.

Are you just looking to confirm the build time numpy detection? I think we can see what the cpu supports in the dmesg already?

Maybe you’re looking for something else though?

> 
> Even if I add
> 
> MODPY_PYBUILD_ARGS= -Csetup-args=-Dcpu-baseline=min \
>            -Csetup-args=-Dcpu-dispatch=min
> 
> it builds with these flags:
> 
> -O3 -fno-strict-aliasing -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mpopcnt -msahf -mcx16 -DHWY_WANT_SSE4 -DHWY_DISABLE_PCLMUL_AES -DNPY_HAVE_X86_V2 -DNPY_HAVE_SSE -DNPY_HAVE_SSE2 -DNPY_HAVE_SSE3 -DNPY_HAVE_SSSE3 -DNPY_HAVE_SSE41 -DNPY_HAVE_SSE42 -DNPY_HAVE_POPCNT -DNPY_HAVE_LAHF -DNPY_HAVE_CX16 -O2 -pipe -g -fPIC
> 
> which isn't what we want.

Maybe easiest is to just disable optimizations on amd64 the same as we do on i386?

I suspect that will fix things on this box but would be good to confirm.

>