Building google-cloud-cpp//:storage using bazel fails on Mac because it cannot find the CA certificate #8073
-
I want to use the google-cloud-cpp storage library on my Mac using Bazel. I have a simple C++ source code WORKSPACE
BUILD (taken from quickstart)
Running
The issue seems to be that while build external dependency curl, the build file is not able to automatically figure out where the CA bundle is. It seems that Mac OS has an internal security mechanism and does not really have a CA bundle, but to remedy this- it is possible to install it by using
My question is how to go from here to supply this path to the rule building curl in the process? Given the path above, how do I make the build work? -- |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Thank you for the detailed investigation and the system info.
On macOS we should not be trying to use the CA bundle, we have code to avoid this: google-cloud-cpp/bazel/curl.BUILD Lines 119 to 126 in 5660181 and in fact we do not use the google-cloud-cpp/bazel/curl.BUILD Lines 491 to 501 in 5660181 I think the bug is in how we detect if the platform is macOS: google-cloud-cpp/bazel/curl.BUILD Lines 22 to 26 in 5660181 You are using Bazel 5.0, I do not believe we have any tests for that, and I am guessing it the platform definition is wrong in that case. Let me see if I can confirm this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reporting this issue. It should be fixed in #8101, which will be included in our release next week (Feb 2022). |
Beta Was this translation helpful? Give feedback.
Thanks for reporting this issue. It should be fixed in #8101, which will be included in our release next week (Feb 2022).