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

[bug] AutoToolsBuildEnvironment.make() can't be used with make_program="nmake" #8283

Closed
bbandix opened this issue Jan 4, 2021 · 2 comments · Fixed by #8285
Closed

[bug] AutoToolsBuildEnvironment.make() can't be used with make_program="nmake" #8283

bbandix opened this issue Jan 4, 2021 · 2 comments · Fixed by #8285
Milestone

Comments

@bbandix
Copy link

bbandix commented Jan 4, 2021

Environment Details

  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 2017
  • Conan version: 1.32.1
  • Python version: 3.7.2

The AutoToolsBuildEnvironment.make() method adds a deduced cpu_count_option with -j to the arguments of the make command.
This is not portable, and since the make_program can be customized, the -j option should not be (unconditionally) added, because it is not guaranteed that the configured make program supports the -j option.

This issue is in nature similar to that described and fixed for CMake in #2388.

The problem is in:

str_args = args_to_string(args)
cpu_count_option = (("-j%s" % cpu_count(output=self._conanfile.output))
if "-j" not in str_args else None)
self._conanfile.run("%s" % join_arguments([make_program, target, str_args,
cpu_count_option]),
win_bash=self._win_bash, subsystem=self.subsystem)

Logs

NMAKE : fatal error U1065: invalid option 'j'

@memsharded
Copy link
Member

Hi @bbandix

Thanks for the report. #8285 should fix it (lets try to merge it for next 1.33)

In any case, we need to start moving the autotools to the new toolchain and helpers, as we are doing with CMake, Meson and others, please keep an eye on coming Conan releases about this. Thanks!

@memsharded memsharded added this to the 1.33 milestone Jan 4, 2021
@bbandix
Copy link
Author

bbandix commented Jan 5, 2021

Hi @memsharded

Thank you for the quick fix!
I will keep an eye on the upcoming releases.

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

Successfully merging a pull request may close this issue.

2 participants