Open mkovaxx opened 3 years ago
Compiling examples/jax_cpp:main builds a large part of TF/XLA tree. Are you using the same build toolchain required for building TF from source?
If you can build TF from source, you should be able to build jax_cpp:main
Thanks for taking a look!
I use a combination of pyenv
, pipenv
, and bazelisk
to control the build environment. I can build TF from source in that controlled environment without any issues.
However, in the same environment, //examples/jax_cpp:main
fails with the error output above.
Here's a branch with the necessary files added: https://github.com/mkovaxx/jax/commit/e0d49599ab4dd3b6880943f752525755dabd8bc8
And here's the command I use to run the build:
pipenv run bazel build //examples/jax_cpp:main --experimental_repo_remote_exec --check_visibility=false
Do you see anything wrong with this approach?
sorry for the delay; i suspect this is related to the gcc version you are using, and it's more strict that what JAX is using in our vm build
The warnings are coming from boringssl/src/third_party/fiat/curve25519.c
so it's not part of JAX and going to be a bit hard to change.
The easier workaround would be try to use a standard Ubuntu VM to build (https://jax.readthedocs.io/en/latest/developer.html#building-jaxlib-from-source)
@mkovaxx Could you try that?
If that doesn't work for you, can you also (a) try at JAX head and/or (b) provide details of what OS/compiler you are using, ideally enough that we can reproduce this in a VM?
I really appreciate your help on this!
Here's some info about my OS and compiler suite:
mate@raptor:~/prog/jax$ uname -a
Linux raptor 5.15.0-051500-generic #202110312130 SMP Sun Oct 31 21:33:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
mate@raptor:~/prog/jax$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
mate@raptor:~/prog/jax$ gcc --version
gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Copyright (C) 2021 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.
While compiling Jax-related targets in a VM might work, it would considerably increase the complexity of my build setup so I'd like to find another workaround if possible. For context, I want to use Jax in a C++ project while trying to avoid having it depend on the build environment of Jax (or TensorFlow).
Just as a side note, it comes as a surprise to me that Bazel doesn't pin the compiler suite and version, even though it claims to have "reproducibility" and "hermeticity". (I have some experience with Nix, where "reproducible" and "hermetic" imply that the build is isolated from the surrounding system, including whatever compiler suite happens to be installed system-wide.) I understand that Jax is separate from Bazel, just wanted to explain my thinking here so you could point out any misunderstandings I have.
Steps to reproduce:
Output: