opened
ericLemanissier
username_0
Currently, the recipe uses arch_build to choose between 32bits and 64bits of the recipe, but it actually depends on the target.
The bug can be seen here https://ci.appveyor.com/project/username_0/conan-mingw-installer/build/1.0.12#L792 : the recipe searches for a x86_64 mingw package whereas the settings are arch=x86, and it fails because there is no x86_64 with dwarf exception.
This PR uses the host_target instead, because what matters here is the platform on which the final program will run (neither the platform used for downloading mingw, nor the platform used to compile the final program)

#fixes conan-community/community#18
fix x86 target
issue
created
ericLemanissier
username_0
I have no idea why the appveyor build failed. It just stopped without error message. The same happened on my fork, but at another step in the build: https://ci.appveyor.com/project/username_0/conan-mingw-installer/build/1.0.14
comment
created
danimtb
username_1
hi @username_0 

Thanks for your PR. I understand the issue and I think it is quite particular of  MinGW.
However, I think there is no need to specify in the settings `os_target` as this is already the setting `os`.

Have you tried just declaring `os` and `arch` with the rest of changes you made?
comment
created
ericLemanissier
username_0
I just did extensive tests on my computer, and it really works (including tests) in various configuration when I use only os and arch settings, and not the _target alternatives. I'll push the amended commits in few minutes
comment
created
ericLemanissier
username_0
after several retries, I managed to get passed network errors, but build still failed because "Build exceeded allowed resource quotas. Fix your build to consume less resources or contact AppVeyor support to request quotas increase.". 
So I added a commit to clear the build folder during package steps, so it should divide by 2 the disk space.
comment
created
ericLemanissier
username_0
once again, the build failed because of poor network connection to sourceforge, but it passed on my fork : https://ci.appveyor.com/project/username_0/conan-mingw-installer/build/1.0.25
@username_2 what do you think about it ?
comment
created
lasote
username_2
Relaunching CI
comment
created
lasote
username_2
Is it possible to run mingw in an x86 machine?
comment
created
ericLemanissier
username_0
Yes, and it probably works without this PR.the problem is when you build consumer package on 64bits and you want to target 32bits: without this PR it takes 64 bits toolchain, but only 32bits toolchain is able to produce usable 32bits binaries
comment
created
ericLemanissier
username_0
@username_2 what do you think of the PR ?
comment
created
lasote
username_2
Sorry, I forgot about it. I'm still a little worried about breaking something to the x86 users, but let's see how it goes.
comment