public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
@ 2022-02-11 8:00 h0tc0d3 at gmail dot com
2022-02-16 13:12 ` [Bug build/28881] " adhemerval.zanella at linaro dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: h0tc0d3 at gmail dot com @ 2022-02-11 8:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
Bug ID: 28881
Summary: Glibc 32-bit build randomly fails with gcc: error:
unrecognized command-line option ‘-static-libgcc’
Product: glibc
Version: 2.35
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: h0tc0d3 at gmail dot com
CC: carlos at redhat dot com
Target Milestone: ---
It started a couple of months ago with develop 2.35 version. I tried rebuilding
gcc, binutils, libtool but it didn't work.
{
echo "slibdir=/usr/lib32"
echo "rtlddir=/usr/lib32"
echo "sbindir=/usr/bin"
echo "rootsbindir=/usr/bin"
} >configparms
_configure_flags=(
--prefix=/usr
--with-headers=/usr/include
--enable-add-ons
--enable-bind-now
--enable-tunables
--enable-kernel=5.10.1
--enable-multi-arch
--enable-stack-protector=strong
--enable-systemtap
--disable-build-nscd
--disable-nscd
--disable-cet
--disable-lock-elision
--disable-profile
--disable-werror
)
BUILD_CC="gcc" CC="gcc -m32" CXX="g++ -m32" \
"${srcdir:?}/glibc/configure" \
--host=i686-pc-linux-gnu \
--build=i686-pc-linux-gnu \
--libdir=/usr/lib32 \
--libexecdir=/usr/lib32 \
${_configure_flags[@]}
# build libraries with fortify disabled
echo "build-programs=no" >>configparms
make
# re-enable fortify for programs
sed -i "/build-programs=/s#no#yes#" configparms
echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >>configparms
make
gcc -m32 -Wl,-O1 -Wl,-z,now -Wl,-z,relro -Wl,--as-needed
-Wl,--no-copy-dt-needed-entries -Wl,--sort-common -Wl,--hash-style=gnu -shared
-static-libgcc -Wl,-O1 -Wl,-z,defs
-Wl,-dynamic-linker=/usr/lib32/ld-linux.so.2
-B/build/glibc/src/lib32-glibc-build/csu/
-Wl,--version-script=/build/glibc/src/lib32-glibc-build/libc.map
-Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
-Wl,-z,now -nostdlib -nostartfiles -e __libc_main
-L/build/glibc/src/lib32-glibc-build -L/build/glibc/src/lib32-glibc-build/math
-L/build/glibc/src/lib32-glibc-build/elf
-L/build/glibc/src/lib32-glibc-build/dlfcn
-L/build/glibc/src/lib32-glibc-build/nss
-L/build/glibc/src/lib32-glibc-build/nis
-L/build/glibc/src/lib32-glibc-build/rt
-L/build/glibc/src/lib32-glibc-build/resolv
-L/build/glibc/src/lib32-glibc-build/mathvec
-L/build/glibc/src/lib32-glibc-build/support
-L/build/glibc/src/lib32-glibc-build/crypt
-L/build/glibc/src/lib32-glibc-build/nptl
-Wl,-rpath-link=/build/glibc/src/lib32-glibc-build:/build/glibc/src/lib32-glibc-build/math:/build/glibc/src/lib32-glibc-build/elf:/build/glibc/src/lib32-glibc-build/dlfcn:/build/glibc/src/lib32-glibc-build/nss:/build/glibc/src/lib32-glibc-build/nis:/build/glibc/src/lib32-glibc-build/rt:/build/glibc/src/lib32-glibc-build/resolv:/build/glibc/src/lib32-glibc-build/mathvec:/build/glibc/src/lib32-glibc-build/support:/build/glibc/src/lib32-glibc-build/crypt:/build/glibc/src/lib32-glibc-build/nptl
-o /build/glibc/src/lib32-glibc-build/linkobj/libc.so
/build/glibc/src/lib32-glibc-build/csu/abi-note.o -Wl,--whole-archive
/build/glibc/src/lib32-glibc-build/linkobj/libc_pic.a -Wl,--no-whole-archive
/build/glibc/src/lib32-glibc-build/elf/interp.os
/build/glibc/src/lib32-glibc-build/elf/ld.so -lgcc
/build/glibc/src/lib32-glibc-build/elf/sofini.os
gcc: error: unrecognized command-line option ‘-static-libgcc’
make[1]: *** [Makerules:704:
/build/glibc/src/lib32-glibc-build/linkobj/libc.so] Error 1
make[1]: Leaving directory '/build/glibc/src/glibc'
make: *** [Makefile:9: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /build/zen2/nullik/build
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
@ 2022-02-16 13:12 ` adhemerval.zanella at linaro dot org
2022-02-16 14:17 ` schwab@linux-m68k.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-02-16 13:12 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adhemerval.zanella at linaro dot o
| |rg
--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
This really seems to be an issue with toolchain you are using to build glibc,
we do require the gcc to support -static-libgcc (which should be the default).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
2022-02-16 13:12 ` [Bug build/28881] " adhemerval.zanella at linaro dot org
@ 2022-02-16 14:17 ` schwab@linux-m68k.org
2022-02-16 14:20 ` h0tc0d3 at gmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2022-02-16 14:17 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
That reminds me of bug 28895.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
2022-02-16 13:12 ` [Bug build/28881] " adhemerval.zanella at linaro dot org
2022-02-16 14:17 ` schwab@linux-m68k.org
@ 2022-02-16 14:20 ` h0tc0d3 at gmail dot com
2022-02-22 3:49 ` sam at gentoo dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: h0tc0d3 at gmail dot com @ 2022-02-16 14:20 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #3 from Grigory <h0tc0d3 at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #1)
> This really seems to be an issue with toolchain you are using to build
> glibc, we do require the gcc to support -static-libgcc (which should be the
> default).
gcc was build with static libgcc support. This problem occurs intermittently,
and I have to rollback to old versions of glibc, gcc, binutils, libtool and
build everything from the beginning. It is also not clear from what and when it
begins to appear. The only thing is that this only occurs with 32 bit versions
of glibc. Also gcc remained the same, but at one moment this error occurs.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (2 preceding siblings ...)
2022-02-16 14:20 ` h0tc0d3 at gmail dot com
@ 2022-02-22 3:49 ` sam at gentoo dot org
2022-02-22 15:47 ` adhemerval.zanella at linaro dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: sam at gentoo dot org @ 2022-02-22 3:49 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gentoo dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (3 preceding siblings ...)
2022-02-22 3:49 ` sam at gentoo dot org
@ 2022-02-22 15:47 ` adhemerval.zanella at linaro dot org
2022-02-22 18:55 ` h0tc0d3 at gmail dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-02-22 15:47 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #4 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Are you still seeing build failures after the fix for bug 28895?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (4 preceding siblings ...)
2022-02-22 15:47 ` adhemerval.zanella at linaro dot org
@ 2022-02-22 18:55 ` h0tc0d3 at gmail dot com
2022-02-22 19:11 ` adhemerval.zanella at linaro dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: h0tc0d3 at gmail dot com @ 2022-02-22 18:55 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #5 from Grigory <h0tc0d3 at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #4)
> Are you still seeing build failures after the fix for bug 28895?
Yep, I use patch for this bug. Thank you! He apparently decided performance
degradation after glibc 2.34. But not solved -static-libgcc bug in 32-bit
glibc. I found if I got -static-libgcc bug then this can be solved with
compilation and installation 64-bit version glibc, and then will compile 32-bit
version. My build script build 64-bit and 32-bit version at once and some times
compilation of 32-bit version fails with -static-libgcc error.
My build script:
https://github.com/h0tc0d3/arch-packages/blob/master/glibc/PKGBUILD
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (5 preceding siblings ...)
2022-02-22 18:55 ` h0tc0d3 at gmail dot com
@ 2022-02-22 19:11 ` adhemerval.zanella at linaro dot org
2022-02-22 19:27 ` h0tc0d3 at gmail dot com
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-02-22 19:11 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Grigory from comment #5)
> (In reply to Adhemerval Zanella from comment #4)
> > Are you still seeing build failures after the fix for bug 28895?
>
> Yep, I use patch for this bug. Thank you! He apparently decided performance
> degradation after glibc 2.34. But not solved -static-libgcc bug in 32-bit
> glibc. I found if I got -static-libgcc bug then this can be solved with
> compilation and installation 64-bit version glibc, and then will compile
> 32-bit version. My build script build 64-bit and 32-bit version at once and
> some times compilation of 32-bit version fails with -static-libgcc error.
>
> My build script:
> https://github.com/h0tc0d3/arch-packages/blob/master/glibc/PKGBUILD
Could you verify that the toolchain used to build 32 bit glibc *does* have
libgcc.a in the search list?
As I said I don't think this is a glibc issue, since it does not seem that you
are running the toolchain with the built glibc (which might trigger the avx2
strncmp issue).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (6 preceding siblings ...)
2022-02-22 19:11 ` adhemerval.zanella at linaro dot org
@ 2022-02-22 19:27 ` h0tc0d3 at gmail dot com
2022-02-22 20:08 ` adhemerval.zanella at linaro dot org
2024-05-07 17:39 ` adhemerval.zanella at linaro dot org
9 siblings, 0 replies; 11+ messages in thread
From: h0tc0d3 at gmail dot com @ 2022-02-22 19:27 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #7 from Grigory <h0tc0d3 at gmail dot com> ---
(In reply to Adhemerval Zanella from comment #6)
> Could you verify that the toolchain used to build 32 bit glibc *does* have
> libgcc.a in the search list?
Yep. I already answered for this question. gcc contaions libgcc.a both 32-bit
and 64-bit version. The -static-libgcc error occurs in a random file and files
before success linked and compiled with -static-libgcc. So the error is rather
strange. And it is solved by building version 64 and installing it. It is not
clear why it does not allow to compile both versions at once.
My gcc build script https://github.com/h0tc0d3/arch-packages/tree/master/gcc
Compiled packages:
https://archlinux.club/x86_64/gcc-11.2.1-4-x86_64.pkg.tar.zst
https://archlinux.club/x86_64/gcc-libs-11.2.1-4-x86_64.pkg.tar.zst
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (7 preceding siblings ...)
2022-02-22 19:27 ` h0tc0d3 at gmail dot com
@ 2022-02-22 20:08 ` adhemerval.zanella at linaro dot org
2024-05-07 17:39 ` adhemerval.zanella at linaro dot org
9 siblings, 0 replies; 11+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-02-22 20:08 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
--- Comment #8 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Sorry but I am not in the mood to debug you build script. Could you provide a
easy way to reproduce this issue, probably without resorting in rebuilding a
complete toolchain? Otherwise I will close this bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug build/28881] Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
` (8 preceding siblings ...)
2022-02-22 20:08 ` adhemerval.zanella at linaro dot org
@ 2024-05-07 17:39 ` adhemerval.zanella at linaro dot org
9 siblings, 0 replies; 11+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2024-05-07 17:39 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28881
Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Target Milestone|--- |2.35
Status|UNCONFIRMED |RESOLVED
--- Comment #9 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
As per the last comment.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-05-07 17:39 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 8:00 [Bug build/28881] New: Glibc 32-bit build randomly fails with gcc: error: unrecognized command-line option ‘-static-libgcc’ h0tc0d3 at gmail dot com
2022-02-16 13:12 ` [Bug build/28881] " adhemerval.zanella at linaro dot org
2022-02-16 14:17 ` schwab@linux-m68k.org
2022-02-16 14:20 ` h0tc0d3 at gmail dot com
2022-02-22 3:49 ` sam at gentoo dot org
2022-02-22 15:47 ` adhemerval.zanella at linaro dot org
2022-02-22 18:55 ` h0tc0d3 at gmail dot com
2022-02-22 19:11 ` adhemerval.zanella at linaro dot org
2022-02-22 19:27 ` h0tc0d3 at gmail dot com
2022-02-22 20:08 ` adhemerval.zanella at linaro dot org
2024-05-07 17:39 ` adhemerval.zanella at linaro dot org
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).