-
Notifications
You must be signed in to change notification settings - Fork 989
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] Unable to run executable under msys2 #12877
Comments
Hi @jputcu Thanks for your question.
To indicate that Conan is already inside the subsystem, and such command executions do not need to add the Please let us know how it goes when you try the above. |
I've defined the parameters in
I understand the position towards guesses and auto-detect, but having the basic hello world working on all platforms would lower the threshold. |
This is what hundreds of recipes in ConanCenter do. And the recipes really need to know, those are libraries that only build using autotools, and then need to run in a subsystem. So the recipe explicitly tells A different story is for a normal recipe, lets say the
This is something that looks like we would like to improve, thanks!
The basic hello world example aims to build in all platforms. But the platform has to be correctly defined in the profile, that is the basic assumption. And for the profile settings |
I just noticed that adding the
There is also a possibility to add |
This is related to the binary model. If the binary is going to be linked with the subsystem compilers and runtime, then it is necessary to be added, because the binary will be a "msys2" binary. But it is also a possibility running inside msys2 and still targeting the MSVC compiler with the VS runtime, in that case it would be a native windows binary, and I can see "MinGW Makefiles" in the output of the error above. Depending on the compiler used inside msys2, which can be the msys2 gcc or the MinGW subsystem gcc, it might be necessary one generator or the other. The runtime for them is also different. In this blog post related to Clang some related issues are described: https://blog.conan.io/2022/10/13/Different-flavors-Clang-compiler-Windows.html. As I commented, running Conan inside a subsystem is not that common. I can try to polish a bit, it would be great if you let me know:
|
Everything is done from within the
CMake installed using
Conan was installed using pip.
Compiler detected by cmake:
Strange thing, I have changed my generator to
|
The resulting binary:
|
By putting the cmake generator to
|
I am investigating this a bit, and I have struggled for hours due to an apparent bug in previous versions of CMake, that couldn't handle some Msys2 paths for I am updating to latest CMake 3.25 from msys2 repos, I'll keep reporting |
Another thing that I am struggling is the resolution of the Conan home, and how it affects behavior of things like paths (like the execution of And it is related to the fact that inside msys2 If I relocate the cache to the subsystem home ( Quick question: do you intend to use a Conan cache in the Windows user (C:/Users/myuser) or in the Msys2 user (/home/myuser, or the full <path/to/msys64>/home/myuser)? At this point, I think that I would try to skip running inside the msys2, but run in Windows prompt and use the
|
I'm the only embedded C/C++ at the company. Using CMake, Conan, GCC toolchains (for AVR, ARM, Linux, Windows). Mostly use |
Thanks, some test with the other home would be nice too. Just have in mind that it is |
Environment details
Steps to reproduce
In a msys2/mingw64 shell, create a basic library using a template:
In my own code I only got the following working:
Some relevant environment variables:
Logs
No response
The text was updated successfully, but these errors were encountered: