Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950205 - dev-python/scipy-1.15.2 can't crosscompile : fatal error: pybind11/pybind11.h: No such file or directory
Summary: dev-python/scipy-1.15.2 can't crosscompile : fatal error: pybind11/pybind11.h...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-23 20:46 UTC by Arniiiii
Modified: 2025-02-24 20:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log in `xz -9` (build.log_scipy_missing_pybind11.log.xz,37.47 KB, application/x-xz)
2025-02-23 20:46 UTC, Arniiiii
Details
meson-logs.txt (file_950205.txt,152.05 KB, text/plain)
2025-02-23 20:46 UTC, Arniiiii
Details
PORTAGE_CONFIGROOT=/usr/aarch64-unknown-linux-gnueabi/ emerge --info (file_950205.txt,5.04 KB, text/plain)
2025-02-23 20:47 UTC, Arniiiii
Details
emerge --info (file_950205.txt,15.56 KB, text/plain)
2025-02-23 20:47 UTC, Arniiiii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arniiiii 2025-02-23 20:46:06 UTC
Created attachment 919778 [details]
build.log in `xz -9`

So, as attempt to get a progress with bug https://bugs.gentoo.org/950050 , I've got to this.

How:

1. Fix cross-pkg-config:
  Edit `/usr/bin/aarch64-unknown-linux-gnueabi-pkg-config` so that `PKG_CONFIG_PATH` is not `unset` : 

somewhere near line 180:
```
#
# Some distributions pollute the pkg-config environment.
# Time to pull a captain planet on them.
#
# unset PKG_CONFIG_PATH # <----------------------------- comment this line

```

2. Set PKG_CONFIG_PATH to a folder in which there's cross compiled numpy and in which numpy.pc:

PKG_CONFIG_PATH=/usr/aarch64-unknown-linux-gnueabi/usr/lib/python3.12/site-packages/numpy/_core/lib/pkgconfig/ 

3. Attempt to compile scipy in any way. My way:

`PKG_CONFIG_PATH=/usr/aarch64-unknown-linux-gnueabi/usr/lib/python3.12/site-packages/numpy/_core/lib/pkgconfig/ MAKEOPTS="-j24 -l24" FEATURES="parallel-fetch parallel-install"  aarch64-unknown-linux-gnueabi-emerge -avt -j1 -l24 dev-cpp/benchmark`

4. Get this:

```
FAILED: scipy/fft/_pocketfft/pypocketfft.cpython-312-x86_64-linux-gnu.so.p/pypocketfft.cxx.o
aarch64-unknown-linux-gnueabi-g++ -Iscipy/fft/_pocketfft/pypocketfft.cpython-312-x86_64-linux-gnu.so.p -Iscipy/fft/_pocketfft -I../scipy-1.15.2/scipy/fft/_pocketfft -I../scipy-1.15.2/scipy/_lib/pocketfft -I/usr/aarch64-unknown-linux-gnueabi/include -I/usr/aarch64-unknown-linux-gnueabi/usr/include/python3.12 -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++17 -O2 -pipe -fomit-frame-pointer -DNDEBUG -fPIC -pthread -DPOCKETFFT_PTHREADS -DPOCKETFFT_CACHE_SIZE=16 -MD -MQ scipy/fft/_pocketfft/pypocketfft.cpython-312-x86_64-linux-gnu.so.p/pypocketfft.cxx.o -MF scipy/fft/_pocketfft/pypocketfft.cpython-312-x86_64-linux-gnu.so.p/pypocketfft.cxx.o.d -o scipy/fft/_pocketfft/pypocketfft.cpython-312-x86_64-linux-gnu.so.p/pypocketfft.cxx.o -c ../scipy-1.15.2/scipy/fft/_pocketfft/pypocketfft.cxx
../scipy-1.15.2/scipy/fft/_pocketfft/pypocketfft.cxx:16:10: fatal error: pybind11/pybind11.h: No such file or directory
   16 | #include <pybind11/pybind11.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
```
Comment 1 Arniiiii 2025-02-23 20:46:40 UTC
Created attachment 919779 [details]
meson-logs.txt
Comment 2 Arniiiii 2025-02-23 20:47:11 UTC
Created attachment 919780 [details]
PORTAGE_CONFIGROOT=/usr/aarch64-unknown-linux-gnueabi/ emerge --info
Comment 3 Arniiiii 2025-02-23 20:47:37 UTC
Created attachment 919781 [details]
emerge --info
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-23 20:50:35 UTC
Is pybind11 installed either for CBUILD or CHOST?

Also, is it possible your workaround is actually causing a problem here (because it stops it finding pybind11 via usual means)?
Comment 5 Arniiiii 2025-02-23 20:53:27 UTC
(In reply to Sam James from comment #4)
> Is pybind11 installed either for CBUILD or CHOST?
> 
> Also, is it possible your workaround is actually causing a problem here
> (because it stops it finding pybind11 via usual means)?

it is installed on main system, so I guess it means on CBUILD it existed, but not at CHOST. Right now testing if installing for CHOST would fix it.
Comment 6 Arniiiii 2025-02-23 21:02:29 UTC
(In reply to Arniii from comment #5)

> Right now testing if installing for CHOST would fix it.

This fixed this point, but I still got to relocation problem like in https://bugs.gentoo.org/950050