All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
@ 2020-01-24  7:37 Heiko Thiery
  2020-01-24  8:21 ` Heiko Thiery
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Heiko Thiery @ 2020-01-24  7:37 UTC (permalink / raw)
  To: buildroot

Hi,

I have a custom package (MYPACKAGE) in my BR2_EXTERNAL. This package
uses the "$(eval $(kernel-module))". In addition this package also
adds a kernel patch hook via BR2_EXTERNAL/linux-ext-MYPACKAGE.mk.

As far as I see MYPACKAGE depends on linux (due to kernel-module) and
LINUX depends on MYPACKAGE due to the dependency created to
LINUX_PATCH_DEPENDENCIES.

----
# make linux-legal-info
linux/linux.mk:578: *** Recursive variable
'LINUX_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
Stop.
make: *** [Makefile:23: _all] Error 2
----

Is having a package that does both (linux kernel module and kernel
patching) allowed? Can this be fixed? I think linux only need the
dependency to the MYPACKAGE_EXTRACT because the patch is not a result
of the build of this package.

What do you think?

BR
--
Heiko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
  2020-01-24  7:37 [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES Heiko Thiery
@ 2020-01-24  8:21 ` Heiko Thiery
  2020-01-24  8:39   ` Michael Walle
  2020-01-26  7:50 ` Yann E. MORIN
  2020-01-26  9:21 ` Yann E. MORIN
  2 siblings, 1 reply; 7+ messages in thread
From: Heiko Thiery @ 2020-01-24  8:21 UTC (permalink / raw)
  To: buildroot

Hi,

Am Fr., 24. Jan. 2020 um 08:37 Uhr schrieb Heiko Thiery
<heiko.thiery@gmail.com>:
>
> Hi,
>
> I have a custom package (MYPACKAGE) in my BR2_EXTERNAL. This package
> uses the "$(eval $(kernel-module))". In addition this package also
> adds a kernel patch hook via BR2_EXTERNAL/linux-ext-MYPACKAGE.mk.
>
> As far as I see MYPACKAGE depends on linux (due to kernel-module) and
> LINUX depends on MYPACKAGE due to the dependency created to
> LINUX_PATCH_DEPENDENCIES.

Forgot to mention that the build works and the issue only occurs when
"make legal-info" and "make graphs" are executed.

> ----
> # make linux-legal-info
> linux/linux.mk:578: *** Recursive variable
> 'LINUX_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
> Stop.
> make: *** [Makefile:23: _all] Error 2
> ----
>
> Is having a package that does both (linux kernel module and kernel
> patching) allowed? Can this be fixed? I think linux only need the
> dependency to the MYPACKAGE_EXTRACT because the patch is not a result
> of the build of this package.
>
> What do you think?
>
> BR
> --
> Heiko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
  2020-01-24  8:21 ` Heiko Thiery
@ 2020-01-24  8:39   ` Michael Walle
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Walle @ 2020-01-24  8:39 UTC (permalink / raw)
  To: buildroot

Am 2020-01-24 09:21, schrieb Heiko Thiery:
> Hi,
> 
> Am Fr., 24. Jan. 2020 um 08:37 Uhr schrieb Heiko Thiery
> <heiko.thiery@gmail.com>:
>> 
>> Hi,
>> 
>> I have a custom package (MYPACKAGE) in my BR2_EXTERNAL. This package
>> uses the "$(eval $(kernel-module))". In addition this package also
>> adds a kernel patch hook via BR2_EXTERNAL/linux-ext-MYPACKAGE.mk.
>> 
>> As far as I see MYPACKAGE depends on linux (due to kernel-module) and
>> LINUX depends on MYPACKAGE due to the dependency created to
>> LINUX_PATCH_DEPENDENCIES.
> 
> Forgot to mention that the build works and the issue only occurs when
> "make legal-info" and "make graphs" are executed.

or even easier, "make print-vars"

-michael

> 
>> ----
>> # make linux-legal-info
>> linux/linux.mk:578: *** Recursive variable
>> 'LINUX_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
>> Stop.
>> make: *** [Makefile:23: _all] Error 2
>> ----
>> 
>> Is having a package that does both (linux kernel module and kernel
>> patching) allowed? Can this be fixed? I think linux only need the
>> dependency to the MYPACKAGE_EXTRACT because the patch is not a result
>> of the build of this package.
>> 
>> What do you think?
>> 
>> BR
>> --
>> Heiko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
  2020-01-24  7:37 [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES Heiko Thiery
  2020-01-24  8:21 ` Heiko Thiery
@ 2020-01-26  7:50 ` Yann E. MORIN
  2020-01-26  7:56   ` Heiko Thiery
  2020-01-26  8:01   ` Heiko Thiery
  2020-01-26  9:21 ` Yann E. MORIN
  2 siblings, 2 replies; 7+ messages in thread
From: Yann E. MORIN @ 2020-01-26  7:50 UTC (permalink / raw)
  To: buildroot

Heiko, All,

On 2020-01-24 08:37 +0100, Heiko Thiery spake thusly:
> I have a custom package (MYPACKAGE) in my BR2_EXTERNAL. This package
> uses the "$(eval $(kernel-module))". In addition this package also
> adds a kernel patch hook via BR2_EXTERNAL/linux-ext-MYPACKAGE.mk.
> 
> As far as I see MYPACKAGE depends on linux (due to kernel-module) and
> LINUX depends on MYPACKAGE due to the dependency created to
> LINUX_PATCH_DEPENDENCIES.
> 
> ----
> # make linux-legal-info
> linux/linux.mk:578: *** Recursive variable
> 'LINUX_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
> Stop.
> make: *** [Makefile:23: _all] Error 2
> ----
> 
> Is having a package that does both (linux kernel module and kernel
> patching) allowed?

The linux-extensions are only _PATCH_DEPENDENCIES, that is the packages
providing the extensions shall be extracted and patched before linux is
patched.

So, as far as a build is concerned, this does not cause a circular
dependency.

However, as you noticed later, this does generate a circular dependency,
like gathering the elgal-info.

> Can this be fixed?

No, that 'can't be, I'm afraid... :-/

> I think linux only need the
> dependency to the MYPACKAGE_EXTRACT because the patch is not a result
> of the build of this package.

This is already the case, see above.

> What do you think?

As a short-term solution, just provide towo packages: one that provides
the extension, one that provides the kernel module.

However, if your package provides a kernel patch, why does it not patch
the kernel with your new module to begin with, and have the module built
as part of the kernel build? After all, that's the whole point of linux
extensions: inject new code in the kernel build process.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
  2020-01-26  7:50 ` Yann E. MORIN
@ 2020-01-26  7:56   ` Heiko Thiery
  2020-01-26  8:01   ` Heiko Thiery
  1 sibling, 0 replies; 7+ messages in thread
From: Heiko Thiery @ 2020-01-26  7:56 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Am So., 26. Jan. 2020 um 08:50 Uhr schrieb Yann E. MORIN
<yann.morin.1998@free.fr>:
>
> Heiko, All,
>
> On 2020-01-24 08:37 +0100, Heiko Thiery spake thusly:
> > I have a custom package (MYPACKAGE) in my BR2_EXTERNAL. This package
> > uses the "$(eval $(kernel-module))". In addition this package also
> > adds a kernel patch hook via BR2_EXTERNAL/linux-ext-MYPACKAGE.mk.
> >
> > As far as I see MYPACKAGE depends on linux (due to kernel-module) and
> > LINUX depends on MYPACKAGE due to the dependency created to
> > LINUX_PATCH_DEPENDENCIES.
> >
> > ----
> > # make linux-legal-info
> > linux/linux.mk:578: *** Recursive variable
> > 'LINUX_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
> > Stop.
> > make: *** [Makefile:23: _all] Error 2
> > ----
> >
> > Is having a package that does both (linux kernel module and kernel
> > patching) allowed?
>
> The linux-extensions are only _PATCH_DEPENDENCIES, that is the packages
> providing the extensions shall be extracted and patched before linux is
> patched.
>
> So, as far as a build is concerned, this does not cause a circular
> dependency.
>
> However, as you noticed later, this does generate a circular dependency,
> like gathering the elgal-info.
>
> > Can this be fixed?
>
> No, that 'can't be, I'm afraid... :-/
>
> > I think linux only need the
> > dependency to the MYPACKAGE_EXTRACT because the patch is not a result
> > of the build of this package.
>
> This is already the case, see above.
>
> > What do you think?
>
> As a short-term solution, just provide towo packages: one that provides
> the extension, one that provides the kernel module.
>
> However, if your package provides a kernel patch, why does it not patch
> the kernel with your new module to begin with, and have the module built
> as part of the kernel build? After all, that's the whole point of linux
> extensions: inject new code in the kernel build process.

I expected such an answer ;-)

Thank you anyway

> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
  2020-01-26  7:50 ` Yann E. MORIN
  2020-01-26  7:56   ` Heiko Thiery
@ 2020-01-26  8:01   ` Heiko Thiery
  1 sibling, 0 replies; 7+ messages in thread
From: Heiko Thiery @ 2020-01-26  8:01 UTC (permalink / raw)
  To: buildroot

Hi Yann,

> However, if your package provides a kernel patch, why does it not patch
> the kernel with your new module to begin with, and have the module built
> as part of the kernel build? After all, that's the whole point of linux
> extensions: inject new code in the kernel build process.

We just integrate this code from an external supplier. Both the kernel
module and the patches. And by doing this in that way we don't have to
create the patch for the module. But I have check.

Thank you

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES
  2020-01-24  7:37 [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES Heiko Thiery
  2020-01-24  8:21 ` Heiko Thiery
  2020-01-26  7:50 ` Yann E. MORIN
@ 2020-01-26  9:21 ` Yann E. MORIN
  2 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2020-01-26  9:21 UTC (permalink / raw)
  To: buildroot

Heiko, All,

On 2020-01-24 08:37 +0100, Heiko Thiery spake thusly:
> I have a custom package (MYPACKAGE) in my BR2_EXTERNAL. This package
> uses the "$(eval $(kernel-module))". In addition this package also
> adds a kernel patch hook via BR2_EXTERNAL/linux-ext-MYPACKAGE.mk.
> 
> As far as I see MYPACKAGE depends on linux (due to kernel-module) and
> LINUX depends on MYPACKAGE due to the dependency created to
> LINUX_PATCH_DEPENDENCIES.

While reviewing our existing linux extensions to prepare my previous
reply, I noticed that we do have the same problem in Buildroot itself.
The package that provides the RTAI extension has an explicit dependency
on linux:

    https://git.buildroot.org/buildroot/tree/package/rtai/rtai.mk#n19

And indeed, runing 'make legal-info' does break in a similar fashion:

    package/rtai/rtai.mk:32: *** Recursive variable
    'RTAI_FINAL_RECURSIVE_DEPENDENCIES' references itself (eventually).
    Stop.

Damned... :-/ We'll have to come up with a fix...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-01-26  9:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24  7:37 [Buildroot] Package can create LINUX_FINAL_RECURSIVE_DEPENDENCIES Heiko Thiery
2020-01-24  8:21 ` Heiko Thiery
2020-01-24  8:39   ` Michael Walle
2020-01-26  7:50 ` Yann E. MORIN
2020-01-26  7:56   ` Heiko Thiery
2020-01-26  8:01   ` Heiko Thiery
2020-01-26  9:21 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.