Closed uilianries closed 1 month ago
Thanks for reporting @uilianries
It seems that recipes in ConanCenter are fine with with chdir(self, self.source_folder):
, so unless there is some other very compelling reason to change this now in Conan 1, I'd probably label this as "won't fix".
@memsharded The with chdir
is not enough because autoreconf
, internally, changes to self.source_folder
and it's hardcoded:
https://github.com/conan-io/conan/blob/1.64.1/conan/tools/gnu/autotools.py#L70
def autoreconf(self, args=None):
args = args or []
command = join_arguments(["autoreconf", self._autoreconf_args, args_to_string(args)])
with chdir(self, self._conanfile.source_folder):
self._conanfile.run(command)
As workaround, would need to avoid Autotools.autoreconf
and use self.run
instead:
chdir(self, os.path.join(self.source_folder, "subfolder")):
self.run("autoreconf -vif")
As real case that's related, the PR involving KRB5 (Kerberos) in CCI. We need to patch autoconf.ac
, then run autoreconf
again.
This is what I mean. Even if we target this for Conan 1.65, there is no planned date for it, until it is released, then ConanCenter upgrades, etc, might be a long time. As the workaround of running self.run("autoreconf
is so simple, it sounds it is simply not worth it changing it in Conan 1.
@memsharded
This is what I mean.
Sorry, I understood something like:
chdir(self, os.path.join(self.source_folder, "subfolder")):
autotools = Autotools(self)
autotools.autoreconf()
As the workaround of running self.run("autoreconf is so simple, it sounds it is simply not worth it changing it in Conan 1.
Yes, I'll be using this workaround, it's works for both Conan 1.x and 2.x
Even if we target this for Conan 1.65, there is no planned date for it.
Should we mark it as wontfix
then?
Sounds good, I'll mark this as unplanned and close it. Thanks for the feedback!
Describe the bug
OS: Any Compiler: Any Conan Versions: 1.64.1 and 2.4.0
How to reproduce it
Having the follow piece of code:
Now I need to pass a different script folder, because
configure.ac
andconfigure
are in a sub-folder:This update works fine in Conan 2.x, but not for Conan 1.x. In Conan 1.x, the
build_script_folder
is not supported forAutotools.autoreconf
, onlyargs
.However, when comparing
Autotools.configure
, the same hasbuild_script_folder
available for both Conan 1.x and Conan 2.x.Conan 2.x Autotools.autoreconf:
https://docs.conan.io/2/reference/tools/gnu/autotools.html#conan.tools.gnu.autotools.Autotools.autoreconf
Conan 1.x Autotools.autoreconf:
https://docs.conan.io/1/reference/conanfile/tools/gnu/autotools.html#autoreconf-self-args-none