diff mbox series

sanity.bbclass: CHeck for additional native perl modules.

Message ID 20240102112135.3594972-1-philip@balister.org
State New
Headers show
Series sanity.bbclass: CHeck for additional native perl modules. | expand

Commit Message

Philip Balister Jan. 2, 2024, 11:21 a.m. UTC
Since we use the build systems native perl, we need to check that all
perl modules required for a build are installed. For a default Fedora 39
install, autoconf-native and libxcrypt both fail to build due to missing
perl modules. After taking careful notes, this commits adds checks for
File::Compare, File::Copy, open, and FindBin.

[YOCTO #14691]

Signed-off-by: Philip Balister <philip@balister.org>
---
 meta/classes-global/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie Jan. 2, 2024, 3:34 p.m. UTC | #1
On Tue, 2024-01-02 at 06:21 -0500, Philip Balister wrote:
> Since we use the build systems native perl, we need to check that all
> perl modules required for a build are installed. For a default Fedora 39
> install, autoconf-native and libxcrypt both fail to build due to missing
> perl modules. After taking careful notes, this commits adds checks for
> File::Compare, File::Copy, open, and FindBin.
> 
> [YOCTO #14691]
> 
> Signed-off-by: Philip Balister <philip@balister.org>
> ---
>  meta/classes-global/sanity.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
> index 9b824915f2..57353b9478 100644
> --- a/meta/classes-global/sanity.bbclass
> +++ b/meta/classes-global/sanity.bbclass
> @@ -532,7 +532,7 @@ def check_git_version(sanity_data):
>  def check_perl_modules(sanity_data):
>      import subprocess
>      ret = ""
> -    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
> +    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
>      errresult = ''
>      for m in modules:
>          try:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8418

Cheers,

Richard
Philip Balister Jan. 2, 2024, 4:40 p.m. UTC | #2
On 1/2/24 10:34, Richard Purdie wrote:
> On Tue, 2024-01-02 at 06:21 -0500, Philip Balister wrote:
>> Since we use the build systems native perl, we need to check that all
>> perl modules required for a build are installed. For a default Fedora 39
>> install, autoconf-native and libxcrypt both fail to build due to missing
>> perl modules. After taking careful notes, this commits adds checks for
>> File::Compare, File::Copy, open, and FindBin.
>>
>> [YOCTO #14691]
>>
>> Signed-off-by: Philip Balister <philip@balister.org>
>> ---
>>   meta/classes-global/sanity.bbclass | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
>> index 9b824915f2..57353b9478 100644
>> --- a/meta/classes-global/sanity.bbclass
>> +++ b/meta/classes-global/sanity.bbclass
>> @@ -532,7 +532,7 @@ def check_git_version(sanity_data):
>>   def check_perl_modules(sanity_data):
>>       import subprocess
>>       ret = ""
>> -    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
>> +    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
>>       errresult = ''
>>       for m in modules:
>>           try:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8418

Curious, so the Ubuntu autobuilder doesn't have the perl open module? 
Can you build libxcrypt on that builder?

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14691#c7 shows the 
build failing until I install the perl-open package.

Philip

> 
> Cheers,
> 
> Richard
> 
>
Richard Purdie Jan. 2, 2024, 4:45 p.m. UTC | #3
On Tue, 2024-01-02 at 11:40 -0500, Philip Balister wrote:
> On 1/2/24 10:34, Richard Purdie wrote:
> > On Tue, 2024-01-02 at 06:21 -0500, Philip Balister wrote:
> > > Since we use the build systems native perl, we need to check that all
> > > perl modules required for a build are installed. For a default Fedora 39
> > > install, autoconf-native and libxcrypt both fail to build due to missing
> > > perl modules. After taking careful notes, this commits adds checks for
> > > File::Compare, File::Copy, open, and FindBin.
> > > 
> > > [YOCTO #14691]
> > > 
> > > Signed-off-by: Philip Balister <philip@balister.org>
> > > ---
> > >   meta/classes-global/sanity.bbclass | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
> > > index 9b824915f2..57353b9478 100644
> > > --- a/meta/classes-global/sanity.bbclass
> > > +++ b/meta/classes-global/sanity.bbclass
> > > @@ -532,7 +532,7 @@ def check_git_version(sanity_data):
> > >   def check_perl_modules(sanity_data):
> > >       import subprocess
> > >       ret = ""
> > > -    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
> > > +    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
> > >       errresult = ''
> > >       for m in modules:
> > >           try:
> > 
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8418
> 
> Curious, so the Ubuntu autobuilder doesn't have the perl open module? 
> Can you build libxcrypt on that builder?
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=14691#c7 shows the 
> build failing until I install the perl-open package.

$ perl -e "use open"
open: needs explicit list of PerlIO layers at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

Cheers,

Richard
Philip Balister Jan. 2, 2024, 9:14 p.m. UTC | #4
On 1/2/24 11:45, Richard Purdie wrote:
> On Tue, 2024-01-02 at 11:40 -0500, Philip Balister wrote:
>> On 1/2/24 10:34, Richard Purdie wrote:
>>> On Tue, 2024-01-02 at 06:21 -0500, Philip Balister wrote:
>>>> Since we use the build systems native perl, we need to check that all
>>>> perl modules required for a build are installed. For a default Fedora 39
>>>> install, autoconf-native and libxcrypt both fail to build due to missing
>>>> perl modules. After taking careful notes, this commits adds checks for
>>>> File::Compare, File::Copy, open, and FindBin.
>>>>
>>>> [YOCTO #14691]
>>>>
>>>> Signed-off-by: Philip Balister <philip@balister.org>
>>>> ---
>>>>    meta/classes-global/sanity.bbclass | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
>>>> index 9b824915f2..57353b9478 100644
>>>> --- a/meta/classes-global/sanity.bbclass
>>>> +++ b/meta/classes-global/sanity.bbclass
>>>> @@ -532,7 +532,7 @@ def check_git_version(sanity_data):
>>>>    def check_perl_modules(sanity_data):
>>>>        import subprocess
>>>>        ret = ""
>>>> -    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
>>>> +    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
>>>>        errresult = ''
>>>>        for m in modules:
>>>>            try:
>>>
>>> https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8418
>>
>> Curious, so the Ubuntu autobuilder doesn't have the perl open module?
>> Can you build libxcrypt on that builder?
>>
>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=14691#c7 shows the
>> build failing until I install the perl-open package.
> 
> $ perl -e "use open"
> open: needs explicit list of PerlIO layers at -e line 1.
> BEGIN failed--compilation aborted at -e line 1.

Why isn't anything easy!

$ perl -e "use open ':std'"

does complete on Fedora 39. What is confusing me is why the check seems 
to go through on my Fedora 39 , but and not the AB machine. I suppose it 
is time to add typos to confirm the code attempts to execute.

I am guessing I could tell bitbake the module is "open ':std'".

Philip

> 
> Cheers,
> 
> Richard
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#193246): https://lists.openembedded.org/g/openembedded-core/message/193246
> Mute This Topic: https://lists.openembedded.org/mt/103479426/384425
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [philip@balister.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Richard Purdie Jan. 2, 2024, 10:47 p.m. UTC | #5
On Tue, 2024-01-02 at 16:14 -0500, Philip Balister wrote:
> On 1/2/24 11:45, Richard Purdie wrote:
> > On Tue, 2024-01-02 at 11:40 -0500, Philip Balister wrote:
> > > On 1/2/24 10:34, Richard Purdie wrote:
> > > > On Tue, 2024-01-02 at 06:21 -0500, Philip Balister wrote:
> > > > > Since we use the build systems native perl, we need to check that all
> > > > > perl modules required for a build are installed. For a default Fedora 39
> > > > > install, autoconf-native and libxcrypt both fail to build due to missing
> > > > > perl modules. After taking careful notes, this commits adds checks for
> > > > > File::Compare, File::Copy, open, and FindBin.
> > > > > 
> > > > > [YOCTO #14691]
> > > > > 
> > > > > Signed-off-by: Philip Balister <philip@balister.org>
> > > > > ---
> > > > >    meta/classes-global/sanity.bbclass | 2 +-
> > > > >    1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
> > > > > index 9b824915f2..57353b9478 100644
> > > > > --- a/meta/classes-global/sanity.bbclass
> > > > > +++ b/meta/classes-global/sanity.bbclass
> > > > > @@ -532,7 +532,7 @@ def check_git_version(sanity_data):
> > > > >    def check_perl_modules(sanity_data):
> > > > >        import subprocess
> > > > >        ret = ""
> > > > > -    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
> > > > > +    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
> > > > >        errresult = ''
> > > > >        for m in modules:
> > > > >            try:
> > > > 
> > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8418
> > > 
> > > Curious, so the Ubuntu autobuilder doesn't have the perl open module?
> > > Can you build libxcrypt on that builder?
> > > 
> > > https://bugzilla.yoctoproject.org/show_bug.cgi?id=14691#c7 shows the
> > > build failing until I install the perl-open package.
> > 
> > $ perl -e "use open"
> > open: needs explicit list of PerlIO layers at -e line 1.
> > BEGIN failed--compilation aborted at -e line 1.
> 
> Why isn't anything easy!
> 
> $ perl -e "use open ':std'"
> 
> does complete on Fedora 39. What is confusing me is why the check seems 
> to go through on my Fedora 39 , but and not the AB machine. I suppose it 
> is time to add typos to confirm the code attempts to execute.

The system caches the host checks. I suspect for testing you need a
clean tmpdir or "rm cache/sanity_info".

> I am guessing I could tell bitbake the module is "open ':std'".

I suspect that would work.

Cheers,

Richard
Philip Balister Jan. 3, 2024, 11:16 a.m. UTC | #6
On 1/2/24 17:47, Richard Purdie wrote:
> On Tue, 2024-01-02 at 16:14 -0500, Philip Balister wrote:
>> On 1/2/24 11:45, Richard Purdie wrote:
>>> On Tue, 2024-01-02 at 11:40 -0500, Philip Balister wrote:
>>>> On 1/2/24 10:34, Richard Purdie wrote:
>>>>> On Tue, 2024-01-02 at 06:21 -0500, Philip Balister wrote:
>>>>>> Since we use the build systems native perl, we need to check that all
>>>>>> perl modules required for a build are installed. For a default Fedora 39
>>>>>> install, autoconf-native and libxcrypt both fail to build due to missing
>>>>>> perl modules. After taking careful notes, this commits adds checks for
>>>>>> File::Compare, File::Copy, open, and FindBin.
>>>>>>
>>>>>> [YOCTO #14691]
>>>>>>
>>>>>> Signed-off-by: Philip Balister <philip@balister.org>
>>>>>> ---
>>>>>>     meta/classes-global/sanity.bbclass | 2 +-
>>>>>>     1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
>>>>>> index 9b824915f2..57353b9478 100644
>>>>>> --- a/meta/classes-global/sanity.bbclass
>>>>>> +++ b/meta/classes-global/sanity.bbclass
>>>>>> @@ -532,7 +532,7 @@ def check_git_version(sanity_data):
>>>>>>     def check_perl_modules(sanity_data):
>>>>>>         import subprocess
>>>>>>         ret = ""
>>>>>> -    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
>>>>>> +    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
>>>>>>         errresult = ''
>>>>>>         for m in modules:
>>>>>>             try:
>>>>>
>>>>> https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/8418
>>>>
>>>> Curious, so the Ubuntu autobuilder doesn't have the perl open module?
>>>> Can you build libxcrypt on that builder?
>>>>
>>>> https://bugzilla.yoctoproject.org/show_bug.cgi?id=14691#c7 shows the
>>>> build failing until I install the perl-open package.
>>>
>>> $ perl -e "use open"
>>> open: needs explicit list of PerlIO layers at -e line 1.
>>> BEGIN failed--compilation aborted at -e line 1.
>>
>> Why isn't anything easy!
>>
>> $ perl -e "use open ':std'"
>>
>> does complete on Fedora 39. What is confusing me is why the check seems
>> to go through on my Fedora 39 , but and not the AB machine. I suppose it
>> is time to add typos to confirm the code attempts to execute.
> 
> The system caches the host checks. I suspect for testing you need a
> clean tmpdir or "rm cache/sanity_info".

clean tmpdir didn't work, "rm cache/sanity_info" did force it to rerun 
the checks. V2 inbound. I'll be off grid mostly until Friday.

Philip

> 
>> I am guessing I could tell bitbake the module is "open ':std'".
> 
> I suspect that would work.
> 
> Cheers,
> 
> Richard
diff mbox series

Patch

diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
index 9b824915f2..57353b9478 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -532,7 +532,7 @@  def check_git_version(sanity_data):
 def check_perl_modules(sanity_data):
     import subprocess
     ret = ""
-    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
+    modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper", "File::Compare", "File::Copy", "open", "FindBin" )
     errresult = ''
     for m in modules:
         try: