-
Notifications
You must be signed in to change notification settings - Fork 122
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
Build fails on Linux with GCC 9, 10, and 12 #63
Comments
I think that our current build machine uses gcc 12.2.0, as does my workspace (
These errors were on |
The (on the GCC 10.3 (The system g++ installed on this Linux machine):
GCC 12.2 (conda gcc/g++)
With those bazel commands I somehow run into a different error:
This particular error has something to do with glibc 2.17+ not requiring One note is that the error messages in the OP was during installation via |
The gcc 9 failures are known and expected --- we just need to change the documentation. The other issues ideally can be solved. Which Python version? |
I see, documentation could be updated. Having GCC 12 as a standard, recommended version sounds good, but due to GCC's incompatibility with CUDA (https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version) I hope that at least GCC 10.x could be supported. I think conda-shipped gcc 12.2 should work, but the linux system I'm particularly using has a bit old libstdc++ and glibc. Python -- fails both on Python 3.10 and 3.11. I was actually trying to build tensorstore for python 3.11 because there is no prebuilt wheel available (it'd be also great if an official py311 support can be added!), but build failure is also there on python 3.10 as well with the same environment. In this issue, I more look to C++ build commands and/or documentations could be improved so bazel build can work with different environment configurations. |
The I should try and setup an image to repro this. uname -a? You're running ubuntu and installed gcc how? |
Yes, my env is Ubuntu 20.04 LTS (focal), which ships with GCC 10. (Click to expand)
|
* gcc 10 build fails referencing static_rank field. * Change minimum gcc version to g++-10 These should help with #63 PiperOrigin-RevId: 489580988 Change-Id: I603f0aa94da7d2789220621c713911f838dbf6b3
tensorstore is an optional dependency for flax. In google#2520 it was added back as the normal dependency, but on some Linux and macOS environments tensorstore still fails to build (see google#2341, google/tensorstore#63).
Just wanted to report that, with GCC 10.4 + and GCC 11, the build process (both |
@sameeul Are you also using gcc from conda? It appears that it lacks proper C11 support, which is required by boringssl. For example, after installing conda-forge: echo -e "#include <assert.h>\nstatic_assert(1);" > test.c
gcc -std=c11 -c test.cc Fails with
In particular, if you look at |
I filed upstream issue: conda-forge/linux-sysroot-feedstock#44 |
@jbms : yes, I was using conda gcc in cases where my build was failing. The cases where it was working were compilers that came directly from debian-bullseye repo. Thanks for looking into it. |
Someone can help to fix this problem? Im triying to install tensorstore in a nvidia jetson orin nano arm64:
Any suggestion I will appreciate it guys, thanks so much. |
What is your compiler version? |
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Some minutes ago I updated the gcc to 10.5 now again appears the 9.4.0 I did: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 |
It should work with GCC 10, but it will build using whatever is the default version of gcc and g++ in your path. You may need to do update-alternatives for both gcc and g++, and confirm their versions via |
Thanks for the reply. I should have the same version for gcc and g++? Now I'm getting this error:
Now I updated the gcc version, now is permanent.:
However the g++ has this versión:
Should I update the g++? thanks |
Yes, you will need to upgrade g++ as well to the same version. |
Thanks so much, now I was able to install tensorstore. |
https://google.github.io/tensorstore/installation.html says Build dependencies are GCC 9 or later, but it seems that tensorstore cannot be built using GCC 9 or 10. What is the minimum required version of GCC/G++?
Environment: Ubuntu 20.04 Focal LTS
tensorstore: 0.1.28 (08-11-2022)
GCC 9.x: ./tensorstore/box.h:214:44: error: expected template-name before '<' token
GCC 10.x: python_headers/object.h:136:30: error: lvalue required as left operand of assignment
GCC 12.x: com_google_boringssl/src/crypto/refcount_c11.c:29:15: error: expected declaration specifiers or '...'
Command I ran in the above:
pip install tensorstore
The text was updated successfully, but these errors were encountered: