From febbf4963e0c6d264e0862c297c919684861f512 Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Tue, 29 Oct 2019 04:57:34 +0000 Subject: [PATCH] fix: use default search path In previous versions of the toolchain we had a misconfigured linker that did not have /usr/lib in its search path. This brings in a version of the toolchain that does, and removes all the hacks we did to work around this. Signed-off-by: Andrew Rynhard --- Pkgfile | 2 +- containerd/pkg.yaml | 2 -- dosfstools/pkg.yaml | 2 +- eudev/pkg.yaml | 2 +- kmod/pkg.yaml | 4 ++-- musl/pkg.yaml | 7 +++++-- runc/pkg.yaml | 2 -- socat/pkg.yaml | 3 +-- util-linux/pkg.yaml | 2 +- xfsprogs/pkg.yaml | 2 +- 10 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Pkgfile b/Pkgfile index 44df08b60..2ebaae346 100644 --- a/Pkgfile +++ b/Pkgfile @@ -3,4 +3,4 @@ format: v1alpha2 vars: - TOOLS_IMAGE: docker.io/autonomy/tools:8fdb32d + TOOLS_IMAGE: docker.io/autonomy/tools:d048c99 diff --git a/containerd/pkg.yaml b/containerd/pkg.yaml index 768aaaf5e..02d5797c9 100644 --- a/containerd/pkg.yaml +++ b/containerd/pkg.yaml @@ -19,8 +19,6 @@ steps: - | export PKG_CONFIG_PATH=/usr/lib/pkgconfig export CC=/toolchain/bin/cc - export CGO_CFLAGS="-L/usr/lib -I/usr/include" - export CGO_LDFLAGS="-L/usr/lib -I/usr/include" # This is required due to "loadinternal: cannot find runtime/cgo". export CGO_ENABLED=1 export GOPATH=/go diff --git a/dosfstools/pkg.yaml b/dosfstools/pkg.yaml index 302ecb116..c56dbe805 100644 --- a/dosfstools/pkg.yaml +++ b/dosfstools/pkg.yaml @@ -17,7 +17,7 @@ steps: cd build ../configure \ - --prefix=/ \ + --prefix=/usr \ --enable-compat-symlinks build: - | diff --git a/eudev/pkg.yaml b/eudev/pkg.yaml index 02d9bc6e7..b3f6a5b54 100644 --- a/eudev/pkg.yaml +++ b/eudev/pkg.yaml @@ -3,6 +3,7 @@ variant: scratch shell: /toolchain/bin/bash dependencies: - stage: base + - stage: util-linux steps: - sources: - url: https://dev.gentoo.org/~blueness/eudev/eudev-3.2.8.tar.gz @@ -19,7 +20,6 @@ steps: cat > config.cache << "EOF" HAVE_BLKID=1 BLKID_LIBS="-lblkid" - BLKID_CFLAGS="-I${TOOLCHAIN}/include" EOF mkdir build diff --git a/kmod/pkg.yaml b/kmod/pkg.yaml index 9dfa4a8de..d6e24bb85 100644 --- a/kmod/pkg.yaml +++ b/kmod/pkg.yaml @@ -16,7 +16,7 @@ steps: mkdir build cd build ../configure \ - --prefix=/ + --prefix=/usr build: - | cd build @@ -25,7 +25,7 @@ steps: - | cd build make DESTDIR=/rootfs install - for target in depmod insmod modinfo modprobe rmmod; do ln -s ../bin/kmod /rootfs/bin/$target; done + for target in depmod insmod modinfo modprobe rmmod; do ln -s ../usr/bin/kmod /rootfs/usr/bin/$target; done finalize: - from: /rootfs to: / diff --git a/musl/pkg.yaml b/musl/pkg.yaml index cc2b57430..611c9ff5b 100644 --- a/musl/pkg.yaml +++ b/musl/pkg.yaml @@ -21,9 +21,12 @@ steps: mkdir build cd build + # From https://www.musl-libc.org/doc/1.0.0/manual.html: + # $(syslibdir), $(includedir), and $(libdir) refer to the paths + # chosen at build time (by default, /lib, $(prefix)/include, and + # $(prefix)/lib, respectively) ../configure \ - --prefix=/ \ - --syslibdir=/lib \ + --prefix=/usr build: - | cd build diff --git a/runc/pkg.yaml b/runc/pkg.yaml index 9ab1f049c..7ccb6def9 100644 --- a/runc/pkg.yaml +++ b/runc/pkg.yaml @@ -24,8 +24,6 @@ steps: export PATH=${PATH}:/${TOOLCHAIN}/go/bin export PKG_CONFIG_PATH=/usr/lib/pkgconfig export CC=/toolchain/bin/cc - export CGO_CFLAGS="-L/usr/lib -I/usr/include" - export CGO_LDFLAGS="-L/usr/lib -I/usr/include" # This is required due to "loadinternal: cannot find runtime/cgo". export CGO_ENABLED=1 make EXTRA_LDFLAGS="-w -s" BUILDTAGS="seccomp" COMMIT=d736ef14f0288d6993a1845745d6756cfc9ddd5a runc diff --git a/socat/pkg.yaml b/socat/pkg.yaml index bc83a85c6..ae0ea3202 100644 --- a/socat/pkg.yaml +++ b/socat/pkg.yaml @@ -15,8 +15,7 @@ steps: tar -xzf socat.tar.gz --strip-components=1 ./configure \ - --prefix=/usr \ - LIBS="-L/usr/lib" + --prefix=/usr build: - | make -j $(nproc) diff --git a/util-linux/pkg.yaml b/util-linux/pkg.yaml index 771e85b31..e4067237a 100644 --- a/util-linux/pkg.yaml +++ b/util-linux/pkg.yaml @@ -16,7 +16,7 @@ steps: mkdir build cd build ../configure \ - --prefix=/ \ + --prefix=/usr \ --without-python \ --disable-makeinstall-chown \ --without-systemdsystemunitdir \ diff --git a/xfsprogs/pkg.yaml b/xfsprogs/pkg.yaml index 8f85d6bdc..43327f2f5 100644 --- a/xfsprogs/pkg.yaml +++ b/xfsprogs/pkg.yaml @@ -15,7 +15,7 @@ steps: tar -xJf xfsprogs.tar.xz --strip-components=1 ./configure \ - --prefix=/ \ + --prefix=/usr \ --enable-gettext=no build: - |