Make sure suncc is in path and
conan profile new suncc --detect --force
The profile will detect the sun-cc compiler with version 12.6, but the settings.yml only allows the version up to 5.15, apparently here is the Sun C 5.15 the correct value for compiler version.
n/a
Hi, @metaphox
Sometimes it is a bit difficult for us to test Conan in every platform and every compiler, so we will really appreciate it if you can share with us some more information to work on this issue:
conan profile new suncc --detect --force command?cc -V command for your compiler?CC or CXX environment variables as they should point to the compiler. If none of them are defined, Conan uses cc as the executable. Are any of these variables defined in your system? What is the output of the xxxxxx -V command?Thanks!
Hi @jgsogo ,
output of conan profile new suncc --detect:
Found gcc 7.3
Found sun-cc 12.5
Profile created with detected settings: ~/.conan/profiles/suncc
The profile generated (output of conan profile show suncc) is:
Configuration for profile suncc:
[settings]
os=SunOS
os_build=SunOS
arch=sparc
arch_build=sparc
compiler=sun-cc
compiler.version=12.5
compiler.libcxx=libCstd
build_type=Release
[options]
[build_requires]
[env]
The CC and CXX are not set. Instead, the ~/developerstudio12.5/bin contains cc and CC as executables, and this path is added to PATH. Now:
$ cc -V
cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
$ CC -V
CC: Studio 12.5 Sun C++ 5.14 SunOS_sparc 2016/05/31
$ ls -l suncc
lrwxrwxrwx 1 692964 staff 4 Mar 29 03:11 suncc -> ./cc
$ ls -l sunCC
lrwxrwxrwx 1 692964 staff 4 Mar 29 03:11 sunCC -> ./CC
As you can see, the compiler.version=12.5 is the Studio version, rather than the C compiler version.
Here in detect.py the version number is anything like [0-9]+\.[0-9]+.
https://github.com/conan-io/conan/blob/d2f63dfbb38cd1067dc82c955a6e3024300c98ff/conans/client/conf/detect.py#L60
I think I'll try fix that...
Fix merged, it will be in Conan 1.24. Thanks for contributing it!