Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the compatibility by different gcc version #38

Open
rorychen opened this issue Dec 28, 2022 · 0 comments
Open

Improve the compatibility by different gcc version #38

rorychen opened this issue Dec 28, 2022 · 0 comments

Comments

@rorychen
Copy link

Describe the bug
Assume std::__cxx11::basic_string is not compatible to std::string

To Reproduce
Steps to reproduce the behavior:

  1. python3 setup.py bdist_rpm
  2. python3.6 sed_cli.py --device=/dev/sdj
  3. 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']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant