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

Compilation of pybind11 drivers fails with compiler crash on Ubuntu 18.04 with gcc 7.5.0 #3

Open
ThomasGWilson opened this issue Sep 14, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@ThomasGWilson
Copy link

I am trying to install celerite2 using pip (version=20.2.3) with python3.7 on an Ubuntu18.04 machine, however I get the following error when pip is trying to build wheels for celerite2:

ERROR: Failed building wheel for celerite2
Failed to build celerite2
ERROR: Could not build wheels for celerite2 which use PEP 517 and cannot be installed directly

Thanks,
Tom

@dfm
Copy link
Member

dfm commented Sep 15, 2020

Hi! This package hasn't really been officially released yet so expect some rough edges (isn't that always true)!

Can you give me some more details?

  • I expect that you're installing from source (by cloning from GitHub), but can you give the specific steps you're executing.
  • Also: can you add the -v argument to the pip call and share the output in a gist or something? The current error is not sufficient to diagnose.

@ThomasGWilson
Copy link
Author

Hi,

Completely understandable :)

Of course, I'm installing from the GitHub clone: pip install git+https://github.com/dfm/celerite2.git

Here's the gist: https://gist.github.com/ThomasGWilson/4a4821a28b6ed6739284d6d1a19c44d4

Cheers,
Tom

@dfm
Copy link
Member

dfm commented Sep 15, 2020

That gist doesn't seem to be complete (it doesn't have the error!), but I can see an issue. It won't be possible to install from source like that. Instead you should follow the steps here: https://celerite2.readthedocs.io/en/latest/user/install/#from-source With the added note that you'll need to include --recursive in the git clone step. Give that a try and send along the error if it fails again.

@ThomasGWilson
Copy link
Author

Hi,

That gist is >3000 lines so the error was beyond the truncation point. Here is the full previous report (https://gist.githubusercontent.com/ThomasGWilson/4a4821a28b6ed6739284d6d1a19c44d4/raw/fe433cb75589e2c980b30ab829fc3bc764dc31c3/gistfile1.txt)

Thanks! I've installed via the steps you recommended, however I'm getting a similar error. Here is the full report (https://gist.githubusercontent.com/ThomasGWilson/29b1399905ff8e8ef4779a4733ba836c/raw/86575a1a70b0033aceff0bba77e74189211bbd34/gistfile1.txt)

The common error here seems to be an issue with one of the gcc arguments:

gcc -pthread -B /home/tom/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ic++/include -Ic++/vendor/eigen -Ipython/celerite2 -I/tmp/pip-build-env-2mpwi2p9/overlay/lib/python3.7/site-packages/numpy/core/include -I/tmp/pip-build-env-2mpwi2p9/overlay/lib/python3.7/site-packages/pybind11/include -I/tmp/pip-build-env-2mpwi2p9/overlay/lib/python3.7/site-packages/pybind11/include -I/home/tom/anaconda3/include/python3.7m -c python/celerite2/driver.cpp -o build/temp.linux-x86_64-3.7/python/celerite2/driver.o -DVERSION_INFO="0.0.1rc2.dev18+gfabb85c" -std=c++17 -fvisibility=hidden
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
error: command 'gcc' failed with exit status 4

For completeness I have gcc version 7.5.0 installed.

@dfm
Copy link
Member

dfm commented Sep 15, 2020

Good thanks. That suggests to me that your compiler is running out of RAM or something. Compiling these extensions can be pretty heavy! I'm not sure that I can do too much to diagnose this from here, but we can keep this open to re-investigate later.

In your case, I'd probably recommend trying the pre-compiled binaries unless you have a good argument for avoiding them (or if you're running into issues with them):

python -m pip install celerite2==0.0.1rc1

Nothing has changed (except documentation) since that release candidate.

@dfm dfm changed the title Failure to build celerite2 wheels using PEP517 Compilation of pybind11 drivers fails with compiler crash on Ubuntu 18.04 with gcc 7.5.0 Sep 15, 2020
@dfm dfm added the bug Something isn't working label Sep 15, 2020
@ThomasGWilson
Copy link
Author

Hi Dan,

Thanks, that has worked!

Cheers,

Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants