-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Externals boringssl target fails to build on Windows #8351
Comments
also @davidben in case he has ideas offhand, though it's likely Envoy-specific |
I'm assuming this is using the @agl may be able to help here, though I don't see anything in our top-level |
In envoy, we are building "static", I'd expect bazel would carry that preference to the externals Is there a reason for using the fork-for-bazel, and not localizing an envoy copy I think this simply needs to be toggled, but it's not clear whether we would want our own fork |
This is the flavor we are testing (after encountering the same on envoy master's older tag point).
|
@wrowe by default bazel allows library to be both static and dynamic, if your build targets are all using static library (i.e. binary target with linkstatic=1) then it won't bother with dynamic library artifacts. The issue you're seeing from foreign_cc is because curl is trying to pull both: https://github.com/envoyproxy/envoy/blob/master/bazel/foreign_cc/BUILD#L106, if you comment out this line it shouldn't block you anymore. |
Thanks for the explanation, lizan. This isn't envoy-specific, it's a basic flaw in how the boringssl BUILD stub was coded (a static library has no exports.) We have this solved now with PR 8280 (merged) for the static builds. There is more to do for their bazel schema, but no remaining issues here at envoy. |
The associated PR was closed Stale; This remains an open issue, given this set of bazel elections; It doesn't seem we should have to force-override the linkstatic option to the boringssl component, as illustrated in the PR, but we do on Windows. This would likely break the OS/X build of Envoy since that build is entirely dynamic, from my understanding, so the PR cannot be adopted as-is. Bazel expertise requested. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
Hi @agl see my comment of January 6. I really don't have a good solution upstream to coerce BoringSSL bazel build to honor the flags I identified. |
Building on windows, the boringssl library dependency is broken, because it attempts to build both a static and dynamic lib. The dynamic lib built is not desired, and actually not functional. The error is;
ERROR: C:/_eb/external/boringssl/BUILD:130:1: output 'external/boringssl/crypto.if.lib' was not created
ERROR: C:/_eb/external/boringssl/BUILD:130:1: not all outputs were created or valid
ERROR: C:/_eb/external/envoy/bazel/foreign_cc/BUILD:67:1 not all outputs were created or valid
In bazel-bin/external/boringssl/, the build generates;
_objs
crypto.dll
crypto.dll-2.params
crypto.lib
crypto.lib-2.params
crypto.pdb
ssl.dll-2.params
ssl.lib
ssl.lib-2.params
The resulting crypto.dll has no export symbols, all of the boringssl externs are used only for static binding (in linux terms, these are non-pic objects.) As documented on msdn about link.exe, the /implib:crypto.if.lib will never be created when there are no exported symbols. The resulting (desired) crypto.lib is the complete, static library. ssl.dll cannot be created because it requires the missing crypto.if.lib to bind to crypto.dll, which was an invalid shared object library.
We should not be attempting to build dynamic libraries, emit .dll files or their corresponding .if.lib export binding libs, but it is not clear how to suppress this either within envoy's bazel/ logic or within boringssl itself.
@irengrig or @lizan would you have any clues?
The text was updated successfully, but these errors were encountered: