Re: [yocto] Remove Python dependency from target package only
On Tue, 2024-01-23 at 21:58 +, Sebert, Holger.ext wrote: > Hi Quentin, > > > Von: Quentin Schulz > > > What does > > bitbake-getvar -r libxml2-native PACKAGECONFIG > > and > > bitbake-getvar -r libxml2 PACKAGECONFIG > > > > return? > > Here is the output of the respective commands: > > $ bitbake-getvar -r libxml2-native PACKAGECONFIG > # > # $PACKAGECONFIG [6 operations] > # :append[pn-qemu-system-native] > /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:251 > # " sdl" > # :remove[class-target:pn-libxml2] > /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:292 > # "python" > # set > /home/hosebert.ext/data/poky-python-getvar/meta/conf/documentation.conf:320 > # [doc] "This variable provides a means of enabling or disabling features > of a recipe on a per-recipe basis." > # set > /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:32 > # [_defaultval] "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', > d)} " > # set > /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:33 > # [python] "--with-python=${PYTHON},--without-python,python3" > # set > /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:34 > # [ipv6] "--enable-ipv6,--disable-ipv6," > # pre-expansion value: > # "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} " > PACKAGECONFIG="python ipv6 " > > $ bitbake-getvar -r libxml2 PACKAGECONFIG > # > # $PACKAGECONFIG [6 operations] > # :append[pn-qemu-system-native] > /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:251 > # " sdl" > # :remove[class-target:pn-libxml2] > /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:292 > # "python" > # set > /home/hosebert.ext/data/poky-python-getvar/meta/conf/documentation.conf:320 > # [doc] "This variable provides a means of enabling or disabling features > of a recipe on a per-recipe basis." > # set > /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:32 > # [_defaultval] "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', > d)} " > # set > /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:33 > # [python] "--with-python=${PYTHON},--without-python,python3" > # set > /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:34 > # [ipv6] "--enable-ipv6,--disable-ipv6," > # pre-expansion value: > # "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} " > PACKAGECONFIG=" ipv6 " > > So ... PACKAGECONFIG seems o.k. Notice, however, that the value of the PYTHON > variable is incorrect: > > $ bitbake-getvar -r libxml2-native PYTHON > # > # $PYTHON > # set /home/hosebert.ext/data/poky-python-getvar/meta/conf/bitbake.conf:575 > # "${@sys.executable}" > PYTHON="/usr/bin/python3" > > It points to the host's Python installation and not the one in Yocto! I suspect this is related to: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15361 and there is an explanation of what is happening there. I'm not entirely happy about the behaviour of class- overrides and inherit_defer but I'm not sure what to do about it. Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62249): https://lists.yoctoproject.org/g/yocto/message/62249 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Remove Python dependency from target package only
Hi Quentin, Von: Quentin Schulz > What does > bitbake-getvar -r libxml2-native PACKAGECONFIG > and > bitbake-getvar -r libxml2 PACKAGECONFIG > > return? Here is the output of the respective commands: $ bitbake-getvar -r libxml2-native PACKAGECONFIG # # $PACKAGECONFIG [6 operations] # :append[pn-qemu-system-native] /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:251 # " sdl" # :remove[class-target:pn-libxml2] /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:292 # "python" # set /home/hosebert.ext/data/poky-python-getvar/meta/conf/documentation.conf:320 # [doc] "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis." # set /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:32 # [_defaultval] "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} " # set /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:33 # [python] "--with-python=${PYTHON},--without-python,python3" # set /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:34 # [ipv6] "--enable-ipv6,--disable-ipv6," # pre-expansion value: # "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} " PACKAGECONFIG="python ipv6 " $ bitbake-getvar -r libxml2 PACKAGECONFIG # # $PACKAGECONFIG [6 operations] # :append[pn-qemu-system-native] /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:251 # " sdl" # :remove[class-target:pn-libxml2] /home/hosebert.ext/data/poky-python-getvar/build/conf/local.conf:292 # "python" # set /home/hosebert.ext/data/poky-python-getvar/meta/conf/documentation.conf:320 # [doc] "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis." # set /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:32 # [_defaultval] "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} " # set /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:33 # [python] "--with-python=${PYTHON},--without-python,python3" # set /home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:34 # [ipv6] "--enable-ipv6,--disable-ipv6," # pre-expansion value: # "python ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} " PACKAGECONFIG=" ipv6 " So ... PACKAGECONFIG seems o.k. Notice, however, that the value of the PYTHON variable is incorrect: $ bitbake-getvar -r libxml2-native PYTHON # # $PYTHON # set /home/hosebert.ext/data/poky-python-getvar/meta/conf/bitbake.conf:575 # "${@sys.executable}" PYTHON="/usr/bin/python3" It points to the host's Python installation and not the one in Yocto! Best, Holger -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62248): https://lists.yoctoproject.org/g/yocto/message/62248 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Remove Python dependency from target package only
I would suggest not trying to figure out PACKAGECONFIGs just yet, but rather go to the source of the error: inspect ${T}/log.do_configure and ${T}/run.do_configure. Are options to enable/disable python passed in? If yes, then something in PACKAGECONFIG settings doesn't quite work. If no, then libxml somehow needs python at build time even without those options, and this should be looked at separately by checking in libxml source code what the failing check for python actually does, and is it guarded by any options. Alex On Mon, 22 Jan 2024 at 14:40, Quentin Schulz via lists.yoctoproject.org wrote: > > Hi Holger, > > On 1/22/24 14:33, Sebert, Holger.ext via lists.yoctoproject.org wrote: > > [You don't often get email from > > holger.sebert.ext=karlstorz@lists.yoctoproject.org. Learn why this is > > important at https://aka.ms/LearnAboutSenderIdentification ] > > > > Hi Richard, > > > > Von: Richard Purdie > >> Try: > >> > >> PACKAGECONFIG:remove:class-target:pn-libxml2 = "python" > >> > > > > Tried it, but same error appears (“Python not found” in libxml2-native). > > > > What does > bitbake-getvar -r libxml2-native PACKAGECONFIG > and > bitbake-getvar -r libxml2 PACKAGECONFIG > > return? > > I'm not entirely sure if the former will work since bitbake-getvar > expects a recipe and libxml2 isn't really a recipe on its own. > > If the former doesn't work, we need to check for > PACKAGECONFIG:class-native and PACKAGECONFIG:class-target in > bitbake-getvar -r libxml2 PACKAGECONFIG to debug this further. > > Cheers, > Quentin > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62221): https://lists.yoctoproject.org/g/yocto/message/62221 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Remove Python dependency from target package only
Hi Holger, On 1/22/24 14:33, Sebert, Holger.ext via lists.yoctoproject.org wrote: [You don't often get email from holger.sebert.ext=karlstorz@lists.yoctoproject.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi Richard, Von: Richard Purdie Try: PACKAGECONFIG:remove:class-target:pn-libxml2 = "python" Tried it, but same error appears (“Python not found” in libxml2-native). What does bitbake-getvar -r libxml2-native PACKAGECONFIG and bitbake-getvar -r libxml2 PACKAGECONFIG return? I'm not entirely sure if the former will work since bitbake-getvar expects a recipe and libxml2 isn't really a recipe on its own. If the former doesn't work, we need to check for PACKAGECONFIG:class-native and PACKAGECONFIG:class-target in bitbake-getvar -r libxml2 PACKAGECONFIG to debug this further. Cheers, Quentin -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62220): https://lists.yoctoproject.org/g/yocto/message/62220 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Remove Python dependency from target package only
Hi Richard, Von: Richard Purdie > Try: > > PACKAGECONFIG:remove:class-target:pn-libxml2 = "python" > Tried it, but same error appears (“Python not found” in libxml2-native). -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62219): https://lists.yoctoproject.org/g/yocto/message/62219 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [yocto] Remove Python dependency from target package only
On Sun, 2024-01-21 at 18:57 +, Sebert, Holger.ext wrote: > Hi, > > I am trying to remove the Python dependency in libxml2 for the target. > For the libxml2-native package it shall still be available, however. > > I have put this into my local.conf: > > PACKAGECONFIG:remove:pn-libxml2 = "python" Try: PACKAGECONFIG:remove:class-target:pn-libxml2 = "python" Cheers, Richard -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62215): https://lists.yoctoproject.org/g/yocto/message/62215 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[yocto] Remove Python dependency from target package only
Hi, I am trying to remove the Python dependency in libxml2 for the target. For the libxml2-native package it shall still be available, however. I have put this into my local.conf: PACKAGECONFIG:remove:pn-libxml2 = "python" When I build core-image-full-cmdline I get the following error from the libxml2-native package: | configure: error: Package requirements (python-3.8) were not met: | | No package 'python-3.8' found | | Consider adjusting the PKG_CONFIG_PATH environment variable if you | installed software in a non-standard prefix. | | Alternatively, you may set the environment variables PYTHON_CFLAGS | and PYTHON_LIBS to avoid the need to call pkg-config. | See the pkg-config man page for more details. | NOTE: The following config.log files may provide further information. | NOTE: /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/build/config.log | ERROR: configure failed | WARNING: /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/temp/run.do_configure.453112:287 exit 1 from 'exit 1' | WARNING: Backtrace (BB generated script): | #1: bbfatal_log, /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/temp/run.do_configure.453112, line 287 | #2: oe_runconf, /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/temp/run.do_configure.453112, line 263 | #3: autotools_do_configure, /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/temp/run.do_configure.453112, line 233 | #4: do_configure, /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/temp/run.do_configure.453112, line 153 | #5: main, /home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/temp/run.do_configure.453112, line 291 ERROR: Task (virtual:native:/home/hosebert.ext/data/poky-python-getvar/meta/recipes-core/libxml/libxml2_2.11.5.bb:do_configure) failed with exit code '1' So it seems libxml2-native cannot find Python anymore! When investigating the problem, I found the following using bitbake-getvar: $ bitbake-getvar -r libxml2-native PYTHON # # $PYTHON # set /home/hosebert.ext/data/poky-python-getvar/meta/conf/bitbake.conf:575 # "${@sys.executable}" PYTHON="/usr/bin/python3" So libxml2-native is trying to use my host's Python installation and not the one in build/tmp/work/x86_64-linux/libxml2-native/2.11.5/recipe-sysroot-native/usr/bin/python3-native/python3 as it should be? On a pristine Poky system bitbake-getvar gives the following: $ bitbake-getvar -r libxml2-native PYTHON # # $PYTHON [3 operations] # set /home/hosebert.ext/data/poky-python-getvar/meta/conf/bitbake.conf:575 # "${@sys.executable}" # set /home/hosebert.ext/data/poky-python-getvar/meta/classes-recipe/python3native.bbclass:9 # "${STAGING_BINDIR_NATIVE}/python3-native/python3" # exported ast.py:52 [eval] # [export] "1" # pre-expansion value: # "${STAGING_BINDIR_NATIVE}/python3-native/python3" export PYTHON="/home/hosebert.ext/data/poky-python-getvar/build/tmp/work/x86_64-linux/libxml2-native/2.11.5/recipe-sysroot-native/usr/bin/python3-native/python3" So, what is the proper way of removing Python from a target package? Best, Holger -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#62214): https://lists.yoctoproject.org/g/yocto/message/62214 Mute This Topic: https://lists.yoctoproject.org/mt/103871920/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-