Skip to contentSkip to conversation

xen: Enable compilation with external source

RFC In review Alistair Francis 4 participants 6 messages Nov 17, 2017 – Nov 23, 2017

lore
Share & tools
lore
#0 lore raw

RFC 1/1 xen: Enable compilation with external source

When building Xen from an external source the compile step fails as there is no Makefile (or anything else) copied into the Yocto build directories.

---
This seems really nasty, but it's the only way I can get external source build working.

 recipes-extended/xen/xen.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +3 -1
index cb314f8..7a54416 100644
@@ -901,7 +901,6 @@ EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
 EXTRA_OEMAKE += "debug=n"
 
 do_configure() {
-
     #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually
     if [ "${XSM_ENABLED}" = "1" ]; then
         echo "XSM_ENABLE := y" > ${S}/.config
@@ -920,6 +919,9 @@ do_configure() {
 }
 
 do_compile() {
+    # If using external source we need to copy the code in
+    cp -rf ${S}/* ${B}/
+
     # workaround for build bug when CFLAGS is exported
     # https://www.mail-archive.com/[email protected]/msg67822.html
     unset CFLAGS
Signature · 1 line
2.14.1
#1 lore raw
Quoted 4 lines · Alistair Francis

When building Xen from an external source the compile step fails as there is no Makefile (or anything else) copied into the Yocto build directories.

I can't say that I have an opinion on this, since I'm not up to speed on all the moving parts.

I haven't seen any replies from the Xen folks, so replying in the hopes that they'll see this and notice the thread.

One question though. When you say 'external source' are you talking about the oe-core "externalsrc" concept, or some Xen specific thing ?

Bruce

Quoted 41 lines

---
This seems really nasty, but it's the only way I can get external source build working.

 recipes-extended/xen/xen.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +0 -1
index cb314f8..7a54416 100644
@@ -901,7 +901,6 @@ EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
 EXTRA_OEMAKE += "debug=n"
 
 do_configure() {
-
     #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done

manually

     if [ "${XSM_ENABLED}" = "1" ]; then
         echo "XSM_ENABLE := y" > ${S}/.config
recipes-extended/xen/xen.inc +3 -1
@@ -920,6 +919,9 @@ do_configure() {
 }
 
 do_compile() {
+    # If using external source we need to copy the code in
+    cp -rf ${S}/* ${B}/
+
     # workaround for build bug when CFLAGS is exported
     # https://www.mail-archive.com/[email protected]/msg67822.html
     unset CFLAGS
--

2.14.1

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
#2 lore raw
Quoted 8 lines · Bruce Ashfield
Quoted 4 lines · Alistair Francis

When building Xen from an external source the compile step fails as there is no Makefile (or anything else) copied into the Yocto build directories.

Quoted 5 lines

I can't say that I have an opinion on this, since I'm not up to speed on all the moving parts.

I haven't seen any replies from the Xen folks, so replying in the hopes that they'll see this and notice the thread.

Hello - thanks for the nudge.

Quoted 2 lines

One question though. When you say 'external source' are you talking about the oe-core "externalsrc" concept, or some Xen specific thing ?

I've never used the externalsrc class, so this review is a bit tricky.

Alistair: There's a comment at the top of the externalsrc.bbclass file that indicates that a second variable (EXTERNALSRC_BUILD_pn-myrecipe) could be used to set the build directory to be the same as the source directory -- does using that give the behaviour that you're looking for, without needing this cp added to do_compile?

Christopher

Quoted 58 lines

Bruce

Quoted 36 lines

---
This seems really nasty, but it's the only way I can get external source build working.

 recipes-extended/xen/xen.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +0 -1
index cb314f8..7a54416 100644
@@ -901,7 +901,6 @@ EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
 EXTRA_OEMAKE += "debug=n"
 
 do_configure() {
-
     #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done

manually

     if [ "${XSM_ENABLED}" = "1" ]; then
         echo "XSM_ENABLE := y" > ${S}/.config
recipes-extended/xen/xen.inc +3 -1
@@ -920,6 +919,9 @@ do_configure() {
 }
 
 do_compile() {
+    # If using external source we need to copy the code in
+    cp -rf ${S}/* ${B}/
+
     # workaround for build bug when CFLAGS is exported
     # https://www.mail-archive.com/[email protected]/msg67822.html
     unset CFLAGS
--

2.14.1

Quoted 5 lines

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

#3 lore raw
Quoted 10 lines · Christopher Clark
Quoted 8 lines · Bruce Ashfield
Quoted 4 lines · Alistair Francis

When building Xen from an external source the compile step fails as there is no Makefile (or anything else) copied into the Yocto build directories.

Quoted 10 lines
Quoted 5 lines

I can't say that I have an opinion on this, since I'm not up to speed on all the moving parts.

I haven't seen any replies from the Xen folks, so replying in the hopes that they'll see this and notice the thread.

Hello - thanks for the nudge.

Quoted 2 lines

One question though. When you say 'external source' are you talking about the oe-core "externalsrc" concept, or some Xen specific thing ?

I'm talking about the OE external source, it's not a Xen specific thing.

Quoted 8 lines

I've never used the externalsrc class, so this review is a bit tricky.

Alistair: There's a comment at the top of the externalsrc.bbclass file that indicates that a second variable (EXTERNALSRC_BUILD_pn-myrecipe) could be used to set the build directory to be the same as the source directory -- does using that give the behaviour that you're looking for, without needing this cp added to do_compile?

Ah, that is what I needed. That at least allows me to build Xen, but I see all these weird QA issues now.

WARNING: xen-4.9.0-r0 do_package: QA Issue: xen: Files/directories
were installed but not shipped in any package:
/usr/lib/libxentoolcore.so.1.0
/usr/lib/libxentoolcore.so
/usr/lib/libxentoolcore.so.1
/usr/sbin/xen-diag
/usr/share/pkgconfig/xentoolcore.pc
Please set FILES such that these items are packaged. Alternatively if
they are unneeded, avoid installing them or delete them within
do_install.
xen: 5 installed and not shipped files. [installed-vs-shipped]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenlight.so.4.10.0 contained in package xen-libxenlight
requires libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-libxenlight? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/xen/bin/libxl-save-helper contained in package xen-xl
requires libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-xl? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxencall.so.1.0 contained in package xen-libxencall
requires libxentoolcore.so.1(VERS_1.0)(64bit), but no providers found
in RDEPENDS_xen-libxencall? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxencall.so.1.0 contained in package xen-libxencall
requires libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-libxencall? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenstore.so.3.0.3 contained in package xen-libxenstore
requires libxentoolcore.so.1(VERS_1.0)(64bit), but no providers found
in RDEPENDS_xen-libxenstore? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenstore.so.3.0.3 contained in package xen-libxenstore
requires libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-libxenstore? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenevtchn.so.1.1 contained in package xen-libxenevtchn
requires libxentoolcore.so.1(VERS_1.0)(64bit), but no providers found
in RDEPENDS_xen-libxenevtchn? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenevtchn.so.1.1 contained in package xen-libxenevtchn
requires libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-libxenevtchn? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxengnttab.so.1.1 contained in package xen-libxengnttab
requires libxentoolcore.so.1(VERS_1.0)(64bit), but no providers found
in RDEPENDS_xen-libxengnttab? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxengnttab.so.1.1 contained in package xen-libxengnttab
requires libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-libxengnttab? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue: /usr/bin/xenstore-write
contained in package xen-xenstore requires
libxentoolcore.so.1()(64bit), but no providers found in
RDEPENDS_xen-xenstore? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxendevicemodel.so.1.1 contained in package
xen-libxendevicemodel requires libxentoolcore.so.1(VERS_1.0)(64bit),
but no providers found in RDEPENDS_xen-libxendevicemodel? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxendevicemodel.so.1.1 contained in package
xen-libxendevicemodel requires libxentoolcore.so.1()(64bit), but no
providers found in RDEPENDS_xen-libxendevicemodel? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenforeignmemory.so.1.2 contained in package
xen-libxenforeignmemory requires libxentoolcore.so.1(VERS_1.0)(64bit),
but no providers found in RDEPENDS_xen-libxenforeignmemory?
[file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA Issue:
/usr/lib/libxenforeignmemory.so.1.2 contained in package
xen-libxenforeignmemory requires libxentoolcore.so.1()(64bit), but no
providers found in RDEPENDS_xen-libxenforeignmemory? [file-rdeps]
ERROR: xen-4.9.0-r0 do_package_qa: QA run found fatal errors. Please
consider fixing them.
ERROR: xen-4.9.0-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in:
/scratch/alistai/yocto/oe-master/build/tmp-glibc/work/aarch64-oe-linux/xen/4.9.0-r0/temp/log.do_package_qa.5847
ERROR: Task (/scratch/alistai/yocto/oe-master/meta-virtualization/recipes-extended/xen/xen_4.9.0.bb:do_package_qa) failed with exit code '1'

I'll have to dig into what is going on here. It looks like this patch isn't required though.

Thanks,
Alistair

Quoted 67 lines

Christopher

Quoted 52 lines

Bruce

Quoted 36 lines

---
This seems really nasty, but it's the only way I can get external source build working.

 recipes-extended/xen/xen.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-extended/xen/xen.inc +0 -1
index cb314f8..7a54416 100644
@@ -901,7 +901,6 @@ EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
 EXTRA_OEMAKE += "debug=n"
 
 do_configure() {
-
     #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done

manually

     if [ "${XSM_ENABLED}" = "1" ]; then
         echo "XSM_ENABLE := y" > ${S}/.config
recipes-extended/xen/xen.inc +3 -1
@@ -920,6 +919,9 @@ do_configure() {
 }
 
 do_compile() {
+    # If using external source we need to copy the code in
+    cp -rf ${S}/* ${B}/
+
     # workaround for build bug when CFLAGS is exported
     # https://www.mail-archive.com/[email protected]/msg67822.html
     unset CFLAGS
--

2.14.1

Quoted 5 lines

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

Quoted 6 lines

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

#4 lore raw
Quoted 26 lines · Alistair Francis
Quoted 6 lines · Christopher Clark
Quoted 4 lines · Bruce Ashfield
Quoted 1 line · Alistair Francis
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

When building Xen from an external source the compile step fails as there is no Makefile (or anything else) copied into the Yocto build directories.

When you say 'external source' are you talking about the oe-core "externalsrc" concept, or some Xen specific thing ?

I'm talking about the OE external source, it's not a Xen specific thing.

Quoted 5 lines

There's a comment at the top of the externalsrc.bbclass file that indicates that a second variable (EXTERNALSRC_BUILD_pn-myrecipe) could be used to set the build directory to be the same as the source directory -- does using that give the behaviour that you're looking for, without needing this cp added to do_compile?

Ah, that is what I needed. That at least allows me to build Xen, but I see all these weird QA issues now.

Quoted 10 lines

WARNING: xen-4.9.0-r0 do_package: QA Issue: xen: Files/directories were installed but not shipped in any package:
/usr/lib/libxentoolcore.so.1.0 /usr/lib/libxentoolcore.so
/usr/lib/libxentoolcore.so.1
/usr/sbin/xen-diag
/usr/share/pkgconfig/xentoolcore.pc
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.

OK, these errors are just because the Xen tree that you're building with is a Xen 4.10 RC, whereas the current meta-virtualization recipe is written for Xen 4.9 and earlier.

Xen 4.10 introduces a new library: xentoolcore, which needs to be packaged, so xen.inc needs some added statements. If you look at the sections in xen.inc that handle "xentoollog", that looks similar to what will be needed for xentoolcore. In addition to that, "xen-diag" probably needs one line to add it to the -misc package, the same way that "xenlockprof" is packaged in there.

Christopher

#5 lore raw
Quoted 38 lines · Christopher Clark
Quoted 26 lines · Alistair Francis
Quoted 6 lines · Christopher Clark
Quoted 4 lines · Bruce Ashfield
Quoted 1 line · Alistair Francis
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

When building Xen from an external source the compile step fails as there is no Makefile (or anything else) copied into the Yocto build directories.

When you say 'external source' are you talking about the oe-core "externalsrc" concept, or some Xen specific thing ?

I'm talking about the OE external source, it's not a Xen specific thing.

Quoted 5 lines

There's a comment at the top of the externalsrc.bbclass file that indicates that a second variable (EXTERNALSRC_BUILD_pn-myrecipe) could be used to set the build directory to be the same as the source directory -- does using that give the behaviour that you're looking for, without needing this cp added to do_compile?

Ah, that is what I needed. That at least allows me to build Xen, but I see all these weird QA issues now.

Quoted 10 lines

WARNING: xen-4.9.0-r0 do_package: QA Issue: xen: Files/directories were installed but not shipped in any package:
/usr/lib/libxentoolcore.so.1.0 /usr/lib/libxentoolcore.so
/usr/lib/libxentoolcore.so.1
/usr/sbin/xen-diag
/usr/share/pkgconfig/xentoolcore.pc
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.

Quoted 3 lines

OK, these errors are just because the Xen tree that you're building with is a Xen 4.10 RC, whereas the current meta-virtualization recipe is written for Xen 4.9 and earlier.

Ah, that was it.

Quoted 7 lines

Xen 4.10 introduces a new library: xentoolcore, which needs to be packaged, so xen.inc needs some added statements. If you look at the sections in xen.inc that handle "xentoollog", that looks similar to what will be needed for xentoolcore. In addition to that, "xen-diag" probably needs one line to add it to the -misc package, the same way that "xenlockprof" is packaged in there.

Ok, I'll look into this next week.

Thanks,
Alistair

Quoted 2 lines

Christopher