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

esutil pip install fails on github actions using ubuntu-latest (22.04) #80

Closed
erykoff opened this issue Jan 5, 2023 · 6 comments
Closed

Comments

@erykoff
Copy link
Collaborator

erykoff commented Jan 5, 2023

I use pip in my github actions for redmapper. And the esutil installation failed today, apparently caused by the update of ubuntu-latest from 20.04 to 22.04 in November/December (it was a rolling release). Specifically requesting ubuntu-20.04 fixed the issue (temporarily).

The pip install error was the following:

      esutil/htm/htmc.h:111:47: error: ISO C++17 does not allow dynamic exception specifications
        111 |                         const char* filename) throw (const char *);
            |                                               ^~~~~

Which is strange because it should be explicitly setting c++11, but I noticed that the build line looks like:

      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/numpy/core/include -Iesutil/include -Iesutil/recfile -Iesutil/htm -Iesutil/htm/htm_src -I/opt/hostedtoolcache/Python/3.8.15/x64/include/python3.8 -c esutil/htm/htm_src/SpatialInterface.cpp -o build/temp.linux-x86_64-3.8/esutil/htm/htm_src/SpatialInterface.o

(That is, no use of the -std=c++11 which should be there.)

@esheldon
Copy link
Owner

esheldon commented Jan 6, 2023

thanks for this

@esheldon
Copy link
Owner

esheldon commented Jan 6, 2023

If the flag isn't being passed, this might be a python/pip issue

@jobovy
Copy link
Contributor

jobovy commented Jan 7, 2023

I think the issue is that @erykoff is pip installing the latest release, which doesn't include #75, so doesn't set -std=c++11. You could just try adding it to CFLAGS, that should work.

@jobovy
Copy link
Contributor

jobovy commented Jan 7, 2023

Also, the reason that this bug occurred when GHA switched to Ubuntu 22.04 is that the default GCC version changed to 11, which uses the C++17 standard by default:

@esheldon
Copy link
Owner

esheldon commented Jan 8, 2023

I tagged a new version and pushed to pypi

@esheldon
Copy link
Owner

is this working now?

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