tech-pkg archive

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

Re: Undebuggable meson vs numpy



On Fri, Jul 25, 2025 at 12:42:25PM +0100, Jonathan Perkin wrote:
> math/py-numpy has been broken on macOS for ages.  I had hoped a recent
> compiler upgrade would resolve it but no luck.  I tried to take a look to
> see what the actual problem is, but something is removing the build logs
> before I can look at them.
> 
> For example, from:
> 
>   https://reports.pkgci.org/Darwin/14.5/arm64/20250724.1420/py312-numpy-2.3.1/build.log
> 
> you can see there is a ".mesonpy-m8g6tta5" temporary directory, but as soon
> as the build fails it is completely removed, along with the meson-log.txt
> file that will contain the hidden errors.
> 
> This is obviously about as unhelpful as a build system can possibly be.
> 
> I'm assuming that this isn't something that upstream are deliberately doing,
> so I'm wondering if this is something we have accidentally enabled
> somewhere?  I cannot imagine anyone would have configured this on purpose.
> 
> Hopefully someone has an idea to avoid me wasting hours delving into this.

I think this is upstream default behaviour.
The code you're looking at can be found in
work/numpy-2.3.2/numpy/_core/meson.build
as:

foreach symbol_type: complex_types_to_check
  if not cc.has_type(symbol_type[1], prefix: '#include <complex.h>')
    t = symbol_type[1]
    error(f'"complex.h" header does not include complex type @t@')
  endif
  cdata.set(symbol_type[0], cc.sizeof(symbol_type[1], prefix: '#include <complex.h>'))
endforeach

It uses the compiler object, so you can find documentation about this here:

https://mesonbuild.com/Reference-manual_returned_compiler.html

Attached is a small meson file that reproduces the test.

mkdir test
cd test
cp .../meson.build .
mkdir build
meson ..

Hope this helps,
 Thomas


Home | Main Index | Thread Index | Old Index