hedronvision / bazel-make-cc-https-easy

Goal: Make it easy to place HTTPS Requests from C++, leveraging Bazel, CPR, and CURL.
Other
28 stars 7 forks source link

dependency error from Bazel/Platforms #10

Closed xivarri closed 1 year ago

xivarri commented 1 year ago

Hi - I'm trying to use this on linux, but run into the error when adding "@cpr" as a dep:

ERROR: Analysis of target ${target} failed; build aborted: no such package 'Bazel/Platforms': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
  - ${repo_root}/BAZEL/Platforms

This seems to be stemming from the line in curl.BUILD:

        "@//Bazel/Platforms:Apple": ["USE_SECTRANSP", "HAVE_GETIFADDRS", "HAVE_MACH_ABSOLUTE_TIME", "HAVE_SYS_SOCKIO_H"],

so even though I am not trying to build for apple, the build is failing because this platform is not defined.

idk if this is related to platform_mappings? I do not have one specified.

Thanks!

cpsauer commented 1 year ago

Hey @xivarri! Thanks for your interest and for writing in.

Turns out that one's a silly mistake by me--nothing to do with platform_mappings (which you shouldn't need since you aren't using rules_apple or the android rules). I've just pushed a commit that should fix that error. Thanks for letting me know, and sorry for the inconvenience caused.

I'll need to ask for a little bit of your help, though, to get things working on Linux, since that isn't a platform we're currently using. It should be a good amount easier to add Linux support than to do it yourself from scratch, so it's worth working together. I can help guide. And your code will then work across platforms for free. Plus, you'll be helping everyone out.

So if you're down to help get this working on Linux, I'd love to redirect you over to #6, and we'll figure it out together from there!

Cheers, Chris