Conan: [question] Why windows version of conan doesn't know setting.os_build?

Created on 4 Jun 2018  路  6Comments  路  Source: conan-io/conan

I've tried to build packages (in my case boost packages from bincrafters) and got initialising settings error for package mingw_installer/1.0@conan/stable. There is settings.os_build not exist.

mingw_installer/1.0@conan/stable: Not found in local cache, looking in remotes...
mingw_installer/1.0@conan/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt
[==================================================] 58B/58B
Downloading conanfile.py
[==================================================] 5.1KB/5.1KB
ERROR: C:\...\.conan\data\mingw_installer\1.0\conan\stable\export\conanfile.py: Error while initializing settings. 'settings.os_build' doesn't exist
'settings' possible configurations are ['arch', 'build_type', 'compiler', 'os']

conanfile.py of mingw_installer package contains followed if statement:

if conan_version < Version("0.99"):
    os_name = "os"
    arch_name = "arch"
else:
    os_name = "os_build"
    arch_name = "arch_build"

And i tried several versions of conan (1.4.2, 1.4.1, 1.4.0, 1.0.4, 1.0.2).

I added setting os_build to my conan profile and got similar error, but immediately when i ran conan install command.

On my mac os x machine there is no problem and when i add os_build setting to conan profile all work fine.

question

Most helpful comment

Oh, it is amazing. I've just removed all .conan directories - from C:\ root (C:.conan) and from home dir, and all work fine now.
Thanks a lot @danimtb for your help :)

All 6 comments

Hi @gpgolikov,

This is a bit weird as mingw_installer is well tested and under heavy ussage.

I run conan install mingw_installer/1.0@conan/stable -r gcc without issues.

gcc profile

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
build_type=Debug
compiler.exception=seh
compiler.libcxx=libstdc++
compiler.threads=posix
[options]
[build_requires]
[env]

Could you please share yours? Please indicate also the conan commands you are running to try to reproduce the issue.

Thanks! 馃槃

Hi @danimtb.

My profile for gcc is

[build_requires]

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++
compiler.exception=seh
compiler.threads=posix
build_type=Release

[options]

[env]
CONAN_CMAKE_GENERATOR="CodeBlocks - MinGW Makefiles"

and conan --version returns

Conan version 1.4.2

I run installation with command conan install mingw_installer/1.0@conan/stable --profile mingw and it returns

ERROR: 'settings.arch_build' doesn't exist
'settings' possible configurations are ['arch', 'build_type', 'compiler', 'os']

Just tried you config from my end and it is working fine. Do you have any other version of Conan installed?

I updated conan from 0.30 (or about it) to last version (1.4.2). But i removed Conan folder with older version from disk (this where i installed conan earlier) using unins000.exe tool.
And conan --version returns correct version.
May be some files in other location are crushing my installation of mingw_installer? I though C:.conan directory contains only package information (build artefacts, source code, some meta and other).

Oh, it is amazing. I've just removed all .conan directories - from C:\ root (C:.conan) and from home dir, and all work fine now.
Thanks a lot @danimtb for your help :)

Ok, great, happy that you solved it cleaning your previous installation.
Thanks for telling!
I think this is solved now, so I am closing it, but please comment or reopen if necessary. Cheers!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Polibif picture Polibif  路  3Comments

zlalanne picture zlalanne  路  3Comments

niosHD picture niosHD  路  3Comments

theodelrieu picture theodelrieu  路  3Comments

rconde01 picture rconde01  路  3Comments