-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Library search path when building bazel #590
Comments
I'm no domain expert of the C++ rules but I'll try to help. When you edited the CROSSTOOL file, did you see bazel passing the linker flags to |
Are you trying to make the Bazel binary itself use different shared libraries when running, have tools run by Bazel use different libraries, or have the binaries built by Bazel be linked against different libraries? For multiple paths in
Also, keep in mind when changing environment variables that Bazel sometimes leaves a process running in the background, which won't pick up new environment variables. Make sure to do a As far as editing Adding Another possible problem is the sandbox won't include files in those paths by default like it will /usr/lib64. Building with |
@trungnt13 can you give update on your issue? |
@bsilver8192 Yes I tried using : to separate them, but it only recognize the first one in the sequence. btw, this error happen when I tried to compile bazel, sorry this confusion. I tried to install bazel on RedHat server.
|
Can you try with the -jdk7 variant? |
I don't know if I can change libc.so.6, I think it is fixed to the OS |
I manage to fix error with my JDK 1.8, however, it falls back to this error again:
My local_linux toolchain:
|
export CC and CXX and maybe LD_FLAGS too. |
I tried, the same errors happened:
|
Sorry this has fell off my radar, did you found a solution? |
I tried to install newest bazel 0.1.2 but it is hopeless also. |
The responsible code for building that binary is at https://github.com/bazelbuild/bazel/blob/master/scripts/bootstrap/compile.sh#L270 and at https://github.com/bazelbuild/bazel/blob/master/scripts/bootstrap/compile.sh#L281 So settings CXX and LDFLAGS + LD_LIBRARY_PATH should be enough. Am at lost to what more to do. bringing in @ulfjack that should have better ideas. How would you compile a simple C++ program usually? |
@trungnt13 @ulfjack ping? |
Is there a VM image somewhere that we could use to reproduce? |
@trungnt13 Friendly ping |
Closing this issue as there is no answer. |
I just ran into this same issue (GLIBCXX_3.4.18 and .19 not found) on a ubuntu 12 system using apt-get install. |
I need to set the library search path so bazel can find newer version of GMP, MPC, MPFR and libstdc++.so.6.0.20
I tried several way to make bazel recognize the new path (libstdc++.so.6.0.20 in /appl/opt/gcc/4.9.3/lib64)
It still looks for libstdc++.so.6.0.20 in /usr/lib64, then, I tried other way, modify file tools/cpp/CROSSTOOL, added thess line to local_linux toolchain
It still didn't work.
The only way I can make it recognize path to other library path is:
But then I can not add 2 path add the same time. Any Suggestion?
The text was updated successfully, but these errors were encountered: