public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge
@ 2024-06-25 5:19 sadineniharish8446 at gmail dot com
2024-06-25 5:23 ` [Bug gcov-profile/115628] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: sadineniharish8446 at gmail dot com @ 2024-06-25 5:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115628
Bug ID: 115628
Summary: undefined reference to `__gcov_merge
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: sadineniharish8446 at gmail dot com
Target Milestone: ---
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/115628] undefined reference to `__gcov_merge
2024-06-25 5:19 [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge sadineniharish8446 at gmail dot com
@ 2024-06-25 5:23 ` pinskia at gcc dot gnu.org
2024-06-25 5:34 ` sadineniharish8446 at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-25 5:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115628
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2024-06-25
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Did you accidently submit the bug report without any message?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/115628] undefined reference to `__gcov_merge
2024-06-25 5:19 [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge sadineniharish8446 at gmail dot com
2024-06-25 5:23 ` [Bug gcov-profile/115628] " pinskia at gcc dot gnu.org
@ 2024-06-25 5:34 ` sadineniharish8446 at gmail dot com
2024-06-25 5:39 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: sadineniharish8446 at gmail dot com @ 2024-06-25 5:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115628
--- Comment #2 from sadineniharish8446 at gmail dot com ---
I was trying build source code coverage for gcc but while running the tests we
are getting the following errors:
crtstuff.c:(.text.exit+0x5): undefined reference to `__gcov_exit'^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1
FAIL: g++.old-deja/g++.other/static13.C -std=c++98 (test for excess errors)
Excess errors:
/usr/bin/ld:
/home/hsadineni/newgcc/gcc/build/gcc/testsuite/g++/../../crtbegin.o:(.data+0x80):
undefined reference to `__gcov_merge_add'
crtstuff.c:(.text.startup+0xa): undefined reference to `__gcov_init'
crtstuff.c:(.text.exit+0x5): undefined reference to `__gcov_exit'
Reproducible steps:
../configure --enable-languages=c++ --enable-coverage --disable-bootstrap
--disable-multilib CFLAGS="-ftest-coverage -fprofile-arcs"
CXXFLAGS="-ftest-coverage -fprofile-arcs " LDFLAGS="--coverage"
make -j $(nproc)
make check-gcc RUNTESTFLAGS="old-deja.exp=g++.other/rtti4.C"
can you please let me know, whether its potential bug or any flags(or)
configuration need to be added.
even, i have by tried passing -lgcov flag in LDFLAGS but still getting the same
error.
thanks,
Harish
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/115628] undefined reference to `__gcov_merge
2024-06-25 5:19 [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge sadineniharish8446 at gmail dot com
2024-06-25 5:23 ` [Bug gcov-profile/115628] " pinskia at gcc dot gnu.org
2024-06-25 5:34 ` sadineniharish8446 at gmail dot com
@ 2024-06-25 5:39 ` pinskia at gcc dot gnu.org
2024-06-25 8:43 ` sadineniharish8446 at gmail dot com
2024-06-25 22:24 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-25 5:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115628
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|undefined reference to |undefined reference to
|`__gcov_merge_add' |`__gcov_merge
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to sadineniharish8446 from comment #2)
> I was trying build source code coverage for gcc but while running the tests
> we are getting the following errors:
> crtstuff.c:(.text.exit+0x5): undefined reference to `__gcov_exit'^M
> collect2: error: ld returned 1 exit status^M
> compiler exited with status 1
> FAIL: g++.old-deja/g++.other/static13.C -std=c++98 (test for excess errors)
> Excess errors:
> /usr/bin/ld:
> /home/hsadineni/newgcc/gcc/build/gcc/testsuite/g++/../../crtbegin.o:(.
> data+0x80): undefined reference to `__gcov_merge_add'
> crtstuff.c:(.text.startup+0xa): undefined reference to `__gcov_init'
> crtstuff.c:(.text.exit+0x5): undefined reference to `__gcov_exit'
>
> Reproducible steps:
>
> ../configure --enable-languages=c++ --enable-coverage --disable-bootstrap
> --disable-multilib CFLAGS="-ftest-coverage -fprofile-arcs"
> CXXFLAGS="-ftest-coverage -fprofile-arcs " LDFLAGS="--coverage"
Yes this is not going to work as you are compiling libgcc with -ftest-coverage
which will almost never work.
you just need either --enable-coverage or --enable-coverage=opt .
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/115628] undefined reference to `__gcov_merge
2024-06-25 5:19 [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge sadineniharish8446 at gmail dot com
` (2 preceding siblings ...)
2024-06-25 5:39 ` pinskia at gcc dot gnu.org
@ 2024-06-25 8:43 ` sadineniharish8446 at gmail dot com
2024-06-25 22:24 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: sadineniharish8446 at gmail dot com @ 2024-06-25 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115628
--- Comment #4 from sadineniharish8446 at gmail dot com ---
we ate trying to take coverage for libstdc++, I have tried following
configuration options but getting same error.
../configure --enable-languages=c,c++ - --disable-bootstrap --disable-multilib
CFLAGS="-ftest-coverage -fprofile-arcs" CXXFLAGS="-ftest-coverage
-fprofile-arcs " LDFLAGS="--coverage"
can you please let me know which configuration will work.
thanks,
Harish
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/115628] undefined reference to `__gcov_merge
2024-06-25 5:19 [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge sadineniharish8446 at gmail dot com
` (3 preceding siblings ...)
2024-06-25 8:43 ` sadineniharish8446 at gmail dot com
@ 2024-06-25 22:24 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-25 22:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115628
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to sadineniharish8446 from comment #4)
> we ate trying to take coverage for libstdc++, I have tried following
> configuration options but getting same error.
>
> ../configure --enable-languages=c,c++ - --disable-bootstrap
> --disable-multilib CFLAGS="-ftest-coverage -fprofile-arcs"
> CXXFLAGS="-ftest-coverage -fprofile-arcs " LDFLAGS="--coverage"
>
>
> can you please let me know which configuration will work.
Try setting CXXFLAGS_FOR_TARGET only. Note this is not the right place to get
help like this. gcc@ (and libstdc++@) mailing list are better places to ask for
help on getting this working and only filing a bug if there is no way in the
end.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-25 22:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25 5:19 [Bug gcov-profile/115628] New: undefined reference to `__gcov_merge sadineniharish8446 at gmail dot com
2024-06-25 5:23 ` [Bug gcov-profile/115628] " pinskia at gcc dot gnu.org
2024-06-25 5:34 ` sadineniharish8446 at gmail dot com
2024-06-25 5:39 ` pinskia at gcc dot gnu.org
2024-06-25 8:43 ` sadineniharish8446 at gmail dot com
2024-06-25 22:24 ` 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).