View previous topic :: View next topic |
Author |
Message |
krumpf Apprentice
Joined: 15 Jul 2018 Posts: 185
|
Posted: Tue Mar 26, 2024 10:57 am Post subject: mingw64-toolchain and mold |
|
|
Hi,
After the profile upgrade, the "emerge -e @world" didn't complete, I noticed it crashed when recompiling mingw64-toolchain. Here's a part of build.log
Code: | libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -O2 -pipe -march=native -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -o ranlib ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a -lz ../libiberty/libiberty.a -lfl
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -O2 -pipe -march=native -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -o addr2line addr2line.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a -lz ../libiberty/libiberty.a
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -O2 -pipe -march=native -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -o elfedit elfedit.o version.o elfcomm.o ../libiberty/libiberty.a
[01m[Kgcc:[m[K [01;31m[Kfatal error: [m[Kno input files
compilation terminated.
[01m[Klto-wrapper:[m[K [01;31m[Kfatal error: [m[Kgcc returned 1 exit status
compilation terminated.
mold: [0;1;31mfatal:[0m lto-wrapper failed
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1094: windmc] Error 1
[01m[Kgcc:[m[K [01;31m[Kfatal error: [m[Kno input files
compilation terminated.
[01m[Klto-wrapper:[m[K [01;31m[Kfatal error: [m[Kgcc returned 1 exit status
compilation terminated.
mold: [0;1;31mfatal:[0m lto-wrapper failed
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1051: ranlib] Error 1
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -O2 -pipe -march=native -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -o bfdtest1 bfdtest1.o ../bfd/.libs/libbfd.a -lz ../libiberty/libiberty.a
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -O2 -pipe -march=native -fuse-ld=mold -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pack-relative-relocs -o cxxfilt cxxfilt.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a -lz ../libiberty/libiberty.a
mv -f .deps/dlltool.Tpo .deps/dlltool.Po
mv -f .deps/objdump.Tpo .deps/objdump.Po
mv -f .deps/dwarf.Tpo .deps/dwarf.Po
mv -f .deps/readelf.Tpo .deps/readelf.Po
make[4]: Leaving directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/binutils-build/binutils'
make[3]: *** [Makefile:1438: all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/binutils-build/binutils'
make[2]: *** [Makefile:881: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/binutils-build/binutils'
make[1]: *** [Makefile:4061: all-binutils] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/binutils-build'
make: *** [Makefile:1004: all] Error 2 |
Since I'm using mold systemwide LDFLAGS="-fuse-ld=mold ${LDFLAGS}", I tried again using a no-mold gcc, and it worked.
Can anyone confirm that issue ? Should I report it to mold github ?
Gcc version 13.2.1_p20240210; mold version 2.4.0 _________________ Dragon Princess Music Games Heroes and villains |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2837
|
Posted: Tue Mar 26, 2024 12:39 pm Post subject: |
|
|
lto-wrapper coming up sounds odd, the ebuild does filter-lto unconditionally (even with USE=custom-cflags) because it's known broken as things are, and "afaik" binutils shouldn't be adding it on its own without pgo (which is always disabled for this ebuild). Not that I can see what happened earlier without the full build.log.
From a quick try, it builds fine with 23.0 LDFLAGS + -fuse-ld=mold for me, maybe I'm missing something to trigger it. Albeit for fwiw I used ~testing mold-2.30.0 (haven't tried 2.4.0), my gcc is the same.
Not impossible you just hit a rare race condition and it's entirely unrelated to mold too (no input files error sounds odd as well), i.e. may work if try again maybe with a different MAKEOPTS=-jN value to help. Albeit first time I see this one. |
|
Back to top |
|
|
krumpf Apprentice
Joined: 15 Jul 2018 Posts: 185
|
Posted: Tue Mar 26, 2024 12:57 pm Post subject: |
|
|
Here's the full build.log
I'm no expert, but as I understand it, the first lines are telling mingw64-toolchain provides its own gcc version. Could that be the cause ? _________________ Dragon Princess Music Games Heroes and villains |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2837
|
Posted: Tue Mar 26, 2024 1:03 pm Post subject: |
|
|
krumpf wrote: | Here's the full build.log
I'm no expert, but as I understand it, the first lines are telling mingw64-toolchain provides its own gcc version. Could that be the cause ? | Doesn't matter, it's failing while building binutils which is the first step before it even builds mingw gcc.
That aside, unfortunately no immediate idea what might've happened looking at the log. |
|
Back to top |
|
|
krumpf Apprentice
Joined: 15 Jul 2018 Posts: 185
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|