all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: [core-updates] aarch64: Cannot build glibc-2.39
Date: Mon, 12 Aug 2024 16:01:40 +0200	[thread overview]
Message-ID: <87le11dem3.fsf@gnu.org> (raw)
In-Reply-To: <87ed76289b.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 02 Aug 2024 18:34:56 +0200")

Hey Ricardo!

Ricardo Wurmus <rekado@elephly.net> skribis:

>> You can reproduce this like so:
>>
>>   ./pre-inst-env guix build -K --system=aarch64-linux -e \
>>       '((@@ (gnu packages make-bootstrap) glibc-for-bootstrap) (@ (gnu packages base) glibc))'
>
> I was able to build that glibc with this diff:
>
> diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
> index 8eed98d1fd..acd0033d1e 100644
> --- a/gnu/packages/bdw-gc.scm
> +++ b/gnu/packages/bdw-gc.scm
> @@ -114,8 +114,14 @@ (define-public libgc/static-libs
>     (arguments
>      (substitute-keyword-arguments (package-arguments libgc)
>        ((#:configure-flags flags #~'())
> -       #~(cons "--enable-static" #$flags))))
> -
> +       #~(cons "--enable-static" #$flags))
> +      ((#:make-flags flags #~'())
> +       (cond
> +        ((target-aarch64?)
> +         ;; This is a known workaround upstream.
> +         ;; https://github.com/ivmai/bdwgc/issues/479
> +         #~(list "CFLAGS_EXTRA=-DNO_MPROTECT_VDB"))
> +        (else flags)))))
>     (properties '((hidden? . #t)))))

This one LGTM, I think you can push it on ‘core-updates’.

> diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
> index 63c84e93ef..0c513040d6 100644
> --- a/gnu/packages/make-bootstrap.scm
> +++ b/gnu/packages/make-bootstrap.scm
> @@ -90,8 +90,11 @@ (define glibc-for-bootstrap
>        ;; Make sure to build glibc with the same compiler version as the rest
>        ;; of the bootstrap.  Otherwise it fails to statically link on aarch64.
>        (native-inputs
> -       `(("gcc" ,gcc-7)
> -         ,@(package-native-inputs base)))
> +       (if (target-aarch64?)
> +           (modify-inputs (package-native-inputs base)
> +             (replace "gcc" gcc-7))
> +           `(("gcc" ,gcc-7)
> +             ,@(package-native-inputs base))))

What’s the rationale here?  I would expect both to be almost equivalent.
At any rate, I would remove the ‘if’: it should be the same on all
platforms.

> I'm now failing at the build of guile-static-initrd:
>
> removing store references from `/gnu/store/wir05g46map9dd3y5sn3nwpblaydhmj5-guile-static-initrd-3.0.9/bin/guile'...
> qemu-aarch64: Could not open '/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.39/lib/ld-linux-aarch64.so.1': No such file or directory

This suggests that the ‘guile’ binary is not actually statically linked:
it has PT_INTERP set to ld-linux*.so.  This is surprising because
there’s no such problem on x86_64-linux.  Maybe one of the build flags
for static builds is getting lost somewhere?

Thanks,
Ludo’.


  reply	other threads:[~2024-08-12 14:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 19:51 [core-updates] aarch64: Cannot build glibc-2.39 Ricardo Wurmus
2024-07-31 21:50 ` Ricardo Wurmus
2024-08-02 16:34   ` Ricardo Wurmus
2024-08-12 14:01     ` Ludovic Courtès [this message]
2024-08-13 16:52     ` Ludovic Courtès
2024-08-14 13:31       ` Ludovic Courtès
2024-08-19 13:02         ` Ricardo Wurmus
2024-08-19 20:42           ` Ricardo Wurmus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le11dem3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.