On Thu, 4 May 2023 at 11:00, Alexander Kanavin <alex.kana...@gmail.com>
wrote:

> On Thu, 4 May 2023 at 10:41, Peter Bergin <pe...@berginkonsult.se> wrote:
>
> > At
> >
> https://github.com/pyca/cryptography/blob/f816b457494e010b655cd7fdcd30e3446f86a703/src/rust/build.rs#L46
> > the path to python includes is defined by calling 'python3 -c "import
> > sysconfig; print(sysconfig.get_path('include'))"' (but from inside
> > rust). With print-debugging this seems to return the bad string
> > '/usr/include/python3.11' which is then passed to cc::Build
> >
> > I executed this in recipe context:
> >
> > do_compile:prepend() {
> >      which python3
> >      python3 -c "import sysconfig; print(sysconfig.get_path('include'))"
> > }
> >
> > and then I got the correct return value:
> >
> > |
> >
> /work/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-cryptography/40.0.2-r0/recipe-sysroot-native/usr/bin/python3-native/python3
> > |
> >
> /work/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-cryptography/40.0.2-r0/recipe-sysroot-native/usr/include/python3.11
>
> This is pointing to the native sysroot in a target build, so it is
> most likely not actually correct. I believe 'inherit
> python3targetconfig' may help, as it substitutes most places where
> native python gets queried by components with target-specific values.
>
> Alex
>

Unless I'm mistaken , in the error message we can see that the compiler
specified the sysroot correctly (recipe-sysroot and recipe-sysroot-native)
and so the path /usr/include/python3.11 is correct under this sysroot
(Python.h lies there).

I would like to have a verbose output which show the compiler command args
for python3-cryptography 39.0.2 to compare
the compiler arguments but I didn't manage to do it for now (tried to put a
config.toml in src/rust/.cargo with term.verbose=true).
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180858): 
https://lists.openembedded.org/g/openembedded-core/message/180858
Mute This Topic: https://lists.openembedded.org/mt/98667212/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to