From: Maxime Devos <maximedevos@telenet.be>
To: 49113@debbugs.gnu.org
Subject: bug#49113: aarch64-linux-gnu cross-compiler fails to build [core-updates]
Date: Sat, 19 Jun 2021 12:05:39 +0200 [thread overview]
Message-ID: <f108d7df9cede373d38868c384fa1c6bdf69d09f.camel@telenet.be> (raw)
In-Reply-To: <875yybikkc.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 3499 bytes --]
X-Debbugs-CC: 48913@debbugs.gnu.org
X-Debbugs-CC: ludo@gnu.org
Ludovic Courtès schreef op vr 18-06-2021 om 11:33 [+0200]:
> Maxime Devos <maximedevos@telenet.be> skribis:
>
> > I have found a solution: passing --with-slibdir to GCC's configure
> > script. Not sure if that's the proper solution though. GNU Hello
> > now builds succesfully! I'll test with a few more packages later
> > and then ‘formally’ submit the patch (after writing a commit message).
>
> Could you check whether aarch64-linux-gnu or armhf-linux-gnueabihf (say)
> have the problem, and whether this patch addresses it?
aarch64-linux-gnu has a problem, but it appears to be a different problem
than the issue of i686-linux-gnu, so I'm starting a new issue.
(Note: I don't yet have rebased my tree on latest core-updates. I've
heard there are some GCC 10 updates now, maybe that will change something?)
I attached a build log when compiling with revised patch
from #49025 (patch 36/37). The build fails. Relevant tail of log
(during building of libgcc_s.so):
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so when searching for -lc
[ previous line 2 times repeated ]
aarch64-linux-gnu-ld: cannot find -lc
aarch64-linux-gnu-ld: skipping incompatible /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so when searching for -lc
[ previous line 2 times repeated ]
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:985: libgcc_s.so] Error 1
This also happened before the patch.
Some tests:
$ aarch64-linux-gnu-objdump -x /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so
> aarch64-linux-gnu-objdump: /gnu/store/.../libc.so: file format not recognized
$ cat /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so
> /* GNU ld script
> Use the shared library, but some functions are only in
> the static library, so try that secondarily. */
> OUTPUT_FORMAT(elf64-little)
> GROUP ( /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so.6 /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-
2.33/lib/libc_nonshared.a AS_NEEDED ( /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/ld-linux-aarch64.so.1 ) )
$ aarch64-linux-gnu-objdump -x /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so.6
> /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so.6: file format elf64-littleaarch64
> /gnu/store/31pavw3yzfck5sql6rjv92ahi8x9dhaj-glibc-cross-aarch64-linux-gnu-2.33/lib/libc.so.6
> architecture: aarch64, flags 0x00000150:
> HAS_SYMS, DYNAMIC, D_PAGED
> start address 0x00000000000215a8
Maybe the *_s.o files have a different architecture?
$ aarch64-linux-gnu-objdump -x *_s.o
> unwind-sjlj_s.o: file format elf64-littleaarch64
> unwind-sjlj_s.o
> architecture: aarch64, flags 0x00000011:
> HAS_RELOC, HAS_SYMS
> start address 0x0000000000000000
> private flags = 0x0:
> [and other output]
The file format (elf64-littleaarch64) is the same between libc and libgcc.
The architecture ("aarch64") is also the same. But the flags are different!
(0x00000150 vs 0x00000011). Maybe that's the issue, or it is harmless?
To be investigated ...
Greetings,
Maxime.
[-- Attachment #1.2: 68ahjhkcq8ck07cagsx90qy8g0860y-gcc-cross-aarch64-linux-gnu-8.5.0.drv.bz2 --]
[-- Type: application/x-bzip, Size: 371142 bytes --]
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-06-19 10:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-08 8:41 bug#48913: i686-linux-gnu cross-compiler cannot find libgcc_s [core-updates] Maxime Devos
2021-06-08 14:23 ` Maxime Devos
2021-06-08 15:25 ` Maxime Devos
2021-06-18 9:33 ` Ludovic Courtès
2021-06-19 7:37 ` Maxime Devos
2021-06-19 10:05 ` Maxime Devos [this message]
2021-06-20 12:17 ` bug#49113: aarch64-linux-gnu cross-compiler fails to build [core-updates] Maxime Devos
2021-07-03 16:12 ` Ludovic Courtès
2021-07-04 20:33 ` Ludovic Courtès
2021-06-19 11:05 ` bug#48913: i686-linux-gnu cross-compiler cannot find libgcc_s [core-updates] Maxime Devos
2021-06-19 11:59 ` Maxime Devos
2021-06-18 9:32 ` Ludovic Courtès
2021-07-03 13:40 ` Maxime Devos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f108d7df9cede373d38868c384fa1c6bdf69d09f.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=49113@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).