clang -dumpversion reports invalid version

Bug #1810860 reported by Mekk on 2019-01-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
llvm-defaults (Ubuntu)

Bug Description


    $ clang -dumpversion
    $ clang -v 2>&1 | head -1
    clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)

one of those is wrong. Looks like the former as I have 1:6.0-41~exp5~ubuntu1 clang package installed.

That's problematic as I use dumpversion to script compiler capability detection.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: clang 1:6.0-41~exp5~ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-42.45-generic 4.15.18
Uname: Linux 4.15.0-42-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
CurrentDesktop: KDE
Date: Mon Jan 7 23:08:33 2019
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-01-25 (712 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: llvm-defaults
UpgradeStatus: Upgraded to bionic on 2018-05-14 (238 days ago)

Mekk (marcin-kasperski) wrote :
Sylvestre Ledru (sylvestre) wrote :

oh, funny, I have been maintaining clang for a while and never noticed that :)

Mekk (marcin-kasperski) wrote :

Very funny. Arrgh.

The little problem is that (a) this is misleading (and nothing nowhere warns that this is false) and (b) clang doesn't offer any flag which would print version number in the compact way.

Mekk (marcin-kasperski) wrote :

I found similar error:
Wanted to add my +1 to it, but registration is disabled at the moment. If you have account on clang bugzilla, maybe you could forward my opinion that this is a bug. and should be fixed?

Sylvestre Ledru (sylvestre) wrote :

This will be fixed in Clang 9

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.