-
Notifications
You must be signed in to change notification settings - Fork 248
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
autotools toolchain #755
Comments
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_foreign_cc! |
Hi @jsharpe. What is the status of this issue? Is there any guidance on how best to achieve this? Thanks :) |
@uhthomas there are toolchain definitions for each of the tools but the rules do not yet make use of them. I did experiment with hacking the configure script to pass in My current advise on this is to execute your build within a container with a known deployed toolchain to make this as hermetic as possible. PRs are welcome though to move towards this goal! |
Ah, I see, thank you. Does the example you worked on also support autoreconf? I'd be really interested to help make this better. |
I don't think we currently have any examples that are using autoreconf. If you have a small package that does use that it'd be useful to get that added to test the autoreconf functionality. |
Not necessarily a "small" example, but as far as I understand capnproto is using autoreconf. Trying to get this working with rules_foreign_cc at the moment and struggling a bit. https://github.com/capnproto/capnproto/tree/281aacc18003ae103b8a04ea83d7b6f814c97b8b/c%2B%2B |
Its also possible that running autoreconf should be the default behaviour - Debian recommend this: https://wiki.debian.org/Autoreconf#Autoreconfing_packages_-_A_Maintainers.27_Guide. I guess that the only issue is that the configure_make rules aren't necessarily explicitly an autotools project. Maybe we should have an autotools specific rule to distinguish between autotools specific configure_make projects and more generic ones that just follow that pattern e.g. openssl. |
Sounds reasonable to me. Do you have a recommended path forward for this? As mentioned before, I'd be happy to help where possible. Though my knowledge of the C/C++ toolchains aren't too strong. |
As far as I'm aware all the code paths should already be in place for autoreconf so likely what I'm suggesting is just a macro around the existing rule with some appropriate defaults set |
Cool! For what it's worth I tried building with the autotools example and didn't have too much luck.
|
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_foreign_cc! |
@jsharpe sorry for the bump, but I was wondering if this was considered solved at this point? What is the current idiomatic way to build an autotools based dependency? |
@gozzarda the rules rely on the tools being installed on the host machine; I'd started trying to get bazel to build the tools from source but got stuck on building a relocatable version of autoconf; it hardcodes too many paths internally so I got stuck there with getting a hermetic autotools toolchain built. Any contributions in fixing this are gladly received as I have very limited time (if any!) to work on rules_foreign_cc at the moment. |
@jsharpe Thanks for the update. That makes more sense to me. Sounds like builds should be working if you have the dependencies installed but not hermetic? I too am pretty short on time lately, but have been looking into this because it could benefit a work project, so I may be able to convince work to allocate some time for me to look into this, but don't hold your breath. For those looking for a combined solution in the meantime, do you still recommend running in a container? I assume a Nix shell would suffice, though the problems you encountered sound like they may also cause Nix headaches so I will have to check how autoconf behaves in Nix. Thank you for taking what little time you have to respond to this thread. It is appreciated. |
We should provide an autotools toolchain providing the common GNU tools,
m4
,autoconf
andautomake
so that theconfigure_make
rule can hermetically consume these components without relying on the host environment having working or new enough versions of these components.The text was updated successfully, but these errors were encountered: