Linking to libstdc++

33 views
Skip to first unread message

Isuru Fernando

unread,
Jun 14, 2020, 12:03:31 AM6/14/20
to sage-devel
Hi,

Anybody know why sage is linking to libstdc++?

In OSX, we don't need libstdc++, because we are using libc++. Git history says it was added 13 years ago by William Stein.

Isuru

François Bissey

unread,
Jun 14, 2020, 12:10:25 AM6/14/20
to sage-...@googlegroups.com
That far back? It was probably something like ntl or singular (or something that has since then
been removed) that didn’t link properly.
More seriously, it may have been because the linker used was gcc instead of g++ even when linking
C++ code. We know there is/was that issue about C/C++ compiler in distutils (I haven’t been keeping
track, are we still patching python for that in distros?).
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/CA%2B01voM7gDVO%3DAxbCJMXM2dqrufkDhHH1EqsDsP15%2Byo8e6KFw%40mail.gmail.com.

Isuru Fernando

unread,
Jun 14, 2020, 12:26:12 AM6/14/20
to sage-devel
Yes, it was probably NTL related. https://github.com/sagemath/sage/commit/bc333c78b0369377657452e340cb6b3f27c5cee0

I think distutils now knows to link with the C++ compiler even though it compiles C++ sources with a C compiler. OSX build works fine without `libc++` being linked in explicitly, so that must mean that we are using clang++ on OSX at the correct place, right?

Isuru

François Bissey

unread,
Jun 14, 2020, 12:29:41 AM6/14/20
to sage-...@googlegroups.com


> On 14/06/2020, at 4:25 PM, Isuru Fernando <isu...@gmail.com> wrote:
>
> Yes, it was probably NTL related. https://github.com/sagemath/sage/commit/bc333c78b0369377657452e340cb6b3f27c5cee0
>

Nice digging. libcsage is no more and it’s been a while.


> I think distutils now knows to link with the C++ compiler even though it compiles C++ sources with a C compiler. OSX build works fine without `libc++` being linked in explicitly, so that must mean that we are using clang++ on OSX at the correct place, right?
>

I would think so.

François

Dima Pasechnik

unread,
Jun 14, 2020, 3:55:38 AM6/14/20
to sage-devel
Probably can be just removed.

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

François Bissey

unread,
Jun 14, 2020, 4:55:01 AM6/14/20
to sage-...@googlegroups.com
+1 - it should at least be tried.

Dima Pasechnik

unread,
Jun 14, 2020, 5:32:04 AM6/14/20
to sage-devel
please see https://trac.sagemath.org/ticket/29856 for a try to remove it
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/FD30818B-7F1C-48FD-9FEC-F40985DEEC45%40gmail.com.
Reply all
Reply to author
Forward
0 new messages