-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Describe the bug
Assume std::__cxx11::basic_string is not compatible to std::string
To Reproduce
Steps to reproduce the behavior:
- python3 setup.py bdist_rpm
- python3.6 sed_cli.py --device=/dev/sdj
- A Seagate SATA SED drive
Expected behavior
My gcc is 11 under CentOS 7. The boost python lib through yum install may be complied without C++11 default. But pysed is compiled by C++ 11 default.
Screenshots
python3.6 sed_cli.py --device=/dev/sdj
Traceback (most recent call last):
File "sed_cli.py", line 1342, in
main(sys.argv)
File "sed_cli.py", line 1222, in main
SEDConfig = cSEDConfig(opts.device, opts.keymanager, opts)
File "sed_cli.py", line 169, in init
self.SED = SED(self.deviceHandle, callbacks=self)
File "/usr/lib64/python3.6/site-packages/TCGstorageAPI/tcgapi.py", line 254, in init
self.__pysed = pysed.Sed(dev, pysedSupport.getUidTables, PskCipherSuites, kwargs)
Boost.Python.ArgumentError: Python argument types in
Sed.init(Sed, str, function, type, dict)
did not match C++ signature:
init(_object*, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, boost::python::api::object, boost::python::api::object, boost::python::dict)
Desktop (please complete the following information):
- OS: [CentOS 7.4
- Python 3.6
Additional context
If I compile pysed without C++11, the problem can disappear. The method is to add "-D_GLIBCXX_USE_CXX11_ABI=0" into setup.py file.
#extra_compile_args=['-O0','-g','-DDISABLE_NVME_PASSTHROUGH']
extra_compile_args=['-O0','-g','-DDISABLE_NVME_PASSTHROUGH','-D_GLIBCXX_USE_CXX11_ABI=0']