-
Notifications
You must be signed in to change notification settings - Fork 985
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] Autotools in Conan with MSYS2 #8476
Comments
Have you tried running the configure from outside the source_subdolder? I guess the part failing here is the |
I works with building without conan like this:
|
both syntaxes are valid in MinGW shell:
from the output, it turns out conan launches the configure command in the incorrect shell. e.g.:
is clearly a typicial
is clearly |
okay, it turns out to be a recipe issue, it doesn't set
I'll create PR to fix it. |
actually, it's a bit more complex story :)
this requires another fix in conan codebase (not recipe) |
anyway, it seems like
(and many many errors like that) |
still doesn't build after applying the patch. @madebr can I ask you for a help? were you able to actually build apr for MinGW? |
@sfhacker what python environment is conan running on? what is your profile? are you building from within MinGW/MSYS2 terminal? |
As a note, Conan 1.39 is introducing a new mechanism to define the Windows-bash environment ( |
Hundreds of ConanCenter recipes build in windows with Msys2 (actually, a Msys2 Conan package used as Saying "it should be avoided" is not only unnecessary but also simply not true. Conan is delivering a huge value to many tons of teams out there, and using it can really help and save a lot of time. |
@memsharded thank you for your suggestion, lightbulb went off in my head and was actually successful in getting autotools detected in mingw/msys2:
After I did those two things I reattempted to create the apr package and conan was able to pick up autotools, and so was finally able to start compiling... until I stumbled on the btw is there a way of setting self.win_bash without modifying conanfile.py recipe? no right? |
@sfhacker the only reason I want to compile with mingw is to ensure cross compatibility, not accidentally use anything that is platform specific in my applications, but also I strongly dislike Visual Studio itself, and how bloated the installation is (even if you are installing MSVC and Windows SDK, it is still a heavy installation). I strongly believe conan can succeed, so as long as devs keep bringing these issues up and trying to solve them, eventually there will be motivation for moving more open source libraries from autotools to cmake, potentially. |
btw is there a way of setting self.win_bash without modifying conanfile.py recipe? no right? No, it is not possible, no way to inject it from downstream, need to modify (fork) recipe. Maybe @SSE4 can help with the specifics of the APR package and that COM_NO_WINDOWS_H issue? |
Is it me, or doesn't the new Autotools helper not support win_bash and msys2 ? |
@ericLemanissier if you mean |
Then there is something I don't understand, because I get this error |
You are right, it seems there could be something missing there, lets have a look. |
Eric, what are you trying to install/build with MSYS2? Maybe I can help. I think I finally figured out (at least a little bit) conan building, was finally able to clear the "Get Started" tutorial on Conan docs using MSYS2, Mingw-w64 GCC and Windows. Was able to build Poco 1.9.4 from scratch after a lot of digging here and there. |
@cchulo we are interested in that feedback, the new toolchains are maturing to be ready for 2.0, and the intention is that supporting msys2 should be relatively easy with the new integrations |
So I have other tools installed that are exposed in the windows PATH, I had to override this in my profile, and point it to my Mingw installation (under MSYS2) In MSYS2 I installed
I was not able to build the getting started tutorial at all before this. I have a theory about installing |
do note that the Windows SDK can be installed separately using |
@memsharded I just tried to set |
nice! yeah I'd have to check out PocoMacros.cmake for that version to see if they removed dependency on Windows SDK, for Poco 1.9.4 it's there |
@sfhacker Interesting, what does your profile look like? You are using Conan right? ultimately that's what determines cmake's behavior (though I could be wrong about this) The error message I received building Poco without adding Windows SDK is that PocoMacros.cmake failed because it could not find compiler. This error is raised when targeting Windows. |
Hi! I would like to comment that now, the new integrations AutotoolToolchain, AutotoolsDeps, etc, have automatic tests in our test suite, for different configurations:
Note that this are not the integrations used in ConanCenter recipes, but the plan is to start migrating as soon as possible, to be ready for 2.0. With these tests, it seems that good Msys support for Autotools is provided, so after merging #10429, this issue will be closed automatically. If there are any pending issues, it would be great to open a new ticket with a reproducible case using the new integrations. Thanks! |
#10429 merged, please open new tickets if necessary, basing them on the above tests would be very useful. Thanks all for the feedback! |
@memsharded Thanks. I fail to see how #10429 is related to the issue I faced, so I made a test case on conan-io/conan-center-index#9091 |
@ericLemanissier I responded in conan-io/conan-center-index#9091 (comment). So far it seems ConanCenter related issues, not lack of support in the client side. First point, it is a ConanCenter hook issue, not sure how the AutotoolsToolchain would be connected with that. The other error is missing configuration. Part of the new integrations design is stop trying to guess things, and require explicit configuration instead. You can try locally adding those |
Following conan-io/conan-center-index#9091 (comment), it could be that changing the default toolchain Created new issue #10430 to track this. |
I've opened #12194 to improve autotools handling on Windows. Please provide feedbacks (though no autotools based recipes compatible with Windows have been migrated to conan v2 in conan-center for the moment). |
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Logs
Output from conan:
Output from executing the same command in the folder:
The text was updated successfully, but these errors were encountered: