Skip to content
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

Removing boost.asio's Bazel references to OpenSSL because they break bazel query #3

Open
wants to merge 1 commit into
base: bazelboost-1.83.0
Choose a base branch
from

Conversation

Techrocket9
Copy link

Removing references to OpenSSL because OpenSSL references break bazel query for targets that rely on boost.asio due to the fact that OpenSSL is not in BCR yet.

The bazel module for boost.asio only supports boringssl anyway.

@zaucy
Copy link
Member

zaucy commented Jan 13, 2024

could you elaborate? I'm able to query without issue.

@zaucy zaucy added the question label Jan 13, 2024
@Techrocket9
Copy link
Author

Apologies, I think it's just query 'deps(//someTargetThatDependsOnAsio)' queries that exhibit this issue.

@andrewkatson
Copy link

@zaucy If I were to make a registry and a repo that supported openssl on all three major platforms would we be able to use it here so openssl works with this repo? Otherwise people have to migrate to boringssl.

@zaucy
Copy link
Member

zaucy commented Jun 7, 2024

I think it would be better to add openssl to the BCR if possible. Eventually I'd like bazelboost to be on the BCR as well. The bazelboost registry will only be used for development. Ideally users would not have to use it.

@andrewkatson
Copy link

Okay Ill see if I can get it added

@andrewkatson
Copy link

andrewkatson commented Jun 11, 2024

@zaucy I am trying to get openssl included into the BCR but ran into some snags bazelbuild/rules_foreign_cc#1208

While I get that up and running I was wondering if you could remove openssl support from boost.asio because we cannot use bazel query on targets that depend on boost.asio so I am having trouble debugging other things.

…l query` for targets that rely on `boost.asio` due to the fact that OpenSSL is not in BCR yet.
@zaucy
Copy link
Member

zaucy commented Jun 11, 2024

going with rules_foreign_cc, eh? I've had a lot of trouble with that one in the past. I hope it ends up working well!

While I get that up and running I was wondering if you could remove openssl support from boost.asio because we cannot use bazel query

Sure I'll update this branch and see if I can get it merged. Last time the CI was failing and I didn't look into why.

@andrewkatson
Copy link

I only did it that way because they actually have a working example in their directory of examples! So all I have to do is get pkg-config working again on the most recent MacOS and I am good to go. Ill lyk how it goes!

@andrewkatson
Copy link

@zaucy what issues did you run into with rules_foreign_cc. They just pushed their updated version and its saying that it cannot find rm. I assume its a sandbox and $PATH issue but am not sure if youve already solved this.

What is odd is their example builds: https://github.com/bazelbuild/rules_foreign_cc/tree/main/examples/third_party/openssl

But mine doesn't: https://github.com/andrewkatson/openssl

I tried to convert theirs to bzlmod style but seem to have missed some specificity.

@zaucy
Copy link
Member

zaucy commented Jul 5, 2024

I can't say I've ran into exactly what you are. Last time I used it was before modules even existed.

My first thought would be to double check the .bazelrc files to see if they differ.

@andrewkatson
Copy link

andrewkatson commented Jul 5, 2024

Okay Ill look into that!

Edit: @zaucy I looked into it and the files are mostly the same. The remaining options didn't seem too different and when I made them the same I got the same errors. So I am trying to find another way to do this. I tried https://bazel.build/rules/lib/repo/http#http_file but what is odd is that I get an error about needing a BUILD file in the source. But the bzlmod migration guide says this is the replacement for http_archive.... so do you know why it needs a BUILD file?

Edit2: Seems there is no pre-built version of openssl available in the thing I was downloading. I will find a hosted one.

Edit3: Oh my gosh there is no prebuilt openssl binary hosted online that can be used for this. Do you know how people are solving the openssl dependency issue in bzlmod?

Edit4: Okay I've started down the path of using a shell script or perl_binary to run Configure and then make which seems to be bearing fruit outside of bazel but not inside of it. I am pretty sure the sandboxing is making it so none of the Perl modules can be found.

@andrewkatson
Copy link

@zaucy I have something that gets it building without rules_foreign_cc and Im almost done with the tests. Its pretty hacky so I was wondering if youd be willing to take a look and give me some pointers before I put it in front of the bazel folks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants