Message ID | 20250327060855.428041-1-rajendra.desai@emerson.com |
---|---|
State | New |
Headers | show |
Series | perl-ptest: copy xconfig data from perl source directory | expand |
This doesn't address the feedback given previously. Which is: Is the issue occurring on master as well? If so, you need to explain why perl ptest is passing in yocto CI pipelines. How can we observe the error on master? Alex On Thu, 27 Mar 2025 at 07:11, Rajendra Desai via lists.openembedded.org <rajendra.desai=emerson.com@lists.openembedded.org> wrote: > > The following perl ptests: > > - dist/ExtUtils-ParseXS/t/001-basic > - dist/ExtUtils-ParseXS/t/002-more > - dist/ExtUtils-ParseXS/t/003-usage > - cpan/ExtUtils-Constant/t/Constant > - cpan/ExtUtils-MakeMaker/t/02-xsdynamic > > are erroring out with: > | /usr/lib/perl/ptest/perl_langinfo.h:8:10: fatal error: > xconfig.h: No such file or directory > | 8 | #include "xconfig.h" > > xconfig.h contains references to the build host architecture and was > removed by commit 2e0f30c46802 ("perl: do not install files that contain > build host specific data") > > However, it is still included from various other places including these > tests, and we are still depending on build host architecture data by > including the patches from perl-cross recipe, a dependency to perl recipe. > > xconfig.h was added back as a copy step in the commit f90922cdeef5 > ("update 5.36.1 -> 5.38.0") but was not added back in perl-ptest include > file. > > Borrowed the logic from the above commit to make a copy of config.h > that is specific to the target architecture. The changes in this commit > fixes the test failures. > > Signed-off-by: Rajendra Desai <rajendra.desai@emerson.com> > --- > meta/recipes-devtools/perl/perl-ptest.inc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc > index 4b4756118c..49d322a848 100644 > --- a/meta/recipes-devtools/perl/perl-ptest.inc > +++ b/meta/recipes-devtools/perl/perl-ptest.inc > @@ -20,6 +20,11 @@ do_install_ptest () { > > ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl > > + # xconfig.h contains references to build host architecture, and yet is included from various other places. > + # To make it reproducible let's make it a copy of config.h patch that is specific to the target architecture. > + # It is believed that the original header is the product of building miniperl (a helper executable built with host compiler). > + cp ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h ${D}${PTEST_PATH}/xconfig.h > + > # Remove build host references from various scattered files... > find "${D}${PTEST_PATH}" \ > \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \ > @@ -44,7 +49,7 @@ do_install_ptest () { > sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst > > # Remove files with host-specific configuration for building native binaries > - rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.h ${D}${PTEST_PATH}/xconfig.sh > + rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.sh > > # create an empty file that is checked for existence by makerel test > touch ${D}${PTEST_PATH}/win32/Makefile > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#213704): https://lists.openembedded.org/g/openembedded-core/message/213704 > Mute This Topic: https://lists.openembedded.org/mt/111899754/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi Alexander, thanks for the reply. I tested that the issue is reproducible on master as well and that is the reason I resubmitted the patch to the master. How I tested: 1. Cloned the Yocto Project repository 2. Configured openembedded-core (targeted to master branch) along with ptest-pkgs 3. Built the qemux86-64 image 4. Ran the ptests (run-ptest) on the built qemux86-64 image 5. 5 of the mentioned tests failed with “No such file or directory” error (for which, I have explained the details in the patch) I am not sure what do you mean by “perl ptest is passing in yocto CI pipelines”. If you are referring to the perl-ptest package, then you would not find issues while building perl or its ptest package, but the issue occurs when running those 5 perl tests on a target (since it would have skipped including xconfig.h file which is needed for those 5 tests to be successful). Regards, Rajendra From: Alexander Kanavin <alex.kanavin@gmail.com> Sent: Thursday, March 27, 2025 3:23 PM To: Desai, Rajendra <rajendra.desai@emerson.com> Cc: openembedded-core@lists.openembedded.org Subject: [EXTERNAL] Re: [OE-core] [PATCH] perl-ptest: copy xconfig data from perl source directory This doesn't address the feedback given previously. Which is: Is the issue occurring on master as well? If so, you need to explain why perl ptest is passing in yocto CI pipelines. How can we observe the error on master? Alex On Thu, 27 Mar 2025 at 07:11, Rajendra Desai via lists.openembedded.org <rajendra.desai=emerson.com@lists.openembedded.org<mailto:rajendra.desai=emerson.com@lists.openembedded.org>> wrote: > > The following perl ptests: > > - dist/ExtUtils-ParseXS/t/001-basic > - dist/ExtUtils-ParseXS/t/002-more > - dist/ExtUtils-ParseXS/t/003-usage > - cpan/ExtUtils-Constant/t/Constant > - cpan/ExtUtils-MakeMaker/t/02-xsdynamic > > are erroring out with: > | /usr/lib/perl/ptest/perl_langinfo.h:8:10: fatal error: > xconfig.h: No such file or directory > | 8 | #include "xconfig.h" > > xconfig.h contains references to the build host architecture and was > removed by commit 2e0f30c46802 ("perl: do not install files that contain > build host specific data") > > However, it is still included from various other places including these > tests, and we are still depending on build host architecture data by > including the patches from perl-cross recipe, a dependency to perl recipe. > > xconfig.h was added back as a copy step in the commit f90922cdeef5 > ("update 5.36.1 -> 5.38.0") but was not added back in perl-ptest include > file. > > Borrowed the logic from the above commit to make a copy of config.h > that is specific to the target architecture. The changes in this commit > fixes the test failures. > > Signed-off-by: Rajendra Desai <rajendra.desai@emerson.com<mailto:rajendra.desai@emerson.com>> > --- > meta/recipes-devtools/perl/perl-ptest.inc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc > index 4b4756118c..49d322a848 100644 > --- a/meta/recipes-devtools/perl/perl-ptest.inc > +++ b/meta/recipes-devtools/perl/perl-ptest.inc > @@ -20,6 +20,11 @@ do_install_ptest () { > > ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl > > + # xconfig.h contains references to build host architecture, and yet is included from various other places. > + # To make it reproducible let's make it a copy of config.h patch that is specific to the target architecture. > + # It is believed that the original header is the product of building miniperl (a helper executable built with host compiler). > + cp ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h ${D}${PTEST_PATH}/xconfig.h > + > # Remove build host references from various scattered files... > find "${D}${PTEST_PATH}" \ > \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \ > @@ -44,7 +49,7 @@ do_install_ptest () { > sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst > > # Remove files with host-specific configuration for building native binaries > - rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.h ${D}${PTEST_PATH}/xconfig.sh > + rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.sh > > # create an empty file that is checked for existence by makerel test > touch ${D}${PTEST_PATH}/win32/Makefile > -- > 2.34.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#213704): https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/213704__;!!OkyjEqkqqe9UhNQ!wjEJSHK1TIHz2yn0Oi1lw3Y-UF75OFnYIaaOb_Mcqh0T7lDj5_xvA-ZdLLpMyQD6k8jsPDw1Q7dsMelsDTHBBYf-Bw$<https://urldefense.com/v3/__https:/lists.openembedded.org/g/openembedded-core/message/213704__;!!OkyjEqkqqe9UhNQ!wjEJSHK1TIHz2yn0Oi1lw3Y-UF75OFnYIaaOb_Mcqh0T7lDj5_xvA-ZdLLpMyQD6k8jsPDw1Q7dsMelsDTHBBYf-Bw$> > Mute This Topic: https://urldefense.com/v3/__https://lists.openembedded.org/mt/111899754/1686489__;!!OkyjEqkqqe9UhNQ!wjEJSHK1TIHz2yn0Oi1lw3Y-UF75OFnYIaaOb_Mcqh0T7lDj5_xvA-ZdLLpMyQD6k8jsPDw1Q7dsMelsDTHW92GUqQ$<https://urldefense.com/v3/__https:/lists.openembedded.org/mt/111899754/1686489__;!!OkyjEqkqqe9UhNQ!wjEJSHK1TIHz2yn0Oi1lw3Y-UF75OFnYIaaOb_Mcqh0T7lDj5_xvA-ZdLLpMyQD6k8jsPDw1Q7dsMelsDTHW92GUqQ$> > Group Owner: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core+owner@lists.openembedded.org> > Unsubscribe: https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!OkyjEqkqqe9UhNQ!wjEJSHK1TIHz2yn0Oi1lw3Y-UF75OFnYIaaOb_Mcqh0T7lDj5_xvA-ZdLLpMyQD6k8jsPDw1Q7dsMelsDTHpsUi45A$<https://urldefense.com/v3/__https:/lists.openembedded.org/g/openembedded-core/unsub__;!!OkyjEqkqqe9UhNQ!wjEJSHK1TIHz2yn0Oi1lw3Y-UF75OFnYIaaOb_Mcqh0T7lDj5_xvA-ZdLLpMyQD6k8jsPDw1Q7dsMelsDTHpsUi45A$> [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
I just run perl's run ptest on poky master to observe what is happening, and: - the tests are not actually erroring out, some of them pass, some of them are skipped - the reported problem is not a missing header, but a missing gcc compiler (which is hardcoded somewhere to oe-core's build environment, not the target environment). Can't exec "x86_64-poky-linux-gcc": No such file or directory at /usr/lib/perl/ptest/dist/ExtUtils-ParseXS/../../lib/ExtUtils/CBuilder/Base.pm line 362. PASS: dist/ExtUtils-ParseXS/t/001-basic Can't exec "x86_64-poky-linux-gcc": No such file or directory at /usr/lib/perl/ptest/dist/ExtUtils-ParseXS/../../lib/ExtUtils/CBuilder/Base.pm line 362. PASS: dist/ExtUtils-ParseXS/t/002-more Can't exec "x86_64-poky-linux-gcc": No such file or directory at /usr/lib/perl/ptest/dist/ExtUtils-ParseXS/../../lib/ExtUtils/CBuilder/Base.pm line 362. PASS: dist/ExtUtils-ParseXS/t/003-usage - additionally: SKIP: cpan/ExtUtils-Constant/t/Constant SKIP: cpan/ExtUtils-MakeMaker/t/02-xsdynamic I'm not sure why you are seeing something different (are you using plain poky with no other layers?), but any fixes must first address the issues observed on the standard ptest build performed in yocto CI, which is the one above. Then we can get to the issue of missing header, if it's uncovered. Alex On Thu, 27 Mar 2025 at 11:51, Desai, Rajendra <rajendra.desai@emerson.com> wrote: > Ran the ptests (run-ptest) on the built qemux86-64 image > 5 of the mentioned tests failed with “No such file or directory” error > (for which, I have explained the details in the patch)
Oh, one more detail, and it's important: which image are you using? The correct one is core-image-ptest-perl. Alex On Thu, 27 Mar 2025 at 12:45, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote: > > I just run perl's run ptest on poky master to observe what is happening, and: > > - the tests are not actually erroring out, some of them pass, some of > them are skipped > - the reported problem is not a missing header, but a missing gcc > compiler (which is hardcoded somewhere to oe-core's build environment, > not the target environment). > > Can't exec "x86_64-poky-linux-gcc": No such file or directory at > /usr/lib/perl/ptest/dist/ExtUtils-ParseXS/../../lib/ExtUtils/CBuilder/Base.pm > line 362. > PASS: dist/ExtUtils-ParseXS/t/001-basic > Can't exec "x86_64-poky-linux-gcc": No such file or directory at > /usr/lib/perl/ptest/dist/ExtUtils-ParseXS/../../lib/ExtUtils/CBuilder/Base.pm > line 362. > PASS: dist/ExtUtils-ParseXS/t/002-more > Can't exec "x86_64-poky-linux-gcc": No such file or directory at > /usr/lib/perl/ptest/dist/ExtUtils-ParseXS/../../lib/ExtUtils/CBuilder/Base.pm > line 362. > PASS: dist/ExtUtils-ParseXS/t/003-usage > > - additionally: > SKIP: cpan/ExtUtils-Constant/t/Constant > SKIP: cpan/ExtUtils-MakeMaker/t/02-xsdynamic > > I'm not sure why you are seeing something different (are you using > plain poky with no other layers?), but any fixes must first address > the issues observed on the standard ptest build performed in yocto CI, > which is the one above. Then we can get to the issue of missing > header, if it's uncovered. > > Alex > On Thu, 27 Mar 2025 at 11:51, Desai, Rajendra > <rajendra.desai@emerson.com> wrote: > > Ran the ptests (run-ptest) on the built qemux86-64 image > > 5 of the mentioned tests failed with “No such file or directory” error > > (for which, I have explained the details in the patch) > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#213726): https://lists.openembedded.org/g/openembedded-core/message/213726 > Mute This Topic: https://lists.openembedded.org/mt/111899754/1686489 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc index 4b4756118c..49d322a848 100644 --- a/meta/recipes-devtools/perl/perl-ptest.inc +++ b/meta/recipes-devtools/perl/perl-ptest.inc @@ -20,6 +20,11 @@ do_install_ptest () { ln -sf ${bindir}/perl ${D}${PTEST_PATH}/t/perl + # xconfig.h contains references to build host architecture, and yet is included from various other places. + # To make it reproducible let's make it a copy of config.h patch that is specific to the target architecture. + # It is believed that the original header is the product of building miniperl (a helper executable built with host compiler). + cp ${D}${libdir}/perl5/${PV}/${TARGET_ARCH}-linux/CORE/config.h ${D}${PTEST_PATH}/xconfig.h + # Remove build host references from various scattered files... find "${D}${PTEST_PATH}" \ \( -name '*.PL' -o -name 'myconfig' -o -name 'cflags' -o -name '*.pl' -o -name '*.sh' -o -name '*.pm' \ @@ -44,7 +49,7 @@ do_install_ptest () { sed -i -e '/Autogenerated starting on/d' ${D}${PTEST_PATH}/lib/unicore/mktables.lst # Remove files with host-specific configuration for building native binaries - rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.h ${D}${PTEST_PATH}/xconfig.sh + rm ${D}${PTEST_PATH}/Makefile.config ${D}${PTEST_PATH}/xconfig.sh # create an empty file that is checked for existence by makerel test touch ${D}${PTEST_PATH}/win32/Makefile
The following perl ptests: - dist/ExtUtils-ParseXS/t/001-basic - dist/ExtUtils-ParseXS/t/002-more - dist/ExtUtils-ParseXS/t/003-usage - cpan/ExtUtils-Constant/t/Constant - cpan/ExtUtils-MakeMaker/t/02-xsdynamic are erroring out with: | /usr/lib/perl/ptest/perl_langinfo.h:8:10: fatal error: xconfig.h: No such file or directory | 8 | #include "xconfig.h" xconfig.h contains references to the build host architecture and was removed by commit 2e0f30c46802 ("perl: do not install files that contain build host specific data") However, it is still included from various other places including these tests, and we are still depending on build host architecture data by including the patches from perl-cross recipe, a dependency to perl recipe. xconfig.h was added back as a copy step in the commit f90922cdeef5 ("update 5.36.1 -> 5.38.0") but was not added back in perl-ptest include file. Borrowed the logic from the above commit to make a copy of config.h that is specific to the target architecture. The changes in this commit fixes the test failures. Signed-off-by: Rajendra Desai <rajendra.desai@emerson.com> --- meta/recipes-devtools/perl/perl-ptest.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)