[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-08-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jonathan Wakely  ---
Fixed for 12.3 and 13.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-08-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #10 from CVS Commits  ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
:

https://gcc.gnu.org/g:c9c0684ad3092e5aa50453903c09959cb2e83fc7

commit r12-8707-gc9c0684ad3092e5aa50453903c09959cb2e83fc7
Author: Jonathan Wakely 
Date:   Mon Aug 22 17:24:27 2022 +0100

libstdc++: Document linker option for C++23  [PR105678]

libstdc++-v3/ChangeLog:

PR libstdc++/105678
* doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
requirement for using std::stacktrace. Also adjust -frtti and
-fexceptions to document non-default (i.e. negative) forms.
* doc/html/*: Regenerate.

(cherry picked from commit cc4fa7a210b638d6a46f14dab17f2361389d18e1)

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-08-22 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |12.3

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-08-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:cc4fa7a210b638d6a46f14dab17f2361389d18e1

commit r13-2145-gcc4fa7a210b638d6a46f14dab17f2361389d18e1
Author: Jonathan Wakely 
Date:   Mon Aug 22 17:24:27 2022 +0100

libstdc++: Document linker option for C++23  [PR105678]

libstdc++-v3/ChangeLog:

PR libstdc++/105678
* doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
requirement for using std::stacktrace. Also adjust -frtti and
-fexceptions to document non-default (i.e. negative) forms.
* doc/html/*: Regenerate.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

Jonathan Wakely  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Resolution|FIXED   |---

--- Comment #8 from Jonathan Wakely  ---
http://c-faq.com/lib/libsearch.html is the reference I usually give.

I'm reopening this until I've updated the docs.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-23 Thread fcolecumberri at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

Francisco  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #7 from Francisco  ---
NOW IT COMPILE!!!

(And now I have learned a new thing about static linking)

Then it crashes on `segmentation fault (core dumped)`,

since I know this is still experimental, I assume this is on the expected
scope.

Thanks a lot.

I am going to mark it as resolved since the `Undefined reference` stuff is
resolved.

Thanks

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #6 from Andrew Pinski  ---
Try:
g++ -std=gnu++2b cpp_file.cpp -lstdc++_libbacktrace 

That is put the library after the source file. Static libraries are always
order depedendent.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-23 Thread fcolecumberri at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #5 from Francisco  ---
I have no idea of what's happening, I have tried

```bash
g++ -std=gnu++2b -lstdc++_libbacktrace cpp_file.cpp
```

and

```bash
g++ -std=gnu++2b -L/usr/lib/libstdc++_libbacktrace.a cpp_file.cpp
```

(also tried with -static-libstdc++)

and I just got the same result.

However if I use `readelf` over /usr/lib/libstdc++_libbacktrace.a I can see the
symbols there.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #4 from Jonathan Wakely  ---
(In reply to Francisco from comment #0)
> Maybe I am missing something, 

Yes, you need to link to the extra lib that gets built by the extra configure
option you gave.

> maybe the documentation is missing something,

Yes, it is.

> or maybe this is still very experimental.

Yes, it is.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||documentation
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2022-05-23
 Ever confirmed|0   |1

--- Comment #3 from Jonathan Wakely  ---
As documented at https://gcc.gnu.org/gcc-12/changes.html#libstdcxx "requires
linking to an extra library"..

You need -lstdc++_libbacktrace although I haven't put that in the libstdc++
manual yet, and the name of that library might change (it should at least be
consistent with the --enable-libstdcxx-blah configure option to build it, and
currently they're not consistent, which was dumb of me).

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-20 Thread fcolecumberri at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #2 from Francisco  ---
just tried

```bash
 g++ -std=gnu++2b -static-libstdc++ cpp_file.cpp
```

but same result.

[Bug libstdc++/105678] Undefined reference to stacktrace standard library

2022-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105678

--- Comment #1 from Andrew Pinski  ---
I suspect it is missing from the linker script for versioning.
Using -static-libstdc++ should be a workaround.