![]() Bazel ensures a sandboxed build execution by enforcing the definition of all of its dependencies explicitly.īazel’s main focus is on projects with large codebases, predominantly for organizations that have decided to put all of their projects into a monorepo. Nondeterministic behavior erodes trust in the correctness of build results. When executing builds over and over again, you do not want any surprises. Needless to say, you can still fine-tune the compiler or linker settings if needed. Instead, you just point your build to the source code and declare dependencies. ![]() As a result, you do not have to concern yourself with low-level implementation details like compilers or linkers. Starlark introduces an abstraction to the concepts of a build and hides its implementation complexities as much as possible. Why should I use Bazel?Īs a developer of build logic, you use a higher-level language called Starlark, a Python derivative. Bazel supports large codebases across multiple repositories, and large numbers of users. Bazel supports projects in multiple languages and builds outputs for multiple platforms. It uses a human-readable, high-level build language. so, hence libplugin.so can't be linked fully statically.)Ĭhecking with patchelf reveals the source of the loading issue, the rpath of libplugin.< Back to Blog Accelerating Bazel CI/CD Pipeline Performance for Autonomous Vehicles Shailesh Manjrekar.īazel is an open-source build and test tool similar to Make, Maven, and Gradle. (In my real use-case, libplugin.so is a Python extension module, which in turn depends on a third-party library libappcode.so that's only available as a. runfiles/_main_/external/child:Īccessing libplugin.so via. Ldd $nfiles/child/libplugin.so | grep appcodeĪccessing libplugin.so via. Ldd $nfiles/_main_/external/child/libplugin.so | grep appcodeĮcho "Accessing libplugin.so via. Possible related to #6481 ? Any other information, logs, or outputs that you want to share?ĭemonstrating the issue (see full repro repo):Įcho "Accessing libplugin.so via. Have you found anything relevant by searching the web? Release 0.18.0 What's the output of git remote get-url origin git rev-parse master git rev-parse HEAD ? Ubuntu 16.04.5 LTS, x86_64 (but also repros on OS X) What's the output of bazel info release? What operating system are you running Bazel on? Running C shows that A is visible while B is not, leading to a crash when trying to load A. Then include A in data for a target C in the main workspace. Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.įrom an external workspace, build a link_shared=True cc_binary A that links against a cc_library B also in the external project. so within the runfiles to the _solib_ directory within the runfiles. The core issue seems to be the relative path from the. so can get out of sync with the actual filesystem tree, causing load-time link errors. so uses linkshared=1 and itself depends on some other libraries (I can reproduce it with both cc_library and cc_import deps). ![]() However, I'm running into an issue with the case where that. so to be later dynamically loaded from runfiles. Description of the problem / feature request:
0 Comments
Leave a Reply. |