tenacityteam / tenacity-legacy

THIS REPO IS NOT MAINTAINED ANYMORE. Please see https://codeberg.org/tenacityteam/tenacity for Tenacity, which is maintained.
https://tenacityaudio.org
Other
6.77k stars 256 forks source link

Build info displays incorrect compiler/version for clang #622

Closed FabioLolix closed 3 years ago

FabioLolix commented 3 years ago

Guidelines

Version/Commit hash

dce03bae1

Describe the bug.

I don't have GCC 4.2.1 installed

Expected behavior

Compiler report currently used compiler (Clang 12.0.1)

OS

Manjaro Linux stable

Additional context

tenacity

==> Avvio di build() in corso...
-- Found Git: /usr/sbin/git (found version "2.33.0") 
-- Searching for dependencies from system, not using vcpkg.
-- The C compiler identification is Clang 12.0.1
-- The CXX compiler identification is Clang 12.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/sbin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/sbin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

This issue is not a duplicate

emabrey commented 3 years ago

https://stackoverflow.com/questions/12893731/why-does-clang-dumpversion-report-4-2-1

emabrey commented 3 years ago

This is because clang pretends to be GCC 4.2.1 for compatibility purposes. We could rework the build info to properly detect this and it should be easy, but it isn't because the build info is hard-coded.

FabioLolix commented 3 years ago

Thank you, I was completely unware of this

FabioLolix commented 3 years ago

Fell free to edit the issue title as needed

Be-ing commented 3 years ago

We could rework the build info to properly detect this and it should be easy, but it isn't because the build info is hard-coded.

A pull request would be welcome.

emabrey commented 3 years ago

We could rework the build info to properly detect this and it should be easy, but it isn't because the build info is hard-coded.

A pull request would be welcome.

I'm already working on it :). It's taking a second because I had to rebuild everything because I switched compilers.

FabioLolix commented 3 years ago

By the way Version: and Installation Prefix: have always been empty

rubyFeedback commented 3 years ago

Thank you, I was completely unware of this

I think others may also run into this, because they assume that the version is indeed incorrect. It may be best to include additional information in this regard, either the "real" assumed version, or perhaps some additional information about that situation.

I read the explanation about clang in the past, but I also forgot it meanwhile, so ... may be best to improve on the version-reporting situation in this regard, in order to avoid confusion of others in the future.