Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 97ED8781146 for <~alpine/devel@lists.alpinelinux.org>; Fri, 12 Aug 2022 00:29:05 +0000 (UTC) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1660264144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wvpHBM/7wySD6qd+NpTdRrRGm+dyot/RdL18bBMQe7Y=; b=UpFa/DWnWi4BKfX1vvff7o17iqPQiDAkYg3IN1WLWzP7uVAJ1sWJgDKFhU77wKovoN3oH0 b3OhLvgCdQTmKnRjba798fqN1XlyxAZn8FXs4PWxATuhLwTBTnsWet0X/CPHobuQFzqnh8 leraw0xytBxLVzNrr2ER7x/x866fDUE= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 12 Aug 2022 02:29:03 +0200 Message-Id: X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "alice" To: "Karel Gardas" , <~alpine/devel@lists.alpinelinux.org> Subject: Re: Build failure while cross-compiling to aarch64 on x86_64. (scripts/bootstrap.sh failure) References: In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: ayaya.dev On Fri Aug 12, 2022 at 12:29 AM CEST, Karel Gardas wrote: > Hello, > > a new user here. I've installed a 3.16 x86_64 VM here and have been > attempting to use that to cross-compile some package to aarch64 > platform. The problem is that script/bootstrap.sh is not working well > for me. > > Platform: up-to-date 3.16 on amd64 > aports: updated hour ago > command line: CBUILDROOT=3D$HOME/sysroot-aarch64 time > ./src/aarch64-aports/scripts/bootstrap.sh aarch64 > > The aports repo is cloned into ./src/aarch64-aports dir here. Also > before this I've generated keys for signing. The issue I see looks > like: > > GNATLINK 11.2.1 20220219 > Copyright (C) 1995-2021, Free Software Foundation, Inc. > aarch64-alpine-linux-musl-gcc -c -Os -Os -O2 -Wextra -Wall > -fomit-frame-pointer -gnatA -gnatWb -gnatiw > -I/usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/../adainclude > -I/usr/lib/gcc/aarch > 64-aports/main/gcc/src/gcc-11.2.1_git20220219/gcc/ada > -gnatws /home/karel/src/aarch64-aports/main/gcc/src/build-cross-native/gc= c/ada/tools/b~gnatmake.adb > /usr/bin/aarch64-alpine-linux-musl-g++ b~gnatmake.o ../link.o > ../targext.o ../../ggc-none.o ./debug.o ./types.o ./alloc.o > ./gnatvsn.o ./hostparm.o ./krunch.o ./opt.o ./csets.o ./output.o ./rid > ./uintp.o > ./urealp.o ./widechar.o ./namet.o ./butil.o ./binderr.o ./casing.o > ./err_vars.o ./fmap.o ./sdefault.o ./targparm.o ./osint.o ./fname.o > ./osint-m.o ./snames.o ./ali.o ./scans.o ./aspe > m_aux.o ./sinput-c.o ./stringt.o > ./erroutc.o ./uname.o ./lib.o ./errout.o ./fname-uf.o ./fname-sf.o > ./styleg.o ./errutil.o ./make_util.o ./scng.o ./ali-util.o ./switch.o > ./switch-m.o ./tempdir > -target.a ../../libcommon.a ../../../libcpp/libcpp.a > ../../../libbacktrace/.libs/libbacktrace.a > ../../../libiberty/libiberty.a -no-pie -o ../../gnatmake -L./ > -L/usr/lib/gcc/aarch64-alpine-linuine-linux-musl/11.2.1/adalib/ -L./ > -L/home/karel/src/aarch64-aports/main/gcc/src/gcc-11.2.1_git20220219/gcc/= ada/ > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a > -static-libstdc+ome/karel/sysroot-aarch64 > -Wl,--as-needed,-O1,--sort-common > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a(a-calend.o= ): > Relocations in generic E > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/../../../../aarch64-alpine-= linux-musl/bin/ld: > /usr/lib/gcc/aarch64-alpine-linux-musl/11.2.1/adalib/libgnat.a: error > adding symbols: file in wrong > collect2: error: ld returned 1 exit status > aarch64-alpine-linux-musl-gnatlink: error when calling > /usr/bin/aarch64-alpine-linux-musl-g++ > make[3]: *** [../gcc-interface/Makefile:483: gnatmake-re] Error 4 > make[3]: Leaving directory > '/home/karel/src/aarch64-aports/main/gcc/src/build-cross-native/gcc/ada/t= ools' > make[2]: *** [Makefile:216: gnattools-cross] Error 2 > make[2]: Leaving directory > '/home/karel/src/aarch64-aports/main/gcc/src/build-cross-native/gnattools= ' > make[1]: *** [Makefile:10655: all-gnattools] Error 2 > make[1]: Leaving directory > '/home/karel/src/aarch64-aports/main/gcc/src/build-cross-native' > make: *** [Makefile:963: all] Error 2 > >>> ERROR: gcc: build failed > >>> gcc: Uninstalling dependencies... > (1/13) Purging .makedepends-gcc (20220811.220959) > (2/13) Purging build-base-aarch64 (0.5-r3) > (3/13) Purging gcc-aarch64 (11.2.1_git20220219-r2) > (4/13) Purging binutils-aarch64 (2.38-r3) > (5/13) Purging g++-aarch64 (11.2.1_git20220219-r2) > (6/13) Purging texinfo (6.8-r0) > (7/13) Purging gawk (5.1.1-r0) > (8/13) Purging zip (3.0-r9) > (9/13) Purging unzip (6.0-r9) > (10/13) Purging gcc-gnat (11.2.1_git20220219-r2) > (11/13) Purging gcc-gnat-aarch64 (11.2.1_git20220219-r2) > (12/13) Purging libgnat-static (11.2.1_git20220219-r2) > (13/13) Purging libgnat (11.2.1_git20220219-r2) > Executing busybox-1.35.0-r17.trigger > OK: 404 MiB in 151 packages > (1/22) Purging .hostdepends-gcc (20220811.221007) > (2/22) Purging fortify-headers (1.1-r1) > (3/22) Purging libc-dev (0.7.2-r3) > (4/22) Purging musl-dev (1.2.3-r0) > (5/22) Purging linux-headers (5.16.7-r1) > (6/22) Purging mpfr-dev (4.1.0-r0) > (7/22) Purging mpc1-dev (1.2.1-r0) > (8/22) Purging mpc1 (1.2.1-r0) > (9/22) Purging isl-dev (0.22-r0) > (10/22) Purging gmp-dev (6.2.1-r2) > (11/22) Purging libgmpxx (6.2.1-r2) > (12/22) Purging isl22 (0.22-r0) > (13/22) Purging zlib-dev (1.2.12-r3) > (14/22) Purging zlib (1.2.12-r3) > (15/22) Purging libucontext-dev (1.2-r0) > (16/22) Purging libucontext (1.2-r0) > (17/22) Purging pkgconf (1.8.0-r1) > (18/22) Purging libstdc++ (11.2.1_git20220219-r2) > (19/22) Purging mpfr4 (4.1.0-r0) > (20/22) Purging libgcc (11.2.1_git20220219-r2) > (21/22) Purging gmp (6.2.1-r2) > (22/22) Purging musl (1.2.3-r0) > OK: 0 MiB in 0 packages > Command exited with non-zero status 1 > > > Is this a new problem or have I done any mistake while using it? it's https://gitlab.alpinelinux.org/alpine/aports/-/issues/12898 , for which the fix is in 64e502aea618252002217c67b78159b255387d72 in git master. i assume either you are bootstrapping on the 3.16-stable branch where that fix isn't in, or your master was too old, or there are more issues bootstrapping master while having only 3.16 release packages (as opposed to edge) > > Thanks! > Karel