diff mbox series

kernel.bbclass: explicitly depend on bison-native for deterministic builds

Message ID 1519084455-3915-1-git-send-email-denis@denix.org
State New
Headers show
Series kernel.bbclass: explicitly depend on bison-native for deterministic builds | expand

Commit Message

Denys Dmytriyenko Feb. 19, 2018, 11:54 p.m. UTC
From: Denys Dmytriyenko <denys@ti.com>


Explicitly depend on bison-native for deterministic builds, as it is required
for the build:

|   HOSTCC  scripts/basic/fixdep
|   GEN     ./Makefile
|   HOSTCC  scripts/kconfig/conf.o
|   YACC    scripts/kconfig/zconf.tab.c
| /bin/sh: bison: command not found
| scripts/Makefile.lib:217: recipe for target 'scripts/kconfig/zconf.tab.c' failed

In most cases, this dependency comes indirectly via toolchain dependencies,
specifically binutils-cross, which pulls bison-native. Different setups,
such as with external toolchain, would expose this problem, since correct
dependency is not marked explicitly.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>

---
I'm seeing this now on 4.16-rc2 with external toolchain.

 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Otavio Salvador Feb. 20, 2018, 12:36 a.m. UTC | #1
On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> From: Denys Dmytriyenko <denys@ti.com>

>

> Explicitly depend on bison-native for deterministic builds, as it is required

> for the build:

>

> |   HOSTCC  scripts/basic/fixdep

> |   GEN     ./Makefile

> |   HOSTCC  scripts/kconfig/conf.o

> |   YACC    scripts/kconfig/zconf.tab.c

> | /bin/sh: bison: command not found

> | scripts/Makefile.lib:217: recipe for target 'scripts/kconfig/zconf.tab.c' failed

>

> In most cases, this dependency comes indirectly via toolchain dependencies,

> specifically binutils-cross, which pulls bison-native. Different setups,

> such as with external toolchain, would expose this problem, since correct

> dependency is not marked explicitly.

>

> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

> ---

> I'm seeing this now on 4.16-rc2 with external toolchain.


I am not against the addition but in fact, it is because 4.16 stopped
of using pre-generated files and now requires bison to be available. I
am unsure it ought to be on kernel.bbclass at this moment.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Denys Dmytriyenko Feb. 20, 2018, 1:20 a.m. UTC | #2
On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:
> On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org> wrote:

> > From: Denys Dmytriyenko <denys@ti.com>

> >

> > Explicitly depend on bison-native for deterministic builds, as it is required

> > for the build:

> >

> > |   HOSTCC  scripts/basic/fixdep

> > |   GEN     ./Makefile

> > |   HOSTCC  scripts/kconfig/conf.o

> > |   YACC    scripts/kconfig/zconf.tab.c

> > | /bin/sh: bison: command not found

> > | scripts/Makefile.lib:217: recipe for target 'scripts/kconfig/zconf.tab.c' failed

> >

> > In most cases, this dependency comes indirectly via toolchain dependencies,

> > specifically binutils-cross, which pulls bison-native. Different setups,

> > such as with external toolchain, would expose this problem, since correct

> > dependency is not marked explicitly.

> >

> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>

> > ---

> > I'm seeing this now on 4.16-rc2 with external toolchain.

> 

> I am not against the addition but in fact, it is because 4.16 stopped

> of using pre-generated files and now requires bison to be available.


Ok, good, I was wondering why I didn't see it before 4.16...


> I am unsure it ought to be on kernel.bbclass at this moment.


Why not? Because it's 4.16+ specific?

By default bison-native dependency gets added implicitly when built with the 
toolchain from oe-core, so this doesn't add any extra dependencies, only makes 
it explicit.

-- 
Denys
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 20, 2018, 10:10 a.m. UTC | #3
On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:
> On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:

>> On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org> wrote:

>>> From: Denys Dmytriyenko <denys@ti.com>

>>>

>>> Explicitly depend on bison-native for deterministic builds, as it is required

>>> for the build:

>>>

>>> |   HOSTCC  scripts/basic/fixdep

>>> |   GEN     ./Makefile

>>> |   HOSTCC  scripts/kconfig/conf.o

>>> |   YACC    scripts/kconfig/zconf.tab.c

>>> | /bin/sh: bison: command not found

>>> | scripts/Makefile.lib:217: recipe for target 'scripts/kconfig/zconf.tab.c' failed

>>>

>>> In most cases, this dependency comes indirectly via toolchain dependencies,

>>> specifically binutils-cross, which pulls bison-native. Different setups,

>>> such as with external toolchain, would expose this problem, since correct

>>> dependency is not marked explicitly.

>>>

>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

>>> ---

>>> I'm seeing this now on 4.16-rc2 with external toolchain.

>>

>> I am not against the addition but in fact, it is because 4.16 stopped

>> of using pre-generated files and now requires bison to be available.

> 

> Ok, good, I was wondering why I didn't see it before 4.16...

> 

> 

>> I am unsure it ought to be on kernel.bbclass at this moment.

> 

> Why not? Because it's 4.16+ specific?

> 

> By default bison-native dependency gets added implicitly when built with the

> toolchain from oe-core, so this doesn't add any extra dependencies, only makes

> it explicit.

> 

it will be overcompensating for < 4.16 kernel recipes where this 
dependency is not needed. it might be a legit dependency for another 
component, that doesn't stage this package in kernel recipe-specific 
sysroot but this change will do that. So its not completely innocent 
change.
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Otavio Salvador Feb. 20, 2018, 2:53 p.m. UTC | #4
On Tue, Feb 20, 2018 at 7:10 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:

>>

>> On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:

>>>

>>> On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org>

>>> wrote:

>>>>

>>>> From: Denys Dmytriyenko <denys@ti.com>

>>>>

>>>> Explicitly depend on bison-native for deterministic builds, as it is

>>>> required

>>>> for the build:

>>>>

>>>> |   HOSTCC  scripts/basic/fixdep

>>>> |   GEN     ./Makefile

>>>> |   HOSTCC  scripts/kconfig/conf.o

>>>> |   YACC    scripts/kconfig/zconf.tab.c

>>>> | /bin/sh: bison: command not found

>>>> | scripts/Makefile.lib:217: recipe for target

>>>> 'scripts/kconfig/zconf.tab.c' failed

>>>>

>>>> In most cases, this dependency comes indirectly via toolchain

>>>> dependencies,

>>>> specifically binutils-cross, which pulls bison-native. Different setups,

>>>> such as with external toolchain, would expose this problem, since

>>>> correct

>>>> dependency is not marked explicitly.

>>>>

>>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

>>>> ---

>>>> I'm seeing this now on 4.16-rc2 with external toolchain.

>>>

>>>

>>> I am not against the addition but in fact, it is because 4.16 stopped

>>> of using pre-generated files and now requires bison to be available.

>>

>>

>> Ok, good, I was wondering why I didn't see it before 4.16...

>>

>>

>>> I am unsure it ought to be on kernel.bbclass at this moment.

>>

>>

>> Why not? Because it's 4.16+ specific?

>>

>> By default bison-native dependency gets added implicitly when built with

>> the

>> toolchain from oe-core, so this doesn't add any extra dependencies, only

>> makes

>> it explicit.

>>

> it will be overcompensating for < 4.16 kernel recipes where this dependency

> is not needed. it might be a legit dependency for another component, that

> doesn't stage this package in kernel recipe-specific sysroot but this change

> will do that. So its not completely innocent change.


I'd be in favor of matching the version and adding it if it is a 4.16
or newer kernel. Adding for prior versions seems wrong for me.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Martin Jansa Feb. 20, 2018, 3:41 p.m. UTC | #5
I'm OK with adding bison-native for all versions.

When we added bc-native 2+ years ago:
commit c067e52cffe002de3b39aa1bced308dd532859c1
Author: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Date:   Thu Oct 2 15:33:23 2014 -0500

    kernel: Added bc-native as DEPENDS

    The makefile checks for bc during for compilation

