public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so
@ 2023-05-02 13:00 dnewtonrichards at gmail dot com
  2023-05-02 13:12 ` [Bug sanitizer/109698] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dnewtonrichards at gmail dot com @ 2023-05-02 13:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

            Bug ID: 109698
           Summary: gcc/g++ build/link fails for libhwasan.so
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dnewtonrichards at gmail dot com
  Target Milestone: ---

building on 
Debian 10 (Buster)
uname -a:   Linux relativity1 4.19.0-23-amd64 #1 SMP Debian 4.19.269-1
(2022-12-20) x86_64 GNU/Linux
configure: 
--prefix=/usr/local/GCC --disable-nls --disable-multilib 
--enable-languages=c,c+

building with gcc/g++ version 12.2

stage_current: stage3

I make it as far as stage 3 and the build fails while linking
libhwasan.so.0.0.0

libtool: link:  /home/odysseus/Downloads/gcc-13.1.0/objdir/./gcc/xgcc
-shared-libgcc -B/home/odysseus/Downloads/gcc-13.1.0/objdir/./gcc -nostdinc++
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
-B/usr/local/GCC/x86_64-pc-linux-gnu/bin/
-B/usr/local/GCC/x86_64-pc-linux-gnu/lib/ -isystem
/usr/local/GCC/x86_64-pc-linux-gnu/include -isystem
/usr/local/GCC/x86_64-pc-linux-gnu/sys-include     -fPIC -DPIC -shared
-nostdlib /lib/x86_64-linux-gnu/crti.o
/home/odysseus/Downloads/gcc-13.1.0/objdir/./gcc/crtbeginS.o 
.libs/hwasan_allocation_functions.o .libs/hwasan_allocator.o .libs/hwasan.o
.libs/hwasan_dynamic_shadow.o .libs/hwasan_exceptions.o .libs/hwasan_fuchsia.o
.libs/hwasan_globals.o .libs/hwasan_interceptors.o
.libs/hwasan_interceptors_vfork.o .libs/hwasan_linux.o
.libs/hwasan_memintrinsics.o .libs/hwasan_new_delete.o .libs/hwasan_poisoning.o
.libs/hwasan_report.o .libs/hwasan_setjmp_aarch64.o
.libs/hwasan_setjmp_x86_64.o .libs/hwasan_tag_mismatch_aarch64.o
.libs/hwasan_thread.o .libs/hwasan_thread_list.o .libs/hwasan_type_test.o 
-Wl,--whole-archive ../sanitizer_common/.libs/libsanitizer_common.a
../interception/.libs/libinterception.a
../libbacktrace/.libs/libsanitizer_libbacktrace.a -Wl,--no-whole-archive 
-Wl,-rpath
-Wl,/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-Wl,-rpath -Wl,/usr/local/GCC/lib/../lib64
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
-ldl -lrt -lpthread ../../libstdc++-v3/src/.libs/libstdc++.so -lm
-L/home/odysseus/Downloads/gcc-13.1.0/objdir/./gcc -L/lib/x86_64-linux-gnu
-L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -lc -lgcc_s
/home/odysseus/Downloads/gcc-13.1.0/objdir/./gcc/crtendS.o
/lib/x86_64-linux-gnu/crtn.o  -mshstk   -Wl,-soname -Wl,libhwasan.so.0 -o
.libs/libhwasan.so.0.0.0
/usr/bin/ld: .libs/hwasan.o: relocation R_X86_64_PC32 against undefined symbol
`__ehdr_start' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:559: libhwasan.la] Error 1
make[4]: Leaving directory
'/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libsanitizer/hwasan'
make[3]: *** [Makefile:532: all-recursive] Error 1
make[3]: Leaving directory
'/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libsanitizer'
make[2]: *** [Makefile:419: all] Error 2
make[2]: Leaving directory
'/home/odysseus/Downloads/gcc-13.1.0/objdir/x86_64-pc-linux-gnu/libsanitizer'
make[1]: *** [Makefile:19101: all-target-libsanitizer] Error 2
make[1]: Leaving directory '/home/odysseus/Downloads/gcc-13.1.0/objdir'
make: *** [Makefile:1082: all] Error 2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
@ 2023-05-02 13:12 ` pinskia at gcc dot gnu.org
  2023-05-02 13:18 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-02 13:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=24458
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2023-05-02

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
What version of ld is this?

It might be bug there: 
https://sourceware.org/bugzilla/show_bug.cgi?id=24458

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
  2023-05-02 13:12 ` [Bug sanitizer/109698] " pinskia at gcc dot gnu.org
@ 2023-05-02 13:18 ` jakub at gcc dot gnu.org
  2023-05-02 14:40 ` dnewtonrichards at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-02 13:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems binutils has added support for __ehdr_start only in
https://sourceware.org/legacy-ml/binutils/2012-06/msg00171.html in 2012.  Do
you have binutils older than that?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
  2023-05-02 13:12 ` [Bug sanitizer/109698] " pinskia at gcc dot gnu.org
  2023-05-02 13:18 ` jakub at gcc dot gnu.org
@ 2023-05-02 14:40 ` dnewtonrichards at gmail dot com
  2023-05-02 14:42 ` dnewtonrichards at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dnewtonrichards at gmail dot com @ 2023-05-02 14:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

--- Comment #3 from David Richards <dnewtonrichards at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> What version of ld is this?
> 
> It might be bug there: 
> https://sourceware.org/bugzilla/show_bug.cgi?id=24458

ld --version:  
GNU ld (GNU Binutils for Debian) 2.31.1
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

Note:  I have built gcc/g++ version 12.2 without issue on this system...
Thanks!
Dave

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
                   ` (2 preceding siblings ...)
  2023-05-02 14:40 ` dnewtonrichards at gmail dot com
@ 2023-05-02 14:42 ` dnewtonrichards at gmail dot com
  2023-05-12 17:16 ` dnewtonrichards at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dnewtonrichards at gmail dot com @ 2023-05-02 14:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

--- Comment #4 from David Richards <dnewtonrichards at gmail dot com> ---
ld --version:
GNU ld (GNU Binutils for Debian) 2.31.1
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later
version.
This program has absolutely no warranty.
NOTE:  I have built gcc/g++ version 12.2 o0n this same system
Thanks!
Dave

On Tue, May 2, 2023 at 9:18 AM jakub at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698
>
> --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Seems binutils has added support for __ehdr_start only in
> https://sourceware.org/legacy-ml/binutils/2012-06/msg00171.html in 2012.
> Do
> you have binutils older than that?
>
> --
> You are receiving this mail because:
> You reported the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
                   ` (3 preceding siblings ...)
  2023-05-02 14:42 ` dnewtonrichards at gmail dot com
@ 2023-05-12 17:16 ` dnewtonrichards at gmail dot com
  2023-08-29  6:37 ` zeratul976 at hotmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dnewtonrichards at gmail dot com @ 2023-05-12 17:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

--- Comment #5 from David Richards <dnewtonrichards at gmail dot com> ---
To add a bit more (not much - just a tad).  I was able to build gcc/g++
version 12.3.0 just recently released without any problems.
Then I attempted to build 13.1 with 12.3 and still no luck. Same error...

On Tue, May 2, 2023 at 10:42 AM <gcc-bugzilla@gcc.gnu.org> wrote:

> Attachments with a MIME type of "text/html" are not allowed on this
> installation.
>
> David Richards wrote:
> > ld --version:
> > GNU ld (GNU Binutils for Debian) 2.31.1
> > Copyright (C) 2018 Free Software Foundation, Inc.
> > This program is free software; you may redistribute it under the terms of
> > the GNU General Public License version 3 or (at your option) a later
> > version.
> > This program has absolutely no warranty.
> > NOTE:  I have built gcc/g++ version 12.2 o0n this same system
> > Thanks!
> > Dave
> >
> > On Tue, May 2, 2023 at 9:18 AM jakub at gcc dot gnu.org <
> > gcc-bugzilla@gcc.gnu.org> wrote:
> >
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698
> > >
> > > --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> > > Seems binutils has added support for __ehdr_start only in
> > > https://sourceware.org/legacy-ml/binutils/2012-06/msg00171.html in
> 2012.
> > > Do
> > > you have binutils older than that?
> > >
> > > --
> > > You are receiving this mail because:
> > > You reported the bug.
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
                   ` (4 preceding siblings ...)
  2023-05-12 17:16 ` dnewtonrichards at gmail dot com
@ 2023-08-29  6:37 ` zeratul976 at hotmail dot com
  2023-08-29  6:45 ` zeratul976 at hotmail dot com
  2023-08-29  6:50 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: zeratul976 at hotmail dot com @ 2023-08-29  6:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

Nathan Ridge <zeratul976 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zeratul976 at hotmail dot com

--- Comment #6 from Nathan Ridge <zeratul976 at hotmail dot com> ---
I'm experiencing the same issue. I'm also on Debian 10 and using ld 2.31.1.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
                   ` (5 preceding siblings ...)
  2023-08-29  6:37 ` zeratul976 at hotmail dot com
@ 2023-08-29  6:45 ` zeratul976 at hotmail dot com
  2023-08-29  6:50 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: zeratul976 at hotmail dot com @ 2023-08-29  6:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

--- Comment #7 from Nathan Ridge <zeratul976 at hotmail dot com> ---
Based on some searching around for other users running into this error, this
seems to be caused by an ld bug which was fixed in 2.32:
https://sourceware.org/bugzilla/show_bug.cgi?id=24458

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug sanitizer/109698] gcc/g++ build/link fails for libhwasan.so
  2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
                   ` (6 preceding siblings ...)
  2023-08-29  6:45 ` zeratul976 at hotmail dot com
@ 2023-08-29  6:50 ` pinskia at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-29  6:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109698

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |MOVED

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-08-29  6:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 13:00 [Bug c++/109698] New: gcc/g++ build/link fails for libhwasan.so dnewtonrichards at gmail dot com
2023-05-02 13:12 ` [Bug sanitizer/109698] " pinskia at gcc dot gnu.org
2023-05-02 13:18 ` jakub at gcc dot gnu.org
2023-05-02 14:40 ` dnewtonrichards at gmail dot com
2023-05-02 14:42 ` dnewtonrichards at gmail dot com
2023-05-12 17:16 ` dnewtonrichards at gmail dot com
2023-08-29  6:37 ` zeratul976 at hotmail dot com
2023-08-29  6:45 ` zeratul976 at hotmail dot com
2023-08-29  6:50 ` pinskia at gcc dot gnu.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).