Skip to contentSkip to conversation

host-fakeroot: re-run autotools to fix build on ppc64le host

PATCH New Stewart Smith 3 participants 3 messages Mar 3, 2016 – May 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 host-fakeroot: re-run autotools to fix build on ppc64le host

When building on ppc64le host (notably Ubuntu 14.04, where this was reported), the configure/libtool combination in fakeroot would incorrectly detect that ld doesn't know how to build shared libraries. Instead of checking for ppc64le libs, it was checking if we could build *big* endian libraries, which the native Ubuntu toolchain on Ubuntu 14.04 cannot. The end result would be that you wouldn't get libfakeroot.so, causing a build failure later on.

However, if we rerun autotools, this works. Additionally, due to the strange way that fakeroot builds, we need to mkdir build-aux as this directory does not exist in the original source package.

With this patch, you can now successfully build OpenPower firmware (which uses buildroot infrastructure) on an Ubuntu 14.04 ppc64le system.

---
 package/fakeroot/fakeroot.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/fakeroot/fakeroot.mk +7 -0
index 3f1c803..1f485f4 100644
@@ -9,5 +9,12 @@ FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.bz2
 FAKEROOT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/f/fakeroot
 FAKEROOT_LICENSE = GPLv3+
 FAKEROOT_LICENSE_FILES = COPYING
+HOST_FAKEROOT_AUTORECONF=YES
+
+define HOST_FAKEROOT_POST_PATCH_FIXUP
+	mkdir $(HOST_FAKEROOT_DIR)/build-aux
+endef
+
+HOST_FAKEROOT_POST_PATCH_HOOKS += HOST_FAKEROOT_POST_PATCH_FIXUP
 
 $(eval $(host-autotools-package))
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 host-fakeroot: re-run autotools to fix build on ppc64le host

Dear Stewart Smith,

Quoted 12 lines · Stewart Smith

When building on ppc64le host (notably Ubuntu 14.04, where this was reported), the configure/libtool combination in fakeroot would incorrectly detect that ld doesn't know how to build shared libraries. Instead of checking for ppc64le libs, it was checking if we could build *big* endian libraries, which the native Ubuntu toolchain on Ubuntu 14.04 cannot. The end result would be that you wouldn't get libfakeroot.so, causing a build failure later on.

However, if we rerun autotools, this works. Additionally, due to the strange way that fakeroot builds, we need to mkdir build-aux as this directory does not exist in the original source package.

Quoted 6 lines

With this patch, you can now successfully build OpenPower firmware (which uses buildroot infrastructure) on an Ubuntu 14.04 ppc64le system.

I understand the issue, but I don't really like the solution, because it means that from now on, host-autoconf, host-automake and host-libtool are always going to be built as dependencies of host-fakeroot, making a "minimal" build longer.

Unfortunately, I don't have a lot of other proposals to make, except maybe seeing if there is a more recent version of fakeroot that has an already re-generated configure script that works for you.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 host-fakeroot: re-run autotools to fix build on ppc64le host

Hello Thomas,

Quoted 20 lines · Thomas Petazzoni
Quoted 12 lines · Stewart Smith

When building on ppc64le host (notably Ubuntu 14.04, where this was reported), the configure/libtool combination in fakeroot would incorrectly detect that ld doesn't know how to build shared libraries. Instead of checking for ppc64le libs, it was checking if we could build *big* endian libraries, which the native Ubuntu toolchain on Ubuntu 14.04 cannot. The end result would be that you wouldn't get libfakeroot.so, causing a build failure later on.

However, if we rerun autotools, this works. Additionally, due to the strange way that fakeroot builds, we need to mkdir build-aux as this directory does not exist in the original source package.

Quoted 6 lines

With this patch, you can now successfully build OpenPower firmware (which uses buildroot infrastructure) on an Ubuntu 14.04 ppc64le system.

Quoted 8 lines

I understand the issue, but I don't really like the solution, because it means that from now on, host-autoconf, host-automake and host-libtool are always going to be built as dependencies of host-fakeroot, making a "minimal" build longer.

Unfortunately, I don't have a lot of other proposals to make, except maybe seeing if there is a more recent version of fakeroot that has an already re-generated configure script that works for you.

I'm updating the OpenPower firmware builds to use 2016.05 and came across Stewarts patch in our tree. It would be good to get a fix upstream.

Would you take a patch to update the autotools generated files in fakeroot? This way we can build our firmware on the systems that they run on, without anyone having to spend the extra time building.

Cheers,

Joel