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

[feature] AutotoolsToolchain should support install_args analogous to make_args for consistency. #12494

Closed
1 task done
System-Arch opened this issue Nov 8, 2022 · 5 comments · Fixed by #12505
Closed
1 task done
Assignees
Milestone

Comments

@System-Arch
Copy link
Contributor

System-Arch commented Nov 8, 2022

Hi @czoido, Hi @memsharded

Thank you for quickly addressing the primary issue in #12470. This feature request captures the second suggestion proffered there:

Some Makefiles don't do well with parallel execution (-j > 1) during the install phase, and thus it would be nice if AutotoolsToolchain supported an additional attribute called "install_args" analogous to "make_args" as the only place one can disable parallel execution today is via make_args and that affects both the "make" and "install" Autotools methods.

If one tries to specify -j1 via autotools.install(args=["-j1"]), they suffer two consequences:

  1. The -j1 has no effect because the resulting make invocation has both -j1 and -jN and the latter wins.
  2. The default DESTDIR value is lost unless it is explicitly added to the args value.

Thanks

@System-Arch
Copy link
Contributor Author

Here's how this is currently documented:

This generator will also generate a file called conanbuild.conf containing two keys:

configure_args: Arguments to call the configure script.
make_args: Arguments to call the make script.
autoreconf_args: Arguments to call the autoreconf script.

and I am suggesting that it read:

This generator will also generate a file called conanbuild.conf containing four keys:

configure_args: Arguments to call the configure script.
make_args: Arguments to call the make script with when invoking the default target
install_args: Arguments to call the make script with when invoking the install target
autoreconf_args: Arguments to call the autoreconf script.

@SpaceIm
Copy link
Contributor

SpaceIm commented Nov 9, 2022

Possible duplicate of #12296

@czoido
Copy link
Contributor

czoido commented Nov 10, 2022

Hi @System-Arch , @SpaceIm

I have opened #12505 to address this issue

@czoido
Copy link
Contributor

czoido commented Nov 10, 2022

Here's how this is currently documented:

This generator will also generate a file called conanbuild.conf containing two keys:
configure_args: Arguments to call the configure script.
make_args: Arguments to call the make script.
autoreconf_args: Arguments to call the autoreconf script.

and I am suggesting that it read:

This generator will also generate a file called conanbuild.conf containing four keys:
configure_args: Arguments to call the configure script.
make_args: Arguments to call the make script with when invoking the default target
install_args: Arguments to call the make script with when invoking the install target
autoreconf_args: Arguments to call the autoreconf script.

This is documenting that these variables are passed from the AutotoolsToolchain to the Autotools build helper, but install_args can't be modified in AutotoolsToolchain so it's not included in that file and that's why there are only three keys in the file.

@System-Arch
Copy link
Contributor Author

Hi @czoido,

Yes, I was using the doc as a way of suggesting the addition of an extra key for install_args, however, your alternative of allowing -j1 to be passed in via args addresses my original use case and, in fact, aligns with what I originally tried/expected as a solution. It was only when my args -j1 value was ignored that I dug into the implementation of autotools.install() and autotools.make(). Thanks

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

Successfully merging a pull request may close this issue.

3 participants