You are not logged in.
I am trying to update the armv7l packages in the AUR, specifically the bootstrap package, but am hitting this error upon building:
...
checking for suffix of object files... configure: error: in `/build/armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/armv7l-unknown-linux-gnueabihf/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make: *** [Makefile:12770: configure-target-libgcc] Error 1
Upon inspecting config.log, it seems that the errors are around invoking an executable with bad options. See the complete log here.
Any thoughts are welcomed.
Here is the PKGBUILD:
# Maintainer: Anatol Pomozov <x@gmail.com>
# Maintainer: Eli Schwartz <x@archlinux.org>
# Maintainer: Christer Solskogen <x@gmail.com>
# Build order: armv7l-binutils -> armv7l-linux-api-headers -> armv7l-gcc-bootstrap -> armv7l-glibc -> armv7l-gcc -> armv7l-glibc (again)
_arch=armv7l
_target=armv7l-unknown-linux-gnueabihf
pkgname=$_target-gcc-bootstrap
pkgver=14.1.0
pkgrel=1
#_snapshot=8-20190111
pkgdesc='The GNU Compiler Collection - cross compiler for ARM target - bootstrap compiler'
arch=(x86_64)
url='https://gcc.gnu.org/'
license=(GPL LGPL FDL)
depends=(libmpc zstd libisl)
makedepends=(gmp mpfr $_arch-linux-gnu-binutils git)
options=(!emptydirs !strip staticlibs !lto)
source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig})
#https://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.xz
sha256sums=('e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840'
'SKIP')
validpgpkeys=(D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62 # Jakub Jelinek <jakub@redhat.com>
33C235A34C46AA3FFB293709A328C3A2C3C45C06 # Jakub Jelinek <jakub@redhat.com>
13975A70E63C361C73AE69EF6EEB81F8981C74C7) # Richard Guenther <richard.guenther@gmail.com>
if [ -n "$_snapshot" ]; then
_basedir=gcc-$_snapshot
else
_basedir=gcc-$pkgver
fi
prepare() {
cd $_basedir
echo $pkgver > gcc/BASE-VER
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
rm -rf "$srcdir"/gcc-build
mkdir "$srcdir"/gcc-build
}
build() {
cd gcc-build
# using -pipe causes spurious test-suite failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
CFLAGS=${CFLAGS/-pipe/}
CXXFLAGS=${CXXFLAGS/-pipe/}
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD
# TODO: properly deal with the build issues resulting from this
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
"$srcdir"/$_basedir/configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--target=$_target \
--disable-nls \
--with-sysroot=/usr/$_target/sys-root \
--enable-languages=c \
--with-system-zlib \
--disable-multilib --disable-werror \
--disable-threads --without-headers \
--disable-shared --with-newlib \
--program-prefix=$_target- \
--with-local-prefix=/usr/$_target \
--with-build-sysroot=/usr/$_target \
--with-native-system-header-dir=/include \
--libdir=/usr/lib \
--host=$CHOST --build=$CHOST \
--enable-default-pie \
--enable-shared --enable-threads=posix \
--with-isl --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu \
--disable-libstdcxx-pch --disable-libssp \
--enable-gnu-unique-object --enable-linker-build-id \
--enable-lto --enable-plugin --enable-install-libiberty \
--with-linker-hash-style=gnu --enable-gnu-indirect-function
make all-gcc all-target-libgcc
}
package() {
cd gcc-build
make install-strip-gcc install-strip-target-libgcc DESTDIR="$pkgdir"
#make DESTDIR="$pkgdir" install-gcc install-target-{libgcc,libstdc++-v3,libgomp,libgfortran,libquadmath,libatomic}
# strip target binaries
find "$pkgdir"/usr/lib/gcc/$_target/ "$pkgdir"/usr/$_target/lib \
-type f -and \( -name \*.a -or -name \*.o \) \
-exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges \
-R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line \
-R .debug_str -R .debug_ranges -R .debug_loc '{}' \;
# strip host binaries
find "$pkgdir"/usr/bin/ "$pkgdir"/usr/lib/gcc/$_target/ -type f -and \( -executable \) -exec strip '{}' \;
# Remove files that conflict with host gcc package
rm -r "$pkgdir"/usr/share/man/man7
rm -r "$pkgdir"/usr/share/info
rm -r "$pkgdir"/usr/share/gcc-$pkgver
}
Last edited by graysky (2024-06-09 13:12:21)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
The full config.log you linked is not the one from the failing configure. The failing one should be in ./armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/armv7l-unknown-linux-gnueabihf/libgcc/config.log and will end with exit 1 instead of exit 0.
Offline
Thanks for pointing that out. Here is the correct one (./build/armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/armv7l-unknown-linux-gnueabihf/libgcc/config.log)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
configure:3791: checking for suffix of object files
configure:3813: /build/armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/./gcc/xgcc -B/build/armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/./gcc/ -B/usr/armv7l-unknown-linux-gnueabihf/bin/ -B/usr/armv7l-unknown-linux-gnueabihf/lib/ -isystem /usr/armv7l-unknown-linux-gnueabihf/include -isystem /usr/armv7l-unknown-linux-gnueabihf/sys-include --sysroot=/usr/armv7l-unknown-linux-gnueabihf -c -g -O2 conftest.c >&5
/build/armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/./gcc/as: line 114: exec: -m: invalid option
exec: usage: exec [-cl] [-a name] [command [argument ...]] [redirection ...]
configure:3817: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3831: error: in `/build/armv7l-unknown-linux-gnueabihf-gcc-bootstrap/src/gcc-build/armv7l-unknown-linux-gnueabihf/libgcc':
configure:3833: error: cannot compute suffix of object files: cannot compile
Issue with binutils? https://stackoverflow.com/questions/164 … gcc-exec-i
Offline
That was the problem... I messed up the makedepends name for the corresponding binutils. Thanks!
EDIT: and I was able to update the entire package set: https://aur.archlinux.org/packages?O=0&K=armv7l
Last edited by graysky (2024-06-10 10:49:48)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline