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

GCC 4.8 LTO Crashes #1415

Closed
ax3l opened this issue May 29, 2018 · 1 comment · Fixed by #2370
Closed

GCC 4.8 LTO Crashes #1415

ax3l opened this issue May 29, 2018 · 1 comment · Fixed by #2370
Assignees

Comments

@ax3l
Copy link
Collaborator

ax3l commented May 29, 2018

Issue description

Several places on the internet see build issues of pybind11 with GCC 4.8, probably in a linker bug during LTO:

lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478

Have you seen this with pybind11 before?

Is there a way to externally pass NO_EXTRAS in calls to pybind11_add_module via generic pybind11 CMake options? This would allow users to build pybind11 projects on GCC 4.8 without triggering the bug and without re-writing CMake files of packages (e.g. packaging solutions such as conda or spack).

Maybe this is also just a mismatch between dependencies in those reports in the compile chain?

Reproducible example code

I saw this recently on Travis-CI but can't reproduce it in docker containers (yet).

Works on Ubuntu Trusty:

$ docker pull ubuntu:14.04
$ docker run -it ubuntu:14.04

> apt-get update
> apt-get install -y python-dev python-pip git cmake g++ make
> pip install -U pytest

> git clone https://github.com/pybind/pybind11.git
# cd pybind11 && git checkout v2.2.2 && cd ..
> mkdir build
> cd build

> cmake ../pybind11
# gcc 4.8.4
> make
# ...

Surprisingly works on Centos 7:

$ docker pull centos:7
$ docker run -it centos:7

> yum -y update
> yum install -y epel-release
> yum install -y python-devel python-pip git cmake gcc gcc-c++ make
> pip install -U pytest
> git clone https://github.com/pybind/pybind11.git
> mkdir build
> cd build

> cmake ../pybind11
# gcc 4.8.5
> make
# ...
@henryiii
Copy link
Collaborator

I have an idea, actually, as a follow up to #2338.

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