it was also needed only for the latest kernel and we didn't make it
conditional on the kernel version. Now with RSS it's even less dangerous as
the bison-native will appear only in kernel's RSS and as Denys said it's
quite common dependency so many components pull it into RSS anyway.

On Tue, Feb 20, 2018 at 3:53 PM, Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> On Tue, Feb 20, 2018 at 7:10 AM, Khem Raj <raj.khem@gmail.com> wrote:

> > On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:

> >>

> >> On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:

> >>>

> >>> On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org>

> >>> wrote:

> >>>>

> >>>> From: Denys Dmytriyenko <denys@ti.com>

> >>>>

> >>>> Explicitly depend on bison-native for deterministic builds, as it is

> >>>> required

> >>>> for the build:

> >>>>

> >>>> |   HOSTCC  scripts/basic/fixdep

> >>>> |   GEN     ./Makefile

> >>>> |   HOSTCC  scripts/kconfig/conf.o

> >>>> |   YACC    scripts/kconfig/zconf.tab.c

> >>>> | /bin/sh: bison: command not found

> >>>> | scripts/Makefile.lib:217: recipe for target

> >>>> 'scripts/kconfig/zconf.tab.c' failed

> >>>>

> >>>> In most cases, this dependency comes indirectly via toolchain

> >>>> dependencies,

> >>>> specifically binutils-cross, which pulls bison-native. Different

> setups,

> >>>> such as with external toolchain, would expose this problem, since

> >>>> correct

> >>>> dependency is not marked explicitly.

> >>>>

> >>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

> >>>> ---

> >>>> I'm seeing this now on 4.16-rc2 with external toolchain.

> >>>

> >>>

> >>> I am not against the addition but in fact, it is because 4.16 stopped

> >>> of using pre-generated files and now requires bison to be available.

> >>

> >>

> >> Ok, good, I was wondering why I didn't see it before 4.16...

> >>

> >>

> >>> I am unsure it ought to be on kernel.bbclass at this moment.

> >>

> >>

> >> Why not? Because it's 4.16+ specific?

> >>

> >> By default bison-native dependency gets added implicitly when built with

> >> the

> >> toolchain from oe-core, so this doesn't add any extra dependencies, only

> >> makes

> >> it explicit.

> >>

> > it will be overcompensating for < 4.16 kernel recipes where this

> dependency

> > is not needed. it might be a legit dependency for another component, that

> > doesn't stage this package in kernel recipe-specific sysroot but this

> change

> > will do that. So its not completely innocent change.

>

> I'd be in favor of matching the version and adding it if it is a 4.16

> or newer kernel. Adding for prior versions seems wrong for me.

>

> --

> Otavio Salvador                             O.S. Systems

> http://www.ossystems.com.br        http://code.ossystems.com.br

> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>
<div dir="ltr">I&#39;m OK with adding bison-native for all versions.<div><br></div><div>When we added bc-native 2+ years ago:</div><div><div>commit c067e52cffe002de3b39aa1bced308dd532859c1</div><div>Author: Alejandro Hernandez &lt;<a href="mailto:alejandro.hernandez@linux.intel.com">alejandro.hernandez@linux.intel.com</a>&gt;</div><div>Date:   Thu Oct 2 15:33:23 2014 -0500</div><div><br></div><div>    kernel: Added bc-native as DEPENDS</div><div>    </div><div>    The makefile checks for bc during for compilation</div></div><div><br></div><div>it was also needed only for the latest kernel and we didn&#39;t make it conditional on the kernel version. Now with RSS it&#39;s even less dangerous as the bison-native will appear only in kernel&#39;s RSS and as Denys said it&#39;s quite common dependency so many components pull it into RSS anyway.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 20, 2018 at 3:53 PM, Otavio Salvador <span dir="ltr">&lt;<a href="mailto:otavio.salvador@ossystems.com.br" target="_blank">otavio.salvador@ossystems.com.br</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Feb 20, 2018 at 7:10 AM, Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt; wrote:<br>
&gt; On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko &lt;<a href="mailto:denis@denix.org">denis@denix.org</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; From: Denys Dmytriyenko &lt;<a href="mailto:denys@ti.com">denys@ti.com</a>&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Explicitly depend on bison-native for deterministic builds, as it is<br>
&gt;&gt;&gt;&gt; required<br>
&gt;&gt;&gt;&gt; for the build:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; |   HOSTCC  scripts/basic/fixdep<br>
&gt;&gt;&gt;&gt; |   GEN     ./Makefile<br>
&gt;&gt;&gt;&gt; |   HOSTCC  scripts/kconfig/conf.o<br>
&gt;&gt;&gt;&gt; |   YACC    scripts/kconfig/zconf.tab.c<br>
&gt;&gt;&gt;&gt; | /bin/sh: bison: command not found<br>
&gt;&gt;&gt;&gt; | scripts/Makefile.lib:217: recipe for target<br>
&gt;&gt;&gt;&gt; &#39;scripts/kconfig/zconf.tab.c&#39; failed<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; In most cases, this dependency comes indirectly via toolchain<br>
&gt;&gt;&gt;&gt; dependencies,<br>
&gt;&gt;&gt;&gt; specifically binutils-cross, which pulls bison-native. Different setups,<br>
&gt;&gt;&gt;&gt; such as with external toolchain, would expose this problem, since<br>
&gt;&gt;&gt;&gt; correct<br>
&gt;&gt;&gt;&gt; dependency is not marked explicitly.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Signed-off-by: Denys Dmytriyenko &lt;<a href="mailto:denys@ti.com">denys@ti.com</a>&gt;<br>
&gt;&gt;&gt;&gt; ---<br>
&gt;&gt;&gt;&gt; I&#39;m seeing this now on 4.16-rc2 with external toolchain.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I am not against the addition but in fact, it is because 4.16 stopped<br>
&gt;&gt;&gt; of using pre-generated files and now requires bison to be available.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Ok, good, I was wondering why I didn&#39;t see it before 4.16...<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; I am unsure it ought to be on kernel.bbclass at this moment.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Why not? Because it&#39;s 4.16+ specific?<br>
&gt;&gt;<br>
&gt;&gt; By default bison-native dependency gets added implicitly when built with<br>
&gt;&gt; the<br>
&gt;&gt; toolchain from oe-core, so this doesn&#39;t add any extra dependencies, only<br>
&gt;&gt; makes<br>
&gt;&gt; it explicit.<br>
&gt;&gt;<br>
&gt; it will be overcompensating for &lt; 4.16 kernel recipes where this dependency<br>
&gt; is not needed. it might be a legit dependency for another component, that<br>
&gt; doesn&#39;t stage this package in kernel recipe-specific sysroot but this change<br>
&gt; will do that. So its not completely innocent change.<br>
<br>
</div></div>I&#39;d be in favor of matching the version and adding it if it is a 4.16<br>
or newer kernel. Adding for prior versions seems wrong for me.<br>
<span class="im HOEnZb"><br>
--<br>
Otavio Salvador                             O.S. Systems<br>
<a href="http://www.ossystems.com.br" rel="noreferrer" target="_blank">http://www.ossystems.com.br</a>        <a href="http://code.ossystems.com.br" rel="noreferrer" target="_blank">http://code.ossystems.com.br</a><br>
Mobile: <a href="tel:%2B55%20%2853%29%209981-7854" value="+555399817854">+55 (53) 9981-7854</a>            Mobile: <a href="tel:%2B1%20%28347%29%20903-9750" value="+13479039750">+1 (347) 903-9750</a><br>
</span><div class="HOEnZb"><div class="h5">--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 20, 2018, 4:08 p.m. UTC | #6
On Tue, Feb 20, 2018 at 7:41 AM Martin Jansa <martin.jansa@gmail.com> wrote:

> I'm OK with adding bison-native for all versions.

>



As long we know that there are no side effects of this dep in kernel builds

>

> When we added bc-native 2+ years ago:

> commit c067e52cffe002de3b39aa1bced308dd532859c1

> Author: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>

> Date:   Thu Oct 2 15:33:23 2014 -0500

>

>     kernel: Added bc-native as DEPENDS

>

>     The makefile checks for bc during for compilation

>

> it was also needed only for the latest kernel and we didn't make it

> conditional on the kernel version. Now with RSS it's even less dangerous as

> the bison-native will appear only in kernel's RSS and as Denys said it's

> quite common dependency so many components pull it into RSS anyway.

>

> On Tue, Feb 20, 2018 at 3:53 PM, Otavio Salvador <

> otavio.salvador@ossystems.com.br> wrote:

>

>> On Tue, Feb 20, 2018 at 7:10 AM, Khem Raj <raj.khem@gmail.com> wrote:

>> > On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:

>> >>

>> >> On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:

>> >>>

>> >>> On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org>

>> >>> wrote:

>> >>>>

>> >>>> From: Denys Dmytriyenko <denys@ti.com>

>> >>>>

>> >>>> Explicitly depend on bison-native for deterministic builds, as it is

>> >>>> required

>> >>>> for the build:

>> >>>>

>> >>>> |   HOSTCC  scripts/basic/fixdep

>> >>>> |   GEN     ./Makefile

>> >>>> |   HOSTCC  scripts/kconfig/conf.o

>> >>>> |   YACC    scripts/kconfig/zconf.tab.c

>> >>>> | /bin/sh: bison: command not found

>> >>>> | scripts/Makefile.lib:217: recipe for target

>> >>>> 'scripts/kconfig/zconf.tab.c' failed

>> >>>>

>> >>>> In most cases, this dependency comes indirectly via toolchain

>> >>>> dependencies,

>> >>>> specifically binutils-cross, which pulls bison-native. Different

>> setups,

>> >>>> such as with external toolchain, would expose this problem, since

>> >>>> correct

>> >>>> dependency is not marked explicitly.

>> >>>>

>> >>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

>> >>>> ---

>> >>>> I'm seeing this now on 4.16-rc2 with external toolchain.

>> >>>

>> >>>

>> >>> I am not against the addition but in fact, it is because 4.16 stopped

>> >>> of using pre-generated files and now requires bison to be available.

>> >>

>> >>

>> >> Ok, good, I was wondering why I didn't see it before 4.16...

>> >>

>> >>

>> >>> I am unsure it ought to be on kernel.bbclass at this moment.

>> >>

>> >>

>> >> Why not? Because it's 4.16+ specific?

>> >>

>> >> By default bison-native dependency gets added implicitly when built

>> with

>> >> the

>> >> toolchain from oe-core, so this doesn't add any extra dependencies,

>> only

>> >> makes

>> >> it explicit.

>> >>

>> > it will be overcompensating for < 4.16 kernel recipes where this

>> dependency

>> > is not needed. it might be a legit dependency for another component,

>> that

>> > doesn't stage this package in kernel recipe-specific sysroot but this

>> change

>> > will do that. So its not completely innocent change.

>>

>> I'd be in favor of matching the version and adding it if it is a 4.16

>> or newer kernel. Adding for prior versions seems wrong for me.

>>

>> --

>> Otavio Salvador                             O.S. Systems

>> http://www.ossystems.com.br        http://code.ossystems.com.br

>> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

>>

> --

>> _______________________________________________

>> Openembedded-core mailing list

>> Openembedded-core@lists.openembedded.org

>> http://lists.openembedded.org/mailman/listinfo/openembedded-core

>>

>
<div><br><div class="gmail_quote"><div dir="auto">On Tue, Feb 20, 2018 at 7:41 AM Martin Jansa &lt;<a href="mailto:martin.jansa@gmail.com">martin.jansa@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I&#39;m OK with adding bison-native for all versions.</div></blockquote><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">As long we know that there are no side effects of this dep in kernel builds </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br></div><div>When we added bc-native 2+ years ago:</div><div><div>commit c067e52cffe002de3b39aa1bced308dd532859c1</div><div>Author: Alejandro Hernandez &lt;<a href="mailto:alejandro.hernandez@linux.intel.com" target="_blank">alejandro.hernandez@linux.intel.com</a>&gt;</div><div>Date:   Thu Oct 2 15:33:23 2014 -0500</div><div><br></div><div>    kernel: Added bc-native as DEPENDS</div><div>    </div><div>    The makefile checks for bc during for compilation</div></div><div><br></div><div>it was also needed only for the latest kernel and we didn&#39;t make it conditional on the kernel version. Now with RSS it&#39;s even less dangerous as the bison-native will appear only in kernel&#39;s RSS and as Denys said it&#39;s quite common dependency so many components pull it into RSS anyway.</div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 20, 2018 at 3:53 PM, Otavio Salvador <span>&lt;<a href="mailto:otavio.salvador@ossystems.com.br" target="_blank">otavio.salvador@ossystems.com.br</a>&gt;</span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_5651199098793911087HOEnZb"><div class="m_5651199098793911087h5">On Tue, Feb 20, 2018 at 7:10 AM, Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt; wrote:<br>
&gt; On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko &lt;<a href="mailto:denis@denix.org" target="_blank">denis@denix.org</a>&gt;<br>
&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; From: Denys Dmytriyenko &lt;<a href="mailto:denys@ti.com" target="_blank">denys@ti.com</a>&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Explicitly depend on bison-native for deterministic builds, as it is<br>
&gt;&gt;&gt;&gt; required<br>
&gt;&gt;&gt;&gt; for the build:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; |   HOSTCC  scripts/basic/fixdep<br>
&gt;&gt;&gt;&gt; |   GEN     ./Makefile<br>
&gt;&gt;&gt;&gt; |   HOSTCC  scripts/kconfig/conf.o<br>
&gt;&gt;&gt;&gt; |   YACC    scripts/kconfig/zconf.tab.c<br>
&gt;&gt;&gt;&gt; | /bin/sh: bison: command not found<br>
&gt;&gt;&gt;&gt; | scripts/Makefile.lib:217: recipe for target<br>
&gt;&gt;&gt;&gt; &#39;scripts/kconfig/zconf.tab.c&#39; failed<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; In most cases, this dependency comes indirectly via toolchain<br>
&gt;&gt;&gt;&gt; dependencies,<br>
&gt;&gt;&gt;&gt; specifically binutils-cross, which pulls bison-native. Different setups,<br>
&gt;&gt;&gt;&gt; such as with external toolchain, would expose this problem, since<br>
&gt;&gt;&gt;&gt; correct<br>
&gt;&gt;&gt;&gt; dependency is not marked explicitly.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Signed-off-by: Denys Dmytriyenko &lt;<a href="mailto:denys@ti.com" target="_blank">denys@ti.com</a>&gt;<br>
&gt;&gt;&gt;&gt; ---<br>
&gt;&gt;&gt;&gt; I&#39;m seeing this now on 4.16-rc2 with external toolchain.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I am not against the addition but in fact, it is because 4.16 stopped<br>
&gt;&gt;&gt; of using pre-generated files and now requires bison to be available.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Ok, good, I was wondering why I didn&#39;t see it before 4.16...<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; I am unsure it ought to be on kernel.bbclass at this moment.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Why not? Because it&#39;s 4.16+ specific?<br>
&gt;&gt;<br>
&gt;&gt; By default bison-native dependency gets added implicitly when built with<br>
&gt;&gt; the<br>
&gt;&gt; toolchain from oe-core, so this doesn&#39;t add any extra dependencies, only<br>
&gt;&gt; makes<br>
&gt;&gt; it explicit.<br>
&gt;&gt;<br>
&gt; it will be overcompensating for &lt; 4.16 kernel recipes where this dependency<br>
&gt; is not needed. it might be a legit dependency for another component, that<br>
&gt; doesn&#39;t stage this package in kernel recipe-specific sysroot but this change<br>
&gt; will do that. So its not completely innocent change.<br>
<br>
</div></div>I&#39;d be in favor of matching the version and adding it if it is a 4.16<br>
or newer kernel. Adding for prior versions seems wrong for me.<br>
<span class="m_5651199098793911087im m_5651199098793911087HOEnZb"><br>
--<br>
Otavio Salvador                             O.S. Systems<br>
<a href="http://www.ossystems.com.br" rel="noreferrer" target="_blank">http://www.ossystems.com.br</a>        <a href="http://code.ossystems.com.br" rel="noreferrer" target="_blank">http://code.ossystems.com.br</a><br>
Mobile: <a href="tel:%2B55%20%2853%29%209981-7854" value="+555399817854" target="_blank">+55 (53) 9981-7854</a>            Mobile: <a href="tel:%2B1%20%28347%29%20903-9750" value="+13479039750" target="_blank">+1 (347) 903-9750</a><br>
</span></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_5651199098793911087HOEnZb"><div class="m_5651199098793911087h5">--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</div></div></blockquote></div></div></blockquote></div></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Denys Dmytriyenko Feb. 20, 2018, 4:17 p.m. UTC | #7
On Tue, Feb 20, 2018 at 04:08:06PM +0000, Khem Raj wrote:
> On Tue, Feb 20, 2018 at 7:41 AM Martin Jansa <martin.jansa@gmail.com> wrote:

> 

> > I'm OK with adding bison-native for all versions.

> 

> As long we know that there are no side effects of this dep in kernel builds


You do realize that when you build with oe-core toolchain, every package gets
bison-native dependency automatically? Regardless whether it was requested or 
not. If there were side effects, we would have seen it long time ago...


> > When we added bc-native 2+ years ago:

> > commit c067e52cffe002de3b39aa1bced308dd532859c1

> > Author: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>

> > Date:   Thu Oct 2 15:33:23 2014 -0500

> >

> >     kernel: Added bc-native as DEPENDS

> >

> >     The makefile checks for bc during for compilation

> >

> > it was also needed only for the latest kernel and we didn't make it

> > conditional on the kernel version. Now with RSS it's even less dangerous as

> > the bison-native will appear only in kernel's RSS and as Denys said it's

> > quite common dependency so many components pull it into RSS anyway.

> >

> > On Tue, Feb 20, 2018 at 3:53 PM, Otavio Salvador <

> > otavio.salvador@ossystems.com.br> wrote:

> >

> >> On Tue, Feb 20, 2018 at 7:10 AM, Khem Raj <raj.khem@gmail.com> wrote:

> >> > On 2/19/18 5:20 PM, Denys Dmytriyenko wrote:

> >> >>

> >> >> On Mon, Feb 19, 2018 at 09:36:22PM -0300, Otavio Salvador wrote:

> >> >>>

> >> >>> On Mon, Feb 19, 2018 at 8:54 PM, Denys Dmytriyenko <denis@denix.org>

> >> >>> wrote:

> >> >>>>

> >> >>>> From: Denys Dmytriyenko <denys@ti.com>

> >> >>>>

> >> >>>> Explicitly depend on bison-native for deterministic builds, as it is

> >> >>>> required

> >> >>>> for the build:

> >> >>>>

> >> >>>> |   HOSTCC  scripts/basic/fixdep

> >> >>>> |   GEN     ./Makefile

> >> >>>> |   HOSTCC  scripts/kconfig/conf.o

> >> >>>> |   YACC    scripts/kconfig/zconf.tab.c

> >> >>>> | /bin/sh: bison: command not found

> >> >>>> | scripts/Makefile.lib:217: recipe for target

> >> >>>> 'scripts/kconfig/zconf.tab.c' failed

> >> >>>>

> >> >>>> In most cases, this dependency comes indirectly via toolchain

> >> >>>> dependencies,

> >> >>>> specifically binutils-cross, which pulls bison-native. Different

> >> setups,

> >> >>>> such as with external toolchain, would expose this problem, since

> >> >>>> correct

> >> >>>> dependency is not marked explicitly.

> >> >>>>

> >> >>>> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

> >> >>>> ---

> >> >>>> I'm seeing this now on 4.16-rc2 with external toolchain.

> >> >>>

> >> >>>

> >> >>> I am not against the addition but in fact, it is because 4.16 stopped

> >> >>> of using pre-generated files and now requires bison to be available.

> >> >>

