Skip to contentSkip to conversation

New: Adding dependencies from an external tree does not work

Buildroot [email protected] 1 participant 3 messages Mar 9, 2022

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=14656

Bug ID: 14656
Summary: Adding dependencies from an external tree does not
work
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---

When a dependency is added by a Makefile in an external tree to a package present in the Buildroot tree, the dependency does not get built before the package.

Detailled description:

When having the following in an external tree:

    FOO_DEPENDENCIES += bar

FOO_FINAL_ALL_DEPENDENCIES gets updated and will contain bar (as shown by running make foo-show-depends) but this will not be reflected in the build order (as shown in make foo-show-build-order).

In the package/pkg-generic.mk file [1] there is a call to patsubst that will compute the prerequisites for foo-show-build-order.

When printing the output of pathsubst with

    echo $$(patsubst %,%-show-build-order,$$($(2)_FINAL_ALL_DEPENDENCIES))

the value is properly written out and will contain bar. However, the prerequisite is not present when printing them out with

    echo $$^

[1] https://git.buildroot.org/buildroot/tree/package/pkg-generic.mk#n996

Links:
- first mailing list post:
https://lists.buildroot.org/pipermail/buildroot/2022-February/637237.html
- second mailing list post:
https://lists.buildroot.org/pipermail/buildroot/2022-March/638117.html
- minimal example: https://gitlab.com/dopsi/mve-br2-external-dep

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

[Buildroot] [Bug 14656] Adding dependencies from an external tree does not work

https://bugs.busybox.net/show_bug.cgi?id=14656

--- Comment #1 from Simon Doppler <[email protected]> ---
Workaround: It is possible to build bar first and then building the entire system.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

[Buildroot] [Bug 14656] Adding dependencies from an external tree does not work

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=14656

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |WONTFIX

--- Comment #2 from Yann E. MORIN <[email protected]> --- Simon, All,

As I explained on the list [0], it is not possible to use a br2-external tree to modify the dependencies of a package.

[0]
https://lore.kernel.org/buildroot/20220309201030.GA23050@scaer/T/#m4bacf3a6047b2da82554d088f2afd805bef5a312

There is for now no way to achieve what you need without directly modifying the original package's .mk file.

(note: there have been a few ideas floated around in the past, but they are far from trivial to apply, if at all.)

Regards,
Yann E. MORIN.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot