Bug 14145 - pylibmount PACKAGECONFIG in util-linux causes circular dependency
Summary: pylibmount PACKAGECONFIG in util-linux causes circular dependency
Status: RESOLVED OBSOLETE
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 5.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-12-07 20:39 UTC by Diego
Modified: 2026-04-30 15:23 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego 2020-12-07 20:39:39 UTC
Enabling the pylibmount of PACKAGECONFIG in util-linux causes a circular dependency:
- python3 depends on util-linux:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/python/python3_3.8.5.bb?h=gatesgarth#n73
- while util-linux with pylibmount enabled depends on python3:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/util-linux/util-linux_2.36.bb?h=gatesgarth#n139


The build fails with:
========
ERROR: 216 unbuildable tasks were found.###################################                                                                  | ETA:  0:00:00
These are usually caused by circular dependencies and any circular dependency chains found will be printed below. Increase the debug level to see a list of unbuildable tasks.

Identifying dependency loops (this may take a short while)...

ERROR:
Dependency loop #1 found:
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-core/util-linux/util-linux_2.36.bb:do_compile (dependent Tasks ['util-linux_2.36.bb:do_configure'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-core/util-linux/util-linux_2.36.bb:do_install (dependent Tasks ['util-linux_2.36.bb:do_compile'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-core/util-linux/util-linux_2.36.bb:do_populate_sysroot (dependent Tasks ['util-linux_2.36.bb:do_install'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-devtools/python/python3_3.8.5.bb:do_prepare_recipe_sysroot (dependent Tasks ['util-linux_2.36.bb:do_populate_sysroot', 'gnu-config_git.bb:do_populate_sysroot', 'autoconf_2.69.bb:do_populate_sysroot', 'automake_1.16.2.bb:do_populate_sysroot', 'readline_8.0.bb:do_populate_sysroot', 'zlib_1.2.11.bb:do_populate_sysroot', 'gdbm_1.18.1.bb:do_populate_sysroot', 'xz_5.2.5.bb:do_populate_sysroot', 'bzip2_1.0.8.bb:do_populate_sysroot', 'openssl_1.1.1g.bb:do_populate_sysroot', 'pkgconfig_git.bb:do_populate_sysroot', 'libffi_3.3.bb:do_populate_sysroot', 'libtool-native_2.4.6.bb:do_populate_sysroot', 'python3_3.8.5.bb:do_fetch', 'libnsl2_git.bb:do_populate_sysroot', 'sqlite3_3.33.0.bb:do_populate_sysroot', 'libtirpc_1.2.6.bb:do_populate_sysroot'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-devtools/python/python3_3.8.5.bb:do_configure (dependent Tasks ['python3_3.8.5.bb:do_prepare_recipe_sysroot', 'python3_3.8.5.bb:do_deploy_source_date_epoch', 'python3_3.8.5.bb:do_patch'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-devtools/python/python3_3.8.5.bb:do_compile (dependent Tasks ['python3_3.8.5.bb:do_configure'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-devtools/python/python3_3.8.5.bb:do_install (dependent Tasks ['python3_3.8.5.bb:do_compile'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-devtools/python/python3_3.8.5.bb:do_populate_sysroot (dependent Tasks ['python3_3.8.5.bb:do_install'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-core/util-linux/util-linux_2.36.bb:do_prepare_recipe_sysroot (dependent Tasks ['gnu-config_git.bb:do_populate_sysroot', 'util-linux_2.36.bb:do_fetch', 'autoconf_2.69.bb:do_populate_sysroot', 'automake_1.16.2.bb:do_populate_sysroot', 'gettext-minimal-native_0.21.bb:do_populate_sysroot', 'zlib_1.2.11.bb:do_populate_sysroot', 'libpcre2_10.35.bb:do_populate_sysroot', 'ncurses_6.2.bb:do_populate_sysroot', 'pkgconfig_git.bb:do_populate_sysroot', 'libtool-native_2.4.6.bb:do_populate_sysroot', 'python3_3.8.5.bb:do_populate_sysroot', 'libcap-ng_0.7.11.bb:do_populate_sysroot'])
  Task virtual:native:/opt/yocto/sources/poky/meta/recipes-core/util-linux/util-linux_2.36.bb:do_configure (dependent Tasks ['util-linux_2.36.bb:do_patch', 'util-linux_2.36.bb:do_deploy_source_date_epoch', 'util-linux_2.36.bb:do_prepare_recipe_sysroot'])


ERROR: Command execution failed: 1

Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
========
Comment 1 Randy MacLeod 2020-12-10 15:45:48 UTC
There are other circular dependency problems with util-linux as well (around libuuid) so the solution may involved similar work-arounds.
Comment 2 Randy MacLeod 2021-04-22 18:35:57 UTC
Diego,
There were changes made to util-linux:
  https://git.openembedded.org/openembedded-core/commit/?id=65efd76198ad805060fe28714765cd423fa748dc

https://git.openembedded.org/openembedded-core/commit/?id=5f204796e73f37ee67d0a86512ce3ab6f19f9ed0

Would you be able to make a similar change for pylibmount and send a patch?
If you can work on this, you might consider sending an email to the oe-core list explaining the need and getting agreement on splitting the component out before putting the work in on changing the recipe and testing it. Of course if it's not much work, just send the patch. -- Randy
Comment 3 Diego 2021-04-27 15:07:30 UTC
(In reply to comment #2)
> Diego,
> There were changes made to util-linux:
>  
> https://git.openembedded.org/openembedded-core/commit/
> ?id=65efd76198ad805060fe28714765cd423fa748dc
> 
> https://git.openembedded.org/openembedded-core/commit/
> ?id=5f204796e73f37ee67d0a86512ce3ab6f19f9ed0
> 
> Would you be able to make a similar change for pylibmount and send a patch?
> If you can work on this, you might consider sending an email to the oe-core
> list explaining the need and getting agreement on splitting the component
> out before putting the work in on changing the recipe and testing it. Of
> course if it's not much work, just send the patch. -- Randy

Hi Randy,

thanks for the guidance. I will do my best to work on this, but it may take me some time.
Comment 4 Randy MacLeod 2022-04-11 22:10:52 UTC
Diego, any news? Moving to 3.6
Comment 5 Diego 2022-04-12 11:07:35 UTC
I'm sorry, no news. Time is always too few.
Comment 6 Louis Rannou 2023-06-28 12:11:23 UTC
Since util-linux-uuid has been splited out, I don't see any circular dependency.

However, util-linux won't always build because it gets the python version from the host instead of the native toolchain's.
Comment 7 Louis Rannou 2023-06-28 14:30:56 UTC
I found that we may require to inherit python3targetconfig.

Still, because most of libraries are going into /lib , the python packages also go there. I don't think there is a way to use autoconf to specify the lib directory only for the python packages.

Therefore, we may find more intersting to also split out the pylibmount subpackage as it was done for util-linux-uuid
Comment 8 Randy MacLeod 2023-10-30 15:37:29 UTC
Build move to 5.0 -- ../Randy
Comment 9 Randy MacLeod 2024-04-25 01:13:56 UTC
Bulk move of 5.0 medium importance issues to 5.99.
Move to 5.1 if you want to actively work on an issue.
Comment 10 Randy MacLeod 2024-04-25 01:23:15 UTC
Move to 5.99 since no one is actively working on this issue.
Move to 5.x if you start on a task, please.
Comment 11 Mathieu Dubois-Briand 2026-04-30 15:23:43 UTC
We have no plan to do it, should be reopened if the issue it still there.