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] default GNU triplet of VIsual Studio is not understood by gnu autotools #7460

Closed
madebr opened this issue Jul 30, 2020 · 2 comments · Fixed by #12870
Closed

[bug] default GNU triplet of VIsual Studio is not understood by gnu autotools #7460

madebr opened this issue Jul 30, 2020 · 2 comments · Fixed by #12870
Assignees
Milestone

Comments

@madebr
Copy link
Contributor

madebr commented Jul 30, 2020

When passing conan's default gnu triplet to a configure script, and using the MSVC toolchain,
configuration fails because autotools does not recognize these triplets.
(at least when they use autotools' AC_CANONICAL_HOST, AC_CANONICAL_BUILD or AC_CANONICAL_TARGET)
(See https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Canonicalizing.html)

Conan generates x86_64-windows-msvc and i686-windows-msvc respectively 64- and 32-bit Visual Studio builds.
GNU's config.guess guesses x86_64-pc-mingw64 and x86_64-pc-mingw32

While conan's generated triplet is more correct, it is not understood by most autotools project.

A workaround is to not pass gnu triplets when building using Visual Studio.
This can be achieved by passing host=False, build=False to autotools.configure(...).

I've opened this issue, to gather feedback on this issue.

Environment Details (include every applicable attribute)

  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio 2017

Steps to reproduce (Include if Applicable)

Build a autotools project.
Following issues show the problem (and include logs):

@memsharded
Copy link
Member

While conan's generated triplet is more correct, it is not understood by most autotools project.

I am not fully sure about the best approach, but from my limited understanding, it seems that would be a limitation or flaw in the autotools code. Then, wouldn't it be the best to patch the autotools code? I know it might be challenging to do this correctly, but conceptually seems the right thing to do.

@madebr
Copy link
Contributor Author

madebr commented Aug 3, 2020

Then, wouldn't it be the best to patch the autotools code? I know it might be challenging to do this correctly, but conceptually seems the right thing to do.

That's correct.
Autotools' detection code lives here: https://savannah.gnu.org/projects/config/
I've added a CCI recipe here: conan-io/conan-center-index#2302

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