Skip to content

python-yaml: bump to version 6.0#17142

Merged
commodo merged 1 commit intoopenwrt:masterfrom
commodo:python-yaml
Nov 22, 2021
Merged

python-yaml: bump to version 6.0#17142
commodo merged 1 commit intoopenwrt:masterfrom
commodo:python-yaml

Conversation

@commodo
Copy link
Copy Markdown
Contributor

@commodo commodo commented Nov 17, 2021

Maintainer: @BKPepe
Compile tested: x86 https://github.com/openwrt/commit/49f615022c921189ff4566b8b2bfdbf97a2a8787
Run tested: n/a


Signed-off-by: Alexandru Ardelean ardeleanalex@gmail.com

@commodo
Copy link
Copy Markdown
Contributor Author

commodo commented Nov 17, 2021

I'm surprised about the build failure here:

 building 'yaml._yaml' extension
arm-openwrt-linux-muslgnueabi-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/home/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/Python-3.9.7=Python-3.9.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/home/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/Python-3.9.7=Python-3.9.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/home/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/Python-3.9.7=Python-3.9.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -I/home/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/usr/include -I/home/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/include/fortify -I/home/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -ffile-prefix-map=/home/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/pypi/PyYAML-6.0=PyYAML-6.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/usr/include -I/home/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/include/fortify -I/home/build/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-11.2.0_musl_eabi/include -I/home/build/openwrt/staging_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/usr/include/python3.9 -fPIC -I/home/build/openwrt/staging_dir/hostpkg/include/python3.9 -c yaml/_yaml.c -o build/temp.linux-arm-3.9/yaml/_yaml.o
cc1: fatal error: yaml/_yaml.c: No such file or directory
compilation terminated.

I think I tried with Python 3.10 and it worked.
Will try with 3.9.7 locally.

@commodo
Copy link
Copy Markdown
Contributor Author

commodo commented Nov 17, 2021

i confirmed: this builds with Python 3.10 and fails with 3.9;

so, I think we wait for the Python 3.10 update on this;

@jefferyto
Copy link
Copy Markdown
Member

The previous version included a pre-generated _yaml.c file in the release tarball, the current version does not. If you add

HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython

it should work.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
@commodo
Copy link
Copy Markdown
Contributor Author

commodo commented Nov 21, 2021

Changelog v1 -> v2:

  • added HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=Cython

@commodo commodo merged commit c8644bd into openwrt:master Nov 22, 2021
@commodo commodo deleted the python-yaml branch November 22, 2021 08:29
@egorenar
Copy link
Copy Markdown
Contributor

egorenar commented Nov 23, 2021

Having issues with python3-yaml after this update with ARMv7:

/usr/lib/libpython3.10.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status

It seems that the host's /usr/lib is being used:

arm-openwrt-linux-muslgnueabi-gcc -shared ... -L/usr/lib -lyaml -o build/lib.linux-arm-3.10/yaml/_yaml.cpython-310.so

My build host has Python 3.10 installed.

@commodo
Copy link
Copy Markdown
Contributor Author

commodo commented Nov 23, 2021

ack
will fix

@john-tho
Copy link
Copy Markdown
Contributor

Did we ever get around to reproducing and fixing that host library linked error?
I may have run into it also. Arch Linux build host. arm cortex a7 target.
Last 15 lines of python-yaml compile log:

cythoning yaml/_yaml.pyx to yaml/_yaml.c
/mnt/pool_ssd/code/openwrt/staging_dir/hostpkg/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pypi/PyYAML-6.0/yaml/_yaml.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)
building 'yaml._yaml' extension
creating build/temp.linux-arm-3.10
creating build/temp.linux-arm-3.10/yaml
arm-openwrt-linux-muslgnueabi-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.10.5=Python-3.10.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.10.5=Python-3.10.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.10.5=Python-3.10.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/usr/include -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/include/fortify -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pypi/PyYAML-6.0=PyYAML-6.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/usr/include -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/include/fortify -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/include -I/mnt/pool_ssd/code/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/usr/include/python3.10 -fPIC -I/mnt/pool_ssd/code/openwrt/staging_dir/hostpkg/include/python3.10 -c yaml/_yaml.c -o build/temp.linux-arm-3.10/yaml/_yaml.o
cc1: note: someone does not honour COPTS correctly, passed 4 times
arm-openwrt-linux-muslgnueabi-gcc -shared -L/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/usr/lib -L/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/lib -znow -zrelro -lpython3.10 -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=hard -fmacro-prefix-map=/mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pypi/PyYAML-6.0=PyYAML-6.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/usr/include -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/include/fortify -I/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/include -I/mnt/pool_ssd/code/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/usr/include/python3.10 build/temp.linux-arm-3.10/yaml/_yaml.o -L/usr/lib -lyaml -o build/lib.linux-arm-3.10/yaml/_yaml.cpython-310.so
/usr/lib/libpython3.10.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
error: command '/mnt/pool_ssd/code/openwrt/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-11.3.0_musl_eabi/bin/arm-openwrt-linux-muslgnueabi-gcc' failed with exit code 1
make[2]: *** [Makefile:50: /mnt/pool_ssd/code/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/pypi/PyYAML-6.0/.built] Error 1
make[2]: Leaving directory '/mnt/pool_ssd/code/openwrt/feeds/packages/lang/python/python-yaml'
time: package/feeds/packages/python-yaml/compile#4.73#0.31#5.00
./scripts/diffconfig.sh | grep yaml
CONFIG_PACKAGE_libyaml=y
CONFIG_PACKAGE_python3-yaml=y

@commodo
Copy link
Copy Markdown
Contributor Author

commodo commented Nov 14, 2023

A bit late.
But this looks like it's no longer happening on master.

Probably fixed with #22551 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants