Re: C++11, std::list::size(), and trusty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 25, 2017 at 10:43 PM, kefu chai <tchaikov@xxxxxxxxx> wrote:
> On Sat, Dec 23, 2017 at 5:46 PM, Xuehan Xu <xxhdx1985126@xxxxxxxxx> wrote:
>> Hi, everyone.
>>
>> I'm using CentOS 7 with devtoolset-7 to build ceph. However, I found
>> that the list::size() in my ceph executables is still counting the
>> number of nodes. It's so odd, I googled it, and found that this may
>> have something to do with _GLIBCXX_USE_CXX11_ABI. But even if I
>> explicitly set _GLIBCXX_USE_CXX11_ABI to 1 when building ceph, the
>> problem remains. It seems that _GLIBCXX_USE_CXX11_ABI is set to 0 by
>> gcc no matter how I build the source code, even with
>> -D_GLIBCXX_USE_CXX11_ABI=1.
>
> Xuehan, thanks for testing!
>
> turns out the gcc-7 in devtoolset is compiled with
> "--with-default-libstdcxx-abi=gcc4-compatible", see the output of "g++
> -v", so it is using "_GLIBCXX_USE_CXX11_ABI=0", you can by checking
> /opt/rh/devtoolset-7/root/usr/include/c++/7/x86_64-redhat-linux/bits/c++config.h
> .
>
> in other words, we still need https://github.com/ceph/ceph/pull/18755.


hmm, probably not.

 add_definitions(-D_GLIBCXX_USE_CXX11_ABI=1)

and

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fabi-version=0")

might help. I will give it a try tomorrow.



-- 
Regards
Kefu Chai
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux