c++ - How to Check the Version of my gcc? -
in file included /usr/include/c++/4.8.2/locale:41:0, /usr/include/c++/4.8.2/iomanip:43, [...omitted myself irrelevant] /usr/include/c++/4.8.2/bits/locale_facets_nonio.h:59:39: error: ‘locale’ has not been declared struct __timepunct_cache : public locale::facet
above first error in build log.
i didn't try compile glibc/gcc myself, , installed them via yum.
one fishy thing found is:
$ ll /usr/include/c++/ total 4 drwxr-xr-x. 12 root root 4096 dec 17 14:16 4.8.2 lrwxrwxrwx 1 root root 5 dec 17 14:16 4.8.5 -> 4.8.2 $
and yum showed 1 version of gcc:
$ yum info gcc-c++ loaded plugins: fastestmirror, langpacks loading mirror speeds cached hostfile * base: centos.uhost.hk * epel: mirrors.hustunique.com * extras: centos.uhost.hk * updates: centos.uhost.hk installed packages name : gcc-c++ arch : x86_64 version : 4.8.5 release : 4.el7 size : 16 m repo : installed repo : base summary : c++ support gcc url : http://gcc.gnu.org license : gplv3+ , gplv3+ exceptions , gplv2+ exceptions , lgplv2+ , bsd description : package adds c++ support gnu compiler collection. : includes support of current c++ specification, : including templates , exception handling.
any idea how verify headers in /usr/include/c++/4.8.2 indeed 4.8.5 package?
thanks in advance.
p.s. think glibc irrelevant here info:
$ ldd --version ldd (gnu libc) 2.17 copyright (c) 2012 free software foundation, inc. free software; see source copying conditions. there no warranty; not merchantability or fitness particular purpose. written roland mcgrath , ulrich drepper.
the symlink 4.8.2
directory nothing worry about, it's normal libstdc++ headers on red hat enterprise linux (and therefore centos) arranged that.
gcc --version
tell version of gcc
executable in path.
rpm -q libstdc++-devel
tell version of package owns c++ standard library headers.
rpm -ql libstdc++-devel
list files installed package, include files under /usr/include/c++/4.8.2
rpm --verify libstdc++-devel
check haven't messed c++ headers replacing them else.
the error more concerning, implies have messed something up. guess it's in from [...omitted myself irrelevant]
part, may relevant. std::locale
should declared in <bits/locale_classes.h>
included before <bits/locale_facets_nonio.h>
, if wasn't declared guess have header defines _locale_classes_h
, prevents standard library header being read. not define include guards start underscores, reserved names.
Comments
Post a Comment