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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to