> >> >>

> >> >> Ok, good, I was wondering why I didn't see it before 4.16...

> >> >>

> >> >>

> >> >>> I am unsure it ought to be on kernel.bbclass at this moment.

> >> >>

> >> >>

> >> >> Why not? Because it's 4.16+ specific?

> >> >>

> >> >> By default bison-native dependency gets added implicitly when built

> >> with

> >> >> the

> >> >> toolchain from oe-core, so this doesn't add any extra dependencies,

> >> only

> >> >> makes

> >> >> it explicit.

> >> >>

> >> > it will be overcompensating for < 4.16 kernel recipes where this

> >> dependency

> >> > is not needed. it might be a legit dependency for another component,

> >> that

> >> > doesn't stage this package in kernel recipe-specific sysroot but this

> >> change

> >> > will do that. So its not completely innocent change.

> >>

> >> I'd be in favor of matching the version and adding it if it is a 4.16

> >> or newer kernel. Adding for prior versions seems wrong for me.

> >>

> >> --

> >> Otavio Salvador                             O.S. Systems

> >> http://www.ossystems.com.br        http://code.ossystems.com.br

> >> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

> >>

> > --

> >> _______________________________________________

> >> Openembedded-core mailing list

> >> Openembedded-core@lists.openembedded.org

> >> http://lists.openembedded.org/mailman/listinfo/openembedded-core

> >>

> >


> -- 

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core


-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 20, 2018, 6:28 p.m. UTC | #8
On Tue, Feb 20, 2018 at 8:17 AM, Denys Dmytriyenko <denis@denix.org> wrote:
> On Tue, Feb 20, 2018 at 04:08:06PM +0000, Khem Raj wrote:

>> On Tue, Feb 20, 2018 at 7:41 AM Martin Jansa <martin.jansa@gmail.com> wrote:

>>

>> > I'm OK with adding bison-native for all versions.

>>

>> As long we know that there are no side effects of this dep in kernel builds

>

> You do realize that when you build with oe-core toolchain, every package gets

> bison-native dependency automatically? Regardless whether it was requested or

> not. If there were side effects, we would have seen it long time ago...


Yes I see it seems to be pulled in by toolchain regardless, so for this
patch we might just be adding to determinism. but I think it raises question
on why toolchain is adding this everywhere, I think we should remove it
from toolchain default deps. It will make metadata more consistent
across internal/external toolchains
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Denys Dmytriyenko Feb. 20, 2018, 7:33 p.m. UTC | #9
On Tue, Feb 20, 2018 at 10:28:47AM -0800, Khem Raj wrote:
> On Tue, Feb 20, 2018 at 8:17 AM, Denys Dmytriyenko <denis@denix.org> wrote:

> > On Tue, Feb 20, 2018 at 04:08:06PM +0000, Khem Raj wrote:

> >> On Tue, Feb 20, 2018 at 7:41 AM Martin Jansa <martin.jansa@gmail.com> wrote:

> >>

> >> > I'm OK with adding bison-native for all versions.

> >>

> >> As long we know that there are no side effects of this dep in kernel builds

> >

> > You do realize that when you build with oe-core toolchain, every package gets

> > bison-native dependency automatically? Regardless whether it was requested or

> > not. If there were side effects, we would have seen it long time ago...

> 

> Yes I see it seems to be pulled in by toolchain regardless, so for this

> patch we might just be adding to determinism. but I think it raises question

> on why toolchain is adding this everywhere, I think we should remove it

> from toolchain default deps. It will make metadata more consistent

> across internal/external toolchains


There were several similar patches I submitted last month for different 
components to add flex-native and/or bison-native. Most of them got accepted 
and we had a follow up discussion with Richard in gcc thread:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146295.html

He also submitted this patch to prevent indirect flex/bison-native 
dependencies, but I don't believe it got merged yet:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146324.html

Richard, do you have any comments?

-- 
Denys
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 943938d..321c0a4 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -4,7 +4,7 @@  KERNEL_PACKAGE_NAME ??= "kernel"
 KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
 
 PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
 PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
 
 do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot"