public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/96217] New: undefined reference to `_Unwind_Resume'
@ 2020-07-16 11:50 legarrec.vincent at gmail dot com
2020-07-17 6:48 ` [Bug other/96217] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: legarrec.vincent at gmail dot com @ 2020-07-16 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
Bug ID: 96217
Summary: undefined reference to `_Unwind_Resume'
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: legarrec.vincent at gmail dot com
Target Milestone: ---
Created attachment 48880
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48880&action=edit
glibc-build.zip
I work on Gentoo. I compiled gcc with -O0 and I was able to complete the build
(I didn't executed tests).
But I try to compile glibc with gcc built with -O0. The log says :
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd:
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/32/libgcc.a(_divdi3.o): in function
`__divdi3':
/var/tmp/portage/sys-devel/gcc-10.1.0-r2/work/gcc-10.1.0/libgcc/libgcc2.c:1246:
undefined reference to `_Unwind_Resume'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd:
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/32/libgcc.a(_divdi3.o):(.data.rel.local.DW.ref.__gcc_personality_v0[DW.ref.__gcc_personality_v0]+0x0):
undefined reference to `__gcc_personality_v0'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld.bfd:
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/32/libgcc.a(_moddi3.o): in function
`__moddi3':
/var/tmp/portage/sys-devel/gcc-10.1.0-r2/work/gcc-10.1.0/libgcc/libgcc2.c:1269:
undefined reference to `_Unwind_Resume'
A simple test case is really hard because gcc successfully built small other
packages and I have no idea why I have this "undefined reference".
I was able to compiling gcc with -O2 (with gcc built with -O0) then to build
glibc successfully.
Please find enclosed the build.log of glibc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
@ 2020-07-17 6:48 ` rguenth at gcc dot gnu.org
2020-07-17 7:24 ` legarrec.vincent at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-17 6:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think you should report this to glibc, not GCC.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
2020-07-17 6:48 ` [Bug other/96217] " rguenth at gcc dot gnu.org
@ 2020-07-17 7:24 ` legarrec.vincent at gmail dot com
2020-07-17 9:02 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: legarrec.vincent at gmail dot com @ 2020-07-17 7:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #2 from LE GARREC Vincent <legarrec.vincent at gmail dot com> ---
Are you sure ?
I thought it the fault of GCC because :
- glibc can be build if gcc was built with -O2
- glibc can't be build if gcc was built with -O0
I think the build of glibc should not depend on the CFLAGS of GCC.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
2020-07-17 6:48 ` [Bug other/96217] " rguenth at gcc dot gnu.org
2020-07-17 7:24 ` legarrec.vincent at gmail dot com
@ 2020-07-17 9:02 ` jakub at gcc dot gnu.org
2020-07-17 19:59 ` legarrec.vincent at gmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-07-17 9:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The division and modulo functions in glibc are built with -fexceptions (since
r190483 it seems), so I guess you don't really want to build them with -O0,
because in that case you might end up with some _Unwind_Resume,
__gcc_personality_v0 etc. not optimized away like it happened to you.
You'd need to link with -lgcc_eh to get those, as it is not in -lgcc
(intentionally) or -shared-libgcc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
` (2 preceding siblings ...)
2020-07-17 9:02 ` jakub at gcc dot gnu.org
@ 2020-07-17 19:59 ` legarrec.vincent at gmail dot com
2020-07-18 11:20 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: legarrec.vincent at gmail dot com @ 2020-07-17 19:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #4 from LE GARREC Vincent <legarrec.vincent at gmail dot com> ---
I know that building the world with -O0 can be strange but it really helps me
when a software crashes.
Thanks, -lgcc_eh solves the problem. I will create a bugreport to glibc and
hope they will fix it.
Maybe you can change the status to Invalid ? I can only use RESOLVED.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
` (3 preceding siblings ...)
2020-07-17 19:59 ` legarrec.vincent at gmail dot com
@ 2020-07-18 11:20 ` hjl.tools at gmail dot com
2020-07-18 11:50 ` legarrec.vincent at gmail dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-18 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to LE GARREC Vincent from comment #0)
> Created attachment 48880 [details]
> glibc-build.zip
>
> I work on Gentoo. I compiled gcc with -O0 and I was able to complete the
> build (I didn't executed tests).
>
> But I try to compile glibc with gcc built with -O0. The log says :
>
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/
> ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/32/libgcc.a(_divdi3.o): in
> function `__divdi3':
> /var/tmp/portage/sys-devel/gcc-10.1.0-r2/work/gcc-10.1.0/libgcc/libgcc2.c:
> 1246: undefined reference to `_Unwind_Resume'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/
> ld.bfd:
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/32/libgcc.a(_divdi3.o):(.data.rel.
> local.DW.ref.__gcc_personality_v0[DW.ref.__gcc_personality_v0]+0x0):
> undefined reference to `__gcc_personality_v0'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/
> ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/32/libgcc.a(_moddi3.o): in
> function `__moddi3':
> /var/tmp/portage/sys-devel/gcc-10.1.0-r2/work/gcc-10.1.0/libgcc/libgcc2.c:
> 1269: undefined reference to `_Unwind_Resume'
>
> A simple test case is really hard because gcc successfully built small other
> packages and I have no idea why I have this "undefined reference".
>
> I was able to compiling gcc with -O2 (with gcc built with -O0) then to build
> glibc successfully.
>
> Please find enclosed the build.log of glibc.
How did you build GCC with -O0? I never have any problems glibc build
using GCC built with -O0. I configure GCC -O0 build with
CC="gcc" CXX="g++" BOOT_CFLAGS="-O0 -g" CFLAGS="-O0 -g" BOOT_CXXFLAGS="-g"
CXXFLAGS="-g" CFLAGS_FOR_TARGET="-O2 -g" CXXFLAGS_FOR_TARGET="-O2 -g"
/export/gnu/import/git/sources/gcc/configure --disable-bootstrap
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
` (4 preceding siblings ...)
2020-07-18 11:20 ` hjl.tools at gmail dot com
@ 2020-07-18 11:50 ` legarrec.vincent at gmail dot com
2020-07-18 15:01 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: legarrec.vincent at gmail dot com @ 2020-07-18 11:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #6 from LE GARREC Vincent <legarrec.vincent at gmail dot com> ---
My log says :
>>> Configuring source in /var/tmp/portage/sys-devel/gcc-10.1.0-r2/work/gcc-10.1.0 ...
* CFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
* CXXFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
* LDFLAGS="-Wl,-O0 -Wl,--as-needed"
* PREFIX: /usr
* BINPATH: /usr/x86_64-pc-linux-gnu/gcc-bin/10.1.0
* LIBPATH: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0
* DATAPATH: /usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0
* STDCXX_INCDIR: /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include/g++-v10
* Languages: c,c++,fortran
* Configuring GCC with:
* --host=x86_64-pc-linux-gnu
* --build=x86_64-pc-linux-gnu
* --prefix=/usr
* --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/10.1.0
* --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include
* --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0
* --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0/man
* --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/10.1.0/info
*
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/include/g++-v10
* --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/10.1.0/python
* --enable-languages=c,c++,fortran
* --enable-obsolete
* --enable-secureplt
* --disable-werror
* --with-system-zlib
* --disable-nls
* --enable-checking=release
* --with-bugurl=https://bugs.gentoo.org/
* --with-pkgversion=Gentoo 10.1.0-r2 p3
* --disable-esp
* --enable-libstdcxx-time
* --enable-shared
* --enable-threads=posix
* --enable-__cxa_atexit
* --enable-clocale=gnu
* --enable-multilib
* --with-multilib-list=m32,m64
* --disable-fixed-point
* --enable-targets=all
* --enable-libgomp
* --disable-libmudflap
* --disable-libssp
* --disable-libada
* --disable-systemtap
* --enable-vtable-verify
* --without-zstd
* --enable-lto
* --without-isl
* --enable-default-pie
* --enable-default-ssp
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
` (5 preceding siblings ...)
2020-07-18 11:50 ` legarrec.vincent at gmail dot com
@ 2020-07-18 15:01 ` hjl.tools at gmail dot com
2020-10-28 16:57 ` legarrec.vincent at gmail dot com
2020-10-29 14:52 ` legarrec.vincent at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: hjl.tools at gmail dot com @ 2020-07-18 15:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to LE GARREC Vincent from comment #6)
> My log says :
>
> >>> Configuring source in /var/tmp/portage/sys-devel/gcc-10.1.0-r2/work/gcc-10.1.0 ...
> * CFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
> * CXXFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
I don't think it works. You can compile GCC compiler with -O0. But
you need to compile GCC run-time at least with -O. Please add
CFLAGS_FOR_TARGET="-O2 -g"
CXXFLAGS_FOR_TARGET="-O2 -g"
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
` (6 preceding siblings ...)
2020-07-18 15:01 ` hjl.tools at gmail dot com
@ 2020-10-28 16:57 ` legarrec.vincent at gmail dot com
2020-10-29 14:52 ` legarrec.vincent at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: legarrec.vincent at gmail dot com @ 2020-10-28 16:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #8 from LE GARREC Vincent <legarrec.vincent at gmail dot com> ---
Thanks, you're right. I was able to build with
CFLAGS="-march=native -ggdb2 -g2 -pipe -fno-omit-frame-pointer -O0"
CXXFLAGS="-march=native -ggdb2 -g2 -pipe -fno-omit-frame-pointer -O0"
but with adding :
export CFLAGS_FOR_TARGET="-O2 -g"
export CXXFLAGS_FOR_TARGET="-O2 -g"
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/96217] undefined reference to `_Unwind_Resume'
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
` (7 preceding siblings ...)
2020-10-28 16:57 ` legarrec.vincent at gmail dot com
@ 2020-10-29 14:52 ` legarrec.vincent at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: legarrec.vincent at gmail dot com @ 2020-10-29 14:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96217
--- Comment #9 from LE GARREC Vincent <legarrec.vincent at gmail dot com> ---
For the record : the bug I opened in glibc bugzilla :
https://sourceware.org/bugzilla/show_bug.cgi?id=26260
Like gcc, glibc doesn't supports -O0
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-10-29 14:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 11:50 [Bug other/96217] New: undefined reference to `_Unwind_Resume' legarrec.vincent at gmail dot com
2020-07-17 6:48 ` [Bug other/96217] " rguenth at gcc dot gnu.org
2020-07-17 7:24 ` legarrec.vincent at gmail dot com
2020-07-17 9:02 ` jakub at gcc dot gnu.org
2020-07-17 19:59 ` legarrec.vincent at gmail dot com
2020-07-18 11:20 ` hjl.tools at gmail dot com
2020-07-18 11:50 ` legarrec.vincent at gmail dot com
2020-07-18 15:01 ` hjl.tools at gmail dot com
2020-10-28 16:57 ` legarrec.vincent at gmail dot com
2020-10-29 14:52 ` legarrec.vincent at gmail dot com
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).