Skip to contentSkip to conversation

xfconfig: use sysroot and target perl

PATCH In review Ulf Samuelsson 4 participants 4 messages Dec 7, 2013 – Mar 30, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfconfig: use sysroot and target perl

xfconf-4.10.0 does not use OE sysroot as is.
--with-sysroot=yes
will make configure run CC --print-sysroot
and use that.

When searching the PATH for perl, no target perl is found, since PATH does not contain any reference.
Instead native perl is found, and if certain perl packages are installed on the host machine, the xfconf perl support is enabled which may cause the build to fail on 64 bit hosts. If the perl packages are not installed on the host, then perl support in xfconf is disabled, and the xfconf build will succeed, even on 64 bit hosts.

If native perl is found, and the perl packages are available on the host, the perl support is enabled.

Since native perl is used, the native linker is used to link the resulting *target* code.

The perl support requires some libraries, which are built for the target. If the host is 64 bit (x86_64) and the target is 32 bit (ARM?), there is a mismatch which is detected by the linker,
and the libraries found are rejected.

If the host does not have the correct libraries,
then the xfconf build fails.
If the host has the correct libraries, then the linker will try to link host libraries with the target application.

The patch will define PERL as the target perl.
This means that configure will look for the required perl packages in the target sysroot, instead of in the native filesystem.

The patch has been tested in Angstrom master, which does not build the required perl packages, and thus perl support in xfconf is disabled, and the build succeeds.

A simpler way to do this, proposed by Charles Ash <[email protected]> is to simply disable the perl-support in xfconf.
This patch will be better, if ever the support for the needed perl packages is added to the OpenEmbedded/Angstrom build.

---
 meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb +5 -1
index 4ea2b88..6d5bf57 100644
@@ -2,10 +2,14 @@ DESCRIPTION = "Xfce configuration daemon and utilities"
 SECTION = "x11/wm"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-DEPENDS = "dbus-glib libxfce4util perl-native"
+DEPENDS = "dbus-glib libxfce4util perl"
+PR="r1"
 
 inherit xfce
 
+EXTRA_OECONF += "PERL=${STAGING_DIR_TARGET}/usr/bin/perl"
+EXTRA_OECONF += "--with-sysroot=yes"
+
 SRC_URI += "file://0001-Simplify-checks.patch"
 SRC_URI[md5sum] = "4ed48150a03fb5f42b455494307b7f28"
 SRC_URI[sha256sum] = "175219a441cc7d0f210bbd1a3b0abba41598627cd9db27235811400c3e100576"
Signature · 1 line
1.7.9.5
Tested-by on v1 1/1
#1 lore raw

Hi,

Thanks Ulf.

I just tried this on my dora branch instead of my disable-perl bbappend and it worked for me.

--Ash

Quoted 76 lines · Ulf Samuelsson

xfconf-4.10.0 does not use OE sysroot as is.
--with-sysroot=yes
will make configure run CC --print-sysroot
and use that.

When searching the PATH for perl, no target perl is found, since PATH does not contain any reference.
Instead native perl is found, and if certain perl packages are installed on the host machine, the xfconf perl support is enabled which may cause the build to fail on 64 bit hosts. If the perl packages are not installed on the host, then perl support in xfconf is disabled, and the xfconf build will succeed, even on 64 bit hosts.

If native perl is found, and the perl packages are available on the host, the perl support is enabled.

Since native perl is used, the native linker is used to link the resulting *target* code.

The perl support requires some libraries, which are built for the target. If the host is 64 bit (x86_64) and the target is 32 bit (ARM?), there is a mismatch which is detected by the linker,
and the libraries found are rejected.

If the host does not have the correct libraries,
then the xfconf build fails.
If the host has the correct libraries, then the linker will try to link host libraries with the target application.

The patch will define PERL as the target perl.
This means that configure will look for the required perl packages in the target sysroot, instead of in the native filesystem.

The patch has been tested in Angstrom master, which does not build the required perl packages, and thus perl support in xfconf is disabled, and the build succeeds.

A simpler way to do this, proposed by Charles Ash <[email protected]> is to simply disable the perl-support in xfconf.
This patch will be better, if ever the support for the needed perl packages is added to the OpenEmbedded/Angstrom build.

---
 meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb +5 -2
index 4ea2b88..6d5bf57 100644
@@ -2,10 +2,14 @@ DESCRIPTION = "Xfce configuration daemon and utilities"
 SECTION = "x11/wm"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-DEPENDS = "dbus-glib libxfce4util perl-native"
+DEPENDS = "dbus-glib libxfce4util perl"
+PR="r1"
 
 inherit xfce
 
+EXTRA_OECONF += "PERL=${STAGING_DIR_TARGET}/usr/bin/perl"
+EXTRA_OECONF += "--with-sysroot=yes"
+
 SRC_URI += "file://0001-Simplify-checks.patch"
 SRC_URI[md5sum] = "4ed48150a03fb5f42b455494307b7f28"
 SRC_URI[sha256sum] = "175219a441cc7d0f210bbd1a3b0abba41598627cd9db27235811400c3e100576"
--

1.7.9.5

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
In reply to Ulf Samuelsson

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ulf Samuelsson schreef op 07-12-13 23:29:

Quoted 45 lines

xfconf-4.10.0 does not use OE sysroot as is. --with-sysroot=yes will make configure run CC --print-sysroot and use that.

When searching the PATH for perl, no target perl is found, since PATH does not contain any reference. Instead native perl is found, and if certain perl packages are installed on the host machine, the xfconf perl support is enabled which may cause the build to fail on 64 bit hosts. If the perl packages are not installed on the host, then perl support in xfconf is disabled, and the xfconf build will succeed, even on 64 bit hosts.

If native perl is found, and the perl packages are available on the host, the perl support is enabled.

Since native perl is used, the native linker is used to link the resulting *target* code.

The perl support requires some libraries, which are built for the target. If the host is 64 bit (x86_64) and the target is 32 bit (ARM?), there is a mismatch which is detected by the linker, and the libraries found are rejected.

If the host does not have the correct libraries, then the xfconf build fails. If the host has the correct libraries, then the linker will try to link host libraries with the target application.

The patch will define PERL as the target perl. This means that configure will look for the required perl packages in the target sysroot, instead of in the native filesystem.

The patch has been tested in Angstrom master, which does not build the required perl packages, and thus perl support in xfconf is disabled, and the build succeeds.

A simpler way to do this, proposed by Charles Ash <[email protected]> is to simply disable the perl-support in xfconf. This patch will be better, if ever the support for the needed perl packages is added to the OpenEmbedded/Angstrom build.

meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb | 6 +++++- 1 file
changed, 5 insertions(+), 1 deletion(-)

(quoted diff) +0 -0
Quoted 8 lines

b/meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb index 4ea2b88..6d5bf57 100644 --- a/meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb +++ b/meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb @@ -2,10 +2,14 @@ DESCRIPTION = "Xfce configuration daemon and utilities" SECTION = "x11/wm" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -DEPENDS = "dbus-glib libxfce4util perl-native" +DEPENDS = "dbus-glib libxfce4util perl" +PR="r1"

PR is deprecated and shouldn't be used anymore

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFSpEsoMkyGM64RGpERAlIhAJ4kMnyd5FMTUs9Cn4Vq7h9pSh+UOACgk9cw eLnKna8CgytIcQ2+jalZA7I=
=5hcf
-----END PGP SIGNATURE-----

#3 lore raw
In reply to Ulf Samuelsson
Quoted 20 lines · Ulf Samuelsson

xfconf-4.10.0 does not use OE sysroot as is.
--with-sysroot=yes
will make configure run CC --print-sysroot
and use that.

---
 meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb +1 -1
index 4ea2b88..6d5bf57 100644
@@ -2,10 +2,14 @@ DESCRIPTION = "Xfce configuration daemon and utilities"
 SECTION = "x11/wm"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-DEPENDS = "dbus-glib libxfce4util perl-native"
+DEPENDS = "dbus-glib libxfce4util perl"

meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb DESCRIPTION = "Xfce configuration daemon and utilities" · line 15

Quoted 10 lines
meta-xfce/recipes-xfce/xfconf/xfconf_4.10.0.bb +4 -0
+PR="r1"
 
 inherit xfce
 
+EXTRA_OECONF += "PERL=${STAGING_DIR_TARGET}/usr/bin/perl"
+EXTRA_OECONF += "--with-sysroot=yes"
+
 SRC_URI += "file://0001-Simplify-checks.patch"
 SRC_URI[md5sum] = "4ed48150a03fb5f42b455494307b7f28"
 SRC_URI[sha256sum] = "175219a441cc7d0f210bbd1a3b0abba41598627cd9db27235811400c3e100576"

This patch is causing the build to emit a QA warning:

xfconf-4.10.0: xfconf: configure was passed unrecognised options: --with-sysroot

Is this really the right option to supply for what you're trying to do?

http://logs.nslu2-linux.org/buildlogs/oe/oe-shr-core-branches/log.world.20140329_001343.log/qa.log

On my machine this package builds with this option (--with-sysroot) removed, but I realize that testing on one machine is probably not sufficient.