-
Notifications
You must be signed in to change notification settings - Fork 828
libgpiod 1.6.4 Python bindings build failure #718
Copy link
Copy link
Open
Description
Hi,
When building the Python bindings for libgpiod 1.6.4, the native Python headers are used instead of the one for the target. In my case I was building on an x86-64 build host for an armv7 target. The build failed with the following error during compilation:
libtool: compile: arm-openbmc-linux-gnueabi-gcc -mfpu=vfpv3 -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../libgpiod-1.6.4/bindings/python -I../.. -I../../../libgpiod-1.6.4/include/ -Wall -Wextra -g -std=gnu89 -I/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot-native/usr/include/python3.11 -I/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot-native/usr/include/python3.11 -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/libgpiod-1.6.4=/usr/src/debug/libgpiod/1.6.4-r0 -fdebug-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/libgpiod-1.6.4=/usr/src/debug/libgpiod/1.6.4-r0 -fmacro-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/build=/usr/src/debug/libgpiod/1.6.4-r0 -fdebug-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/build=/usr/src/debug/libgpiod/1.6.4-r0 -fdebug-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot= -fmacro-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot= -fdebug-prefix-map=/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot-native= -c ../../../libgpiod-1.6.4/bindings/python/gpiodmodule.c -fPIC -DPIC -o .libs/gpiod_la-gpiodmodule.o
In file included from /yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot-native/usr/include/python3.11/Python.h:38,
from ../../../libgpiod-1.6.4/bindings/python/gpiodmodule.c:8:
/yocto/buildir/tmp/work/cortexa9hf-vfpv3-openbmc-linux-gnueabi/libgpiod/1.6.4-r0/recipe-sysroot-native/usr/include/python3.11/pyport.h:601:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
601 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| ^~~~~
Inheriting the python3targetconfig class instead of python3native fixes this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels