-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Required prerequisites
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
- Consider asking first in the Gitter chat room or in a Discussion.
What version (or hash if on master) of pybind11 are you using?
v3.0.1
Problem description
The doc says:
Supported compilers
2. GCC 4.8 or newer
But actually pybind11 failed to compile with gcc-4.8.5:
$ g++ test.cpp -std=gnu++11 -I../pybind11/include -lpython3.8
In file included from ../pybind11/include/pybind11/detail/internals.h:12:0,
from ../pybind11/include/pybind11/detail/native_enum_data.h:9,
from ../pybind11/include/pybind11/cast.h:15,
from ../pybind11/include/pybind11/attr.h:14,
from ../pybind11/include/pybind11/detail/class.h:12,
from ../pybind11/include/pybind11/pybind11.h:12,
from test.cpp:1:
../pybind11/include/pybind11/conduit/pybind11_platform_abi_id.h:75:10: error: #error "Unknown platform or compiler: PLEASE REVISE THIS CODE."
error "Unknown platform or compiler: PLEASE REVISE THIS CODE."
^
This error is generated because _GLIBCXX_USE_CXX11_ABI which is introduced in gcc-5.x is not defined.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
Are we going to fix gcc-4.x or raise the platform requirements?
Reproducible example code
#include "pybind11/pybind11.h"
int main()
{
return 0;
}
Is this a regression? Put the last known working version here if it is.
v2.13.6