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

Unable to build Annoy 1.7.0 on Ubuntu 20.04.1 LTS #516

Closed
mpenkov opened this issue Nov 7, 2020 · 4 comments
Closed

Unable to build Annoy 1.7.0 on Ubuntu 20.04.1 LTS #516

mpenkov opened this issue Nov 7, 2020 · 4 comments

Comments

@mpenkov
Copy link

mpenkov commented Nov 7, 2020

I'm encountering a strange issue building Annoy as part of a Travis CI job.

Using Ubuntu 20.04.1 LTS and gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, I get this while trying to install annoy via pip:

Python 3.6.8
Collecting annoy
Downloading annoy-1.17.0.tar.gz (646 kB)
Building wheels for collected packages: annoy
Building wheel for annoy (setup.py): started
Building wheel for annoy (setup.py): finished with status 'error'
...
ERROR: Command errored out with exit status 1:
x86_64-linux-gnu-gcc: error: unrecognized command line option '-std=c++14'
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

This seems extremely strange to me, as the version of gcc I'm using (9.3.0) should definitely support -std=c++14. I'm out of ideas - is this something that has been reported before?

Here's the full output of our failing build, in case it contains useful info that I neglected to include directly here.

@mpenkov
Copy link
Author

mpenkov commented Nov 8, 2020

We figured out the cause, the build was running inside another container running an older version of gcc.

@mpenkov mpenkov closed this as completed Nov 8, 2020
@bikegirl
Copy link

bikegirl commented Jul 7, 2021

How was this issue solved? Can you elaborate more, I am also having the same error.

@mpenkov
Copy link
Author

mpenkov commented Jul 8, 2021

It was over a year ago, so I can't remember all the details, but long story short: There were several layers of Docker involved (yuck...), and we thought the build was running inside one container, when it was running in another (older) one deeper down the rabbithole.

@dyuan1111
Copy link

Look through all answers regarding this and the consensus is that it is due to the old version of gcc. I am not a root user thus cannot upgrade gcc. However, I found that installing annoy through conda-forge instead of pip successfully installed annoy.

conda install conda-forge::python-annoy

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

3 participants