Coder Social home page Coder Social logo

Comments (10)

laramiel avatar laramiel commented on May 14, 2024

I think that our current build machine uses gcc 12.2.0, as does my workspace (gcc (Debian 12.2.0-3) 12.2.0).
Can you run the following in each build environment and tell me what it says:

./bazelisk.py build tensorstore/...
`./bazelisk.py info output_base`/external/local_config_cc/cc_wrapper.sh --version

These errors were on pip install tensorstore? What's your os, other environment like, because we should have prebuilt packages from github CI.

from tensorstore.

wookayin avatar wookayin commented on May 14, 2024

The cc_wrapper.sh --version prints the same one as gcc --version on the $PATH.

(on the master branch)

GCC 10.3 (The system g++ installed on this Linux machine):

❯❯❯ which -a gcc g++
gcc: aliased to nocorrect gcc
/bin/gcc
/usr/bin/gcc
/bin/g++
/usr/bin/g++

❯❯❯ $(./bazelisk.py info output_base)/external/local_config_cc/cc_wrapper.sh --version
gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

GCC 12.2 (conda gcc/g++)

❯❯❯ which g++
$HOME/.miniforge3/bin/g++         # g++ (conda-forge gcc 12.2.0-19) 12.2.0

❯❯❯ $(./bazelisk.py info output_base)/external/local_config_cc/cc_wrapper.sh --version 

x86_64-conda-linux-gnu-cc (conda-forge gcc 12.2.0-19) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

With those bazel commands I somehow run into a different error:

ERROR: .../tensorstore/tensorstore/serialization/BUILD:64:20: Linking tensorstore/serialization/function_test failed: (Exit 1): x86_64-conda-linux-gnu-cc failed: error executing command $CONDA_PREFIX/bin/x86_64-conda-linux-gnu-cc @bazel-out/k8-fastbuild/bin/tensorstore/serialization/function_test-2.params

Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/k8-fastbuild/bin/_solib_k8/libexternal_Scom_Ugoogle_Uabsl_Sabsl_Stime_Slibtime.so: error: undefined reference to 'clock_gettime'

This particular error has something to do with glibc 2.17+ not requiring -lrt flag.

One note is that the error messages in the OP was during installation via pip install . (which invokes bazel like python -u bazelisk.py build -c opt //python/tensorstore:_tensorstore__shared_objects --verbose_failures --copt=-fvisibility=hidden). In this case the same gcc, g++ on the $PATH was used.

from tensorstore.

jbms avatar jbms commented on May 14, 2024

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?

from tensorstore.

wookayin avatar wookayin commented on May 14, 2024

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.

from tensorstore.

laramiel avatar laramiel commented on May 14, 2024

The clock_getime failure is from Abseil; maybe we should raise a bug there. I don't see any -lrt conditional flags in the build, and I haven't looked into which gcc / glibc version require it.

I should try and setup an image to repro this. uname -a? You're running ubuntu and installed gcc how?

from tensorstore.

wookayin avatar wookayin commented on May 14, 2024
Yes, my env is Ubuntu 20.04 LTS (focal), which ships with GCC 10. (Click to expand)
$ uname -a
Linux HOSTNAME 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/lsb-release                                                                                                                  
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

$ sudo apt install gcc-10 g++-10
# (Optional)
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10

from tensorstore.

sameeul avatar sameeul commented on May 14, 2024

Just wanted to report that, with GCC 10.4 + and GCC 11, the build process (both python setup.py develop and building executables from the example fail due to failure to build boringssl. I can build cleanly with GCC 10.2 and GCC 10.3. I know this is not exactly a tensorstore issue rather an issue coming from one of its dependencies. I was just curious if any of you came across this except the author of issue (The GCC 12.X log).

from tensorstore.

jbms avatar jbms commented on May 14, 2024

@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

t.c:2:15: error: expected declaration specifiers or '...' before numeric constant
    2 | static_assert(1);
      |               ^

In particular, if you look at mambaforge/x86_64-conda-linux-gnu/sysroot/usr/include/assert.h you will see that it is a very old version that lacks a #define static_assert line.

from tensorstore.

jbms avatar jbms commented on May 14, 2024

I filed upstream issue: conda-forge/linux-sysroot-feedstock#44

from tensorstore.

sameeul avatar sameeul commented on May 14, 2024

@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.

from tensorstore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.