On Mon, 10 May 2021, 21:49 Volker Braun, <vbraun.n...@gmail.com> wrote:

> "Dual" refers to libstdc++ here, i.e. you only have one standard library
> supporting both abi's.
>
> Other libraries generally are only one or the other, this is what is
> controlled by the -D_GLIBCXX_USE_CXX11_ABI; Theoretically you could make
> your own dual-abi library but you'd have to plaster
> __attribute__((abi_tag("cxx11"))) everywhere, so hell no.
>

as Francois reports above, on Gentoo he has libgivaro providing two
interfaces, one with abi:c++11, and one without.

Apparently, done by by setting a gcc option, as mentioned by Steven.


> What I'm saying is: if you provide the same value for
> -D_GLIBCXX_USE_CXX11_ABI as what was used for the system givaro then you
> should be able to link them together.
>
>
>
> On Monday, May 10, 2021 at 2:27:44 PM UTC+2 dim...@gmail.com wrote:
>
>> On Sunday, May 9, 2021 at 11:24:23 AM UTC+1 Volker Braun wrote:
>>
>>> This is c++11 dual abi, see
>>> https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
>>>
>>> IMHO we just shouldn't use the system version then, but building Sage
>>> with -D_GLIBCXX_USE_CXX11_ABI=0 should allow you to link with old-style abi
>>> libraries.
>>>
>>> The default value of _GLIBCXX_USE_CXX11_ABI can be changed by the
>>> distro, which is probably what accounts for the differences seen in this
>>> thread.
>>>
>>
>> Are you saying it's a bug in Fedora 32, they should have provided dual
>> ABI, like Gentoo does, but they don't?
>> Or that they provide an old-style ABI, and we can use `
>> -D_GLIBCXX_USE_CXX11_ABI=0` to make this work for Sage?
>> Isn't c++11 "old" nowadays?
>>
>> I tried to write a short C++ code do produce this error, so that we can
>> put it into our gcc/spkg-configure.m4, but I cannot
>> figure it out.
>>
>>
>>
>>
>>>
>>>
>>> On Saturday, May 8, 2021 at 7:01:13 PM UTC+2 Steven Trogdon wrote:
>>>
>>>> Building Givaro on Gentoo I have
>>>>
>>>> CXXFLAGS=-O2 -pipe -march=native -O2 -pipe   -fabi-version=6   -msse
>>>> -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx
>>>>
>>>> Your Redhat has
>>>>
>>>> CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security
>>>> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
>>>> -fstack-protector-strong -grecord-gcc-switches
>>>> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
>>>> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
>>>> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
>>>>
>>>> Could the  abi-version=6 be the issue?
>>>>
>>>> On Saturday, May 8, 2021 at 6:01:02 AM UTC-6 dim...@gmail.com wrote:
>>>>
>>>>> one has
>>>>> https://kojipkgs.fedoraproject.org//packages/givaro/4.1.1/1.fc32/data/logs/x86_64/build.log
>>>>> and other logs there
>>>>>
>>>>> On Saturday, May 8, 2021 at 12:45:07 PM UTC+1 Dima Pasechnik wrote:
>>>>>
>>>>>> On Saturday, May 8, 2021 at 12:34:11 PM UTC+1 François Bissey wrote:
>>>>>>
>>>>>>> What compiler and flags have used to compile fedora 32 givaro? Can
>>>>>>> we easily find out?
>>>>>>
>>>>>>
>>>>>> the compiler used to build Sage is g++ 10.2.1
>>>>>>
>>>>>> $ g++ -v
>>>>>> Using built-in specs.
>>>>>> COLLECT_GCC=/usr/bin/g++
>>>>>>
>>>>>> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
>>>>>> OFFLOAD_TARGET_NAMES=nvptx-none
>>>>>> OFFLOAD_TARGET_DEFAULT=1
>>>>>> Target: x86_64-redhat-linux
>>>>>> Configured with: ../configure --enable-bootstrap
>>>>>> --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr
>>>>>> --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=
>>>>>> http://bugzilla.redhat.com/bugzilla --enable-shared
>>>>>> --enable-threads=posix --enable-checking=release --enable-multilib
>>>>>> --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
>>>>>> --enable-gnu-unique-object --enable-linker-build-id
>>>>>> --with-gcc-major-version-only --with-linker-hash-style=gnu 
>>>>>> --enable-plugin
>>>>>> --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none
>>>>>> --without-cuda-driver --enable-gnu-indirect-function --enable-cet
>>>>>> --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
>>>>>> Thread model: posix
>>>>>> Supported LTO compression algorithms: zlib zstd
>>>>>> gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC)
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> > On 8/05/2021, at 23:31, Dima Pasechnik <dim...@gmail.com> wrote:
>>>>>>> >
>>>>>>> > With system Givaro, one gets
>>>>>>> >
>>>>>>> > [dochtml] ImportError:
>>>>>>> /home/scratch2/dimpase/sage/sage/local/lib64/python3.8/site-packages/sage/matrix/
>>>>>>> matrix_modn_sparse.cpython-38-x86_64-linux-gnu.so: undefined
>>>>>>> symbol:
>>>>>>> _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev
>>>>>>>
>>>>>>> > make[3]: *** [Makefile:2280: doc-html] Error 1
>>>>>>> >
>>>>>>> > which demangled says
>>>>>>> >
>>>>>>> > $ c++filt
>>>>>>> _ZNK6Givaro7IntegercvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev
>>>>>>>
>>>>>>> > Givaro::Integer::operator std::__cxx11::basic_string<char,
>>>>>>> std::char_traits<char>, std::allocator<char> >[abi:cxx11]() const
>>>>>>> >
>>>>>>> > The system library has Givaro::Integer::operator
>>>>>>> std::__cxx11::basic_string<char, std::char_traits<char>,
>>>>>>> std::allocator<char> >() const
>>>>>>> >
>>>>>>> > (no of that weird [abi:cxx11] qualifier)
>>>>>>> >
>>>>>>> > Any ideas how to fix this? (besides not using system Givaro) ?
>>>>>>> >
>>>>>>> > Dima
>>>>>>> >
>>>>>>> > --
>>>>>>> > 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/b187faf3-50c4-42c4-ae37-77c5a3902bbcn%40googlegroups.com.
>>>>>>>
>>>>>>>
>>>>>>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-devel/4671c351-5503-48d4-8b52-635a238ec78dn%40googlegroups.com
> <https://groups.google.com/d/msgid/sage-devel/4671c351-5503-48d4-8b52-635a238ec78dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq2%3DbZQu90eVLU29LV7xJVZsDHneLZH369XYQupCZpnkQA%40mail.gmail.com.

Reply via email to