[core-packages-team 5/5] DRAFT gnu: gcc: Update gcc, gcc-toolchain to 14.

  • Open
  • quality assurance status badge
Details
2 participants
  • Janneke Nieuwenhuizen
  • Ludovic Courtès
Owner
unassigned
Submitted by
Janneke Nieuwenhuizen
Severity
normal
J
J
Janneke Nieuwenhuizen wrote on 3 Dec 2024 22:07
(address . guix-patches@gnu.org)
87ed2ofpbo.fsf@gnu.org
Hello,

So, I've just built "hello" for x86_64-linux on "core-packages-team"
(yay!) mostly re-using gcc-14 patches/workarounds that I created for the
Hurd.

We probably want to keep this [switch to gcc-14] patch "bubbling" up on
top of the gcc-14 patches until the gcc-14 transition is done, keeping
every commit buildable.

Just opening this bug by sendding this email to have a placeholder for
discussing this, for the patches see "core-packages-team" (hope that's
OK).

Anyway, I have been using variants of

Toggle snippet (3 lines)
"CFLAGS=-g -O2 -Wno-implicit-function-declaration"

while Ludo in hot-patch mode this morning used the already somewhat nicer

Toggle snippet (3 lines)
[-DCMAKE_}C_FLAGS=-Wno-error=implicit-function-declaration"

To get build gcc-final to build on the 64bit Hurd I finally created a
gcc.sh wrapper script, after trying all kinds of variations of CFLAGS,
CFLAGS_FOR_BUILD in #:configure-flags, #:make-flags, see also
using "-fpermissive".

Before pointing the build farm to core-packages-team and starting the
"real work" we may want to think about how to go forward. On the one
hand, having CFLAGS patches littered all over the place is not great, on
the other hand, if we were to add compatibility flags to a wrapper for
gcc, or into build systems, we may never get rid of such a "feature".
Thoughts?

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 5 Dec 2024 20:45
(address . guix-patches@gnu.org)
87ttbh52xh.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Hi,

Toggle quote (4 lines)
> So, I've just built "hello" for x86_64-linux on "core-packages-team"
> (yay!) mostly re-using gcc-14 patches/workarounds that I created for the
> Hurd.

[..]

I've all but reconfigured--guix system reconfigure as non-root--my
system, without childhurd, using what is now core-packages-team-old.
That really wasn't so bad, many packages just build with gcc-14.

I have tried to keep the scope of changes as small as possible but
attempted to "fix" packages build failures also by upgrading the
package. For commencement and base packages I kept the scope narrow:
x86_64-linux, because it has proven to be very hard to predict what's
needed on other architectures. For other packages, such as "zip", I
just added the mostly harmless -Wno-implicit-function-declaration flag
unguarded.

The *-old branch has a couple of hacks that neutralize impact to
commencement packages, marked "REMOVEME", to avoid world rebuilds as
sometimes some base package builds in commencement, but fails to build
lateron.

The new, cleaned-up, and rebased core-packages-team branch is as such
untested, but "should work". WDYT? Can we point the build-farm to this
branch to help out?

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 8 Dec 2024 19:13
(address . guix-patches@gnu.org)
87ldwqavrf.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Hi,

Toggle quote (8 lines)
>> So, I've just built "hello" for x86_64-linux on "core-packages-team"
>> (yay!) mostly re-using gcc-14 patches/workarounds that I created for the
>> Hurd.
>
> [..]
>
> I've all but reconfigured--guix system reconfigure

That was apparently not true, somewhere in the process I somehow built from
another branch. Anyway, still making good progress.... :-/

On IRC, Efraim reports that i686-linux and aarch64-linux fail to build
hello on current core-packages-team. That makes me reconsider whether
this strategy

Toggle quote (3 lines)
> I kept the scope narrow: x86_64-linux, because it has proven to be
> very hard to predict what's needed on other architectures.

which makes a lot of sense for patches that go to "master" is a good
strategy for core-packages-team. Possibly it's better to use an
unlimited scope? Oh well.

Greetings,
Janneke -- building /gnu/store/m5m6qzlxypk1y58yp69501rhq5qmz3r4-llvm-18.1.8.drv...

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 16 Dec 2024 22:43
(address . guix-patches@gnu.org)
8734in717q.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Hello,

Toggle quote (22 lines)
>>> So, I've just built "hello" for x86_64-linux on "core-packages-team"
>>> (yay!) mostly re-using gcc-14 patches/workarounds that I created for the
>>> Hurd.
>>
>> [..]
>>
>> I've all but reconfigured--guix system reconfigure
>
> That was apparently not true, somewhere in the process I somehow built from
> another branch. Anyway, still making good progress.... :-/
>
> On IRC, Efraim reports that i686-linux and aarch64-linux fail to build
> hello on current core-packages-team. That makes me reconsider whether
> this strategy
>
>> I kept the scope narrow: x86_64-linux, because it has proven to be
>> very hard to predict what's needed on other architectures.
>
> which makes a lot of sense for patches that go to "master" is a good
> strategy for core-packages-team. Possibly it's better to use an
> unlimited scope? Oh well.

The current core-packages-team uses the gcc and bash fixes for all
platforms and now also supports building all gcc versions from 4.8 and
up, and I've just built hello again for x86_64-linux.

I've built the rust bootstrap several times already, guess I'll just go
for a new round. But this time we can maybeu "cheat" with packages that
are too difficult to build, and build them with another gcc version than
14?

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 26 Dec 2024 12:07
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87ldw2ya65.fsf@gnu.org
Hi,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (5 lines)
> I've built the rust bootstrap several times already, guess I'll just go
> for a new round. But this time we can maybeu "cheat" with packages that
> are too difficult to build, and build them with another gcc version than
> 14?

I haven’t followed closely (sorry!), but if it’s just a matter of adding
‘gcc-11’ (say) as a native input for a couple of packages, that’s
probably okay. Except perhaps for C libraries, because then we could
end up with programs depending on two difference versions of libgcc_s.so
& co.

Ludo’.
L
L
Ludovic Courtès wrote on 29 Dec 2024 16:05
Re: bug#74676: [core-packages-team 5/5] DRAFT gnu: gcc: Update gcc, gcc-toolchain to 14.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
8734i6r0ld.fsf@gnu.org
Hello,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (7 lines)
> Before pointing the build farm to core-packages-team and starting the
> "real work" we may want to think about how to go forward. On the one
> hand, having CFLAGS patches littered all over the place is not great, on
> the other hand, if we were to add compatibility flags to a wrapper for
> gcc, or into build systems, we may never get rid of such a "feature".
> Thoughts?

The -Wno-implicit-function-declaration CFLAGS/patches all around are not
pretty, but they’ll vanish over time.

A wrapper would be problematic for the reason you give notably. (In the
early days of Guix, I tried really hard to avoid compiler wrappers,
which is what Nixpkgs has, to remain as close as possible to the
toolchain and to avoid “invisible magic” afforded by wrappers.)

Ludo’.
J
J
Janneke Nieuwenhuizen wrote on 6 Jan 14:30 +0100
Re: [core-packages-team 5/5] DRAFT gnu: gcc: Update gcc, gcc-toolchain to 14.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87frlwvzms.fsf@gnu.org
Ludovic Courtès writes:

Hi,

Toggle quote (13 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> I've built the rust bootstrap several times already, guess I'll just go
>> for a new round. But this time we can maybeu "cheat" with packages that
>> are too difficult to build, and build them with another gcc version than
>> 14?
>
> I haven’t followed closely (sorry!), but if it’s just a matter of adding
> ‘gcc-11’ (say) as a native input for a couple of packages, that’s
> probably okay. Except perhaps for C libraries, because then we could
> end up with programs depending on two difference versions of libgcc_s.so
> & co.

Right. I found that for c++ packages it's also tricky. Anyway, at the
moment we have

Toggle snippet (10 lines)
1198e662af gnu: clang-runtime-17: Build with gcc-13.
eef34a6748 gnu: clang-runtime-18: Build with gcc-13.
bf33f0022e gnu: python-cython-next: Build with gcc-13.
0ae054278b gnu: ghc-8.4.4: Build with gcc-13.
5e65c4721a gnu: ghc-8.0.2: Build with gcc-13.
804a75c785 gnu: perl-tk: Build with gcc-12.
269da0d77f gnu: json-c-0.13: Fix build with gcc-13.
68545a30d7 gnu: gavl: Fix build by using gcc-13.

Silly but just the other day I realised why using a non-gcc-14 is so
problematic: we won't have that package (or any of its dependencies) on
the Hurd :).

Especially ghc might be problematic, but I spent a lot of time trying to
set relaxing CFLAGS (-copt-Wno-error=...) on every necessary build
"level" and got bored of the slow feedback cycle ("it didn't build").

Otoh, possibly things may improve before we really need these packages
on the Hurd and possibly others have more helpful ideas for fixing a
certain package.

I'm a bit puzzled that ci.guix.gnu.org says 81% success, that cannot be
right? Sure, I worked very hard and we only have x86_64-linux and
i686-linux enabled atm but still?

FWIW, I just built libstd++ on aarch64 too :)

I also included (and reverted for now to avoid a world rebuild, so still
pretty much untested atm)

Toggle snippet (3 lines)
ed4c3760fc gexp: Improve support of Unicode characters.

from https://issues.guix.gnu.org/73660 that seems OK but IWBN if
someone could have a look at that.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 12 Jan 16:16 +0100
Request for merging core-packages-team branch
(address . guix-patches@gnu.org)(address . 74676@debbugs.gnu.org)
87o70cdpvc.fsf@gnu.org
Hi!

Cuirass says we're at 81% success rate for i686-linux and x86_64-linux,
and possibly my #74676, meant as an old style "please help with the
gcc-14 transition", should have been named "Request for merging" already
anyway. Hard to keep up with all the changes but more formality is a
good thing I guess :)

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 12 Jan 16:32 +0100
Request for merging "core-packages-team" branch
(address . guix-patches@gnu.org)
87jzb0dp41.fsf@gnu.org
Hi!

Cuirass says we're at 81% success rate for i686-linux and x86_64-linux,
and possibly my #74676, meant as an old style "please help with the
gcc-14 transition", should have been named "Request for merging" already
anyway. Hard to keep up with all the changes but more formality is a
good thing I guess :)

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote on 12 Jan 16:37 +0100
Re: bug#75517: Request for merging core-packages-team branch
(address . 75517-done@debbugs.gnu.org)
87ed18dow8.fsf_-_@gnu.org
Janneke Nieuwenhuizen writes:

Closing this bug with wrong subject (missing double quotes around branch name).

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 18 Jan 17:32 +0100
Re: bug#75518: Request for merging "core-packages-team" branch
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
8734hgulpy.fsf@gnu.org
Hello!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (6 lines)
> Cuirass says we're at 81% success rate for i686-linux and x86_64-linux,
> and possibly my #74676, meant as an old style "please help with the
> gcc-14 transition", should have been named "Request for merging" already
> anyway. Hard to keep up with all the changes but more formality is a
> good thing I guess :)

I’m testing the patch below to upgrade glibc to 2.40 (I’m at
‘gcc-mesboot-4.9.4’ so there are still quite a few hours before I get
around to building glibc).

I think we must upgrade glibc in this branch because (1) we want to get
rid of this graft and more generally get the latest fixes, and (2) we
cannot just ungraft since the graft uses ‘git-fetch’, which cannot be
relied on in ‘commencement.scm’ (we still assume that
‘builtin:git-download’ may be unavailable, and when it’s unavailable, we
have a circular dependency).

Thoughts?

Ludo’.
Attachment: file
J
J
Janneke Nieuwenhuizen wrote on 18 Jan 17:49 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)
878qr8awy6.fsf@gnu.org
Ludovic Courtès writes:

Hi!

Toggle quote (12 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> Cuirass says we're at 81% success rate for i686-linux and x86_64-linux,
>> and possibly my #74676, meant as an old style "please help with the
>> gcc-14 transition", should have been named "Request for merging" already
>> anyway. Hard to keep up with all the changes but more formality is a
>> good thing I guess :)
>
> I’m testing the patch below to upgrade glibc to 2.40 (I’m at
> ‘gcc-mesboot-4.9.4’ so there are still quite a few hours before I get
> around to building glibc).

Oh, I didn't realise 2.40 was out already!

Toggle quote (9 lines)
> I think we must upgrade glibc in this branch because (1) we want to get
> rid of this graft and more generally get the latest fixes, and (2) we
> cannot just ungraft since the graft uses ‘git-fetch’, which cannot be
> relied on in ‘commencement.scm’ (we still assume that
> ‘builtin:git-download’ may be unavailable, and when it’s unavailable, we
> have a circular dependency).
>
> Thoughts?

That would be lovely, especially if it builds :)

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
L
L
Ludovic Courtès wrote on 20 Jan 00:39 +0100
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87y0z6ml02.fsf_-_@gnu.org
Hello,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (2 lines)
> That would be lovely, especially if it builds :)

It actually does! :-) I went a bit further and tried “guix build
coreutils”. It’s close to completion right now, but I’m going to bed.

I’m confident: unlike previous upgrades, there are no major deprecations
like the removal of Sun RPC, libutil.so, libcrypt.so, etc. (there’s not
much left to remove :-)).

So, pushed. The one thing that still needs to be tested is
(cross-)compilation to GNU/Hurd. There are probably patches that can be
dropped there.

Thanks,
Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74676@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74676
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch