glibc运行时库/gcc/gdb各版本发布时间以及rhel/centos默认glibc版本、lsb对应关系

  最近有些软件要求glibc 2.14+,centos 6.x自带的版本是2.12的,7.6默认是2.17,特查了下glibc 各版本发布时间以及与对应的内核,如下:

  Complete glibc release history: 

Date

Release

Announcement

2017-08-01

GLIBC 2.26

Future release.

2017-02-01

GLIBC 2.25

In development.

2016-08-04

GLIBC 2.24

The GNU C Library version 2.24 is now available

2016-02-19

GLIBC 2.23

The GNU C Library version 2.23 is now available

2015-08-14

GLIBC 2.22

The GNU C Library version 2.22 is now available

2015-02-06

GLIBC 2.21

The GNU C Library version 2.21 is now available

2014-09-08

GLIBC 2.20

The GNU C Library version 2.20 is now available

2014-02-07

GLIBC 2.19

The GNU C Library version 2.19 is now available

2013-08-12

GLIBC 2.18

The GNU C Library version 2.18 is now available

2012-12-25

GLIBC 2.17

The GNU C Library version 2.17 is now available.

It follows all relevant
standards including ISO C11 and POSIX.1-2008

2012-06-30

GLIBC 2.16

The GNU C Library version 2.16 is now available.

It follows all relevant 
standards including ISO C99 and POSIX.1-2008
POSIX编程手册和linux编程手册的区别,从这里就可以看出,posix在具体的linux发行版上需要c++实现如glibc支持才行

2012-03-21

GLIBC 2.15

GNU libc 2.15 released

2011-10-07

GLIBC 2.14.1

 

2011-06-01

GLIBC 2.14

 

2011-02-01

GLIBC 2.13

glibc 2.13

2010-12-13

GLIBC 2.12.2

 

2010-11-30

GLIBC 2.11.3

glibc-2.11.3 released

2010-08-03

GLIBC 2.12.1

 

2010-05-19

GLIBC 2.11.2

glibc-2.11.2 released

2010-05-03

GLIBC 2.12

glibc 2.12

2009-12-29

GLIBC 2.11.1

glibc-2.11.1 released

2009-11-16

GLIBC 2.10.2

 

2009-11-03

GLIBC 2.11

glibc 2.11

2009-05-18

GLIBC 2.10.1

 

2009-05-09

GLIBC 2.10

2.10 done

2008-11-13

GLIBC 2.9

glibc 2.9

2008-04-12

GLIBC 2.8

glibc 2.8

2007-10-19

GLIBC 2.7

glibc 2.7

2007-07-31

GLIBC 2.6.1

GNU C Library version 2.6.1 release

2007-07-31

GLIBC 2.5.1

GNU C Library version 2.5.1 release

2007-05-17

GLIBC 2.6

glibc 2.6

2006-09-29

GLIBC 2.5

glibc 2.5

2006-03-06

GLIBC 2.4

GNU C Library version 2.4 release

2005-11-04

GLIBC 2.3.6

GNU C Library version 2.3.6 release

2005-04-07

GLIBC 2.3.5

GNU C Library version 2.3.5 release

2004-12-29

GLIBC 2.3.4

GNU C Library version 2.3.4 release

2003-12-01

GLIBC 2.3.3

GNU C Library version 2.3.3 release

2003-02-28

GLIBC 2.3.2

glibc 2.3.2

2002-10-10

GLIBC 2.3.1

glibc 2.3.1

2002-10-02

GLIBC 2.3

glibc 2.3

2002-01-20

GLIBC 2.2.5

glibc 2.2.5

2001-07-27

GLIBC 2.2.4

glibc 2.2.4

2001-04-26

GLIBC 2.2.3

glibc 2.2.3

2001-02-15

GLIBC 2.2.2

glibc 2.2.2

2001-01-13

GLIBC 2.2.1

glibc 2.2.1

2000-11-09

GLIBC 2.2

glibc 2.2

2000-02-24

GLIBC 2.1.3

glibc 2.1.3

1999-09-06

GLIBC 2.1.2

glibc 2.1.2

1999-05-24

GLIBC 2.1.1

glibc 2.1.1

1999-02-03

GLIBC 2.1

glibc 2.1

1997-12-29

GLIBC 2.0.6

 

1997-08-25

GLIBC 2.0.5

 

1997-05-27

GLIBC 2.0.4

 

1997-04-22

GLIBC 2.0.3

 

1997-03-22

GLIBC 2.0.2

 

1997-02-04

GLIBC 2.0.1

 

1997-01-26

GLIBC 2.0

 

1995-01-16

GLIBC 1.09.5

 

1994-12-12

GLIBC 1.09.3

 

1994-12-05

GLIBC 1.09.2

 

1994-11-06

GLIBC 1.09

 

1994-11-04

GLIBC 1.08.14

 

1994-11-01

GLIBC 1.08.13

 

1994-10-24

GLIBC 1.08.12

 

1994-10-19

GLIBC 1.08.11

 

1994-10-11

GLIBC 1.08.10

 

1994-09-26

GLIBC 1.08.9

 

1994-09-04

GLIBC 1.08.8

 

1994-09-01

GLIBC 1.08.7

 

1994-08-08

GLIBC 1.08.6

 

1994-08-03

GLIBC 1.08.5

 

1994-07-29

GLIBC 1.08.4

 

1994-07-04

GLIBC 1.08.3

 

1994-06-05

GLIBC 1.08.1

 

1994-05-21

GLIBC 1.08

 

1994-05-18

GLIBC 1.07.6

 

1994-05-03

GLIBC 1.07.5

 

1994-02-17

GLIBC 1.07.4

 

1994-02-08

GLIBC 1.07.3

 

1994-02-05

GLIBC 1.07.2

 

1994-01-25

GLIBC 1.07.1

 

1994-01-17

GLIBC 1.07

 

1994-01-16

GLIBC 1.06.13

 

1994-01-13

GLIBC 1.06.12

 

1994-01-11

GLIBC 1.06.11

 

1994-01-08

GLIBC 1.06.10

 

1993-12-25

GLIBC 1.06.9

 

1993-12-21

GLIBC 1.06.8

 

1993-11-09

GLIBC 1.06.7

 

1993-08-16

GLIBC 1.06.6

 

1993-06-29

GLIBC 1.06.4

 

1993-06-16

GLIBC 1.06.3

 

1993-05-31

GLIBC 1.06.2

 

1993-05-27

GLIBC 1.06.1

 

1993-05-23

GLIBC 1.06

 

1992-09-24

GLIBC 1.05

 

1992-09-03

GLIBC 1.04

 

1992-04-09

GLIBC 1.03

 

1992-03-20

GLIBC 1.02

 

1992-03-11

GLIBC 1.01

 

1992-02-18

GLIBC 1.00

 

1992-02-17

GLIBC 0.6

 

1992-02-16

GLIBC 0.5

 

1992-02-14

GLIBC 0.4.1

 

1992-02-14

GLIBC 0.4

 

1991-10-08

GLIBC 0.1

 

1988-01-01

GLIBC Pre-release

"Most libraries are done." - Roland McGrath

https://sourceware.org/glibc/wiki/Glibc%20Timeline

内核及其对应关系如下:

http://man7.org/tlpi/api_changes/#glibc-2.14

GCC版本发布

ReleaseRelease date
GCC 11.2 July 28, 2021
GCC 9.4 June 1, 2021
GCC 8.5 May 14, 2021
GCC 11.1 April 27, 2021
GCC 10.3 April 8, 2021
GCC 10.2 July 23, 2020
GCC 10.1 May 7, 2020
GCC 9.3 March 12, 2020
GCC 8.4 March 4, 2020
GCC 7.5 November 14, 2019
GCC 9.2 August 12, 2019
GCC 9.1 May 3, 2019
GCC 8.3 February 22, 2019
GCC 7.4 December 6, 2018
GCC 6.5 October 26, 2018
GCC 8.2 July 26, 2018
GCC 8.1 May 2, 2018
GCC 7.3 January 25, 2018
GCC 5.5 October 10, 2017
GCC 7.2 August 14, 2017
GCC 6.4 July 4, 2017
GCC 7.1 May 2, 2017
GCC 6.3 December 21, 2016
GCC 6.2 August 22, 2016
GCC 4.9.4 August 3, 2016
GCC 5.4 June 3, 2016
GCC 6.1 April 27, 2016
GCC 5.3 December 4, 2015
GCC 5.2 July 16, 2015
GCC 4.9.3 June 26, 2015
GCC 4.8.5 June 23, 2015

GDB版本发布

 

LSB

  LSB定义了linux的基本组成部分的规范。支持7大CPU架构,准确的说就是Intel、IBM和AMD家,ARM是不在范围的(信创操作系统首先就是支持ARM),debian也为LSB认证。rhel 7对应的LSB 4.1,可通过lsb_release查看操作系统是否符合LSB。最新的LSB规范是2015年定义的5.0。其定义如下。

从上可知,符合LSB的linux可以程序确保相互兼容。

lsb的版本可通过lsb_release查看如下:

[zjh@lightdb1 ~]$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:    CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:    7.9.2009
Codename:    Core
[root@localhost ~]# cat /etc/lsb-release 
DISTRIB_ID=Kylin
DISTRIB_RELEASE=V10
DISTRIB_CODENAME=juniper
DISTRIB_DESCRIPTION="Kylin V10"
DISTRIB_KYLIN_RELEASE=V10
DISTRIB_VERSION_TYPE=enterprise
DISTRIB_VERSION_MODE=normal
[root@localhost ~]# 

可见kylin并不是符合LSB的linux。

补充(c/c++标准库和运行时)

  ISO 14882标准中,在条款20到33和附加章节D中定义的C++应该实现的内容。

  这部分内容是C++标准库应该要实现的内容。有了这个标准定义,世界上各个组织才能实现具体的C++标准库。这其中,有影响力的组织及其实现有3个:GNU的libstdc++、LLVM的libc++、mv的vc++。一般来说:

  • 在GNU/Linux上,使用的C++库都是GNU实现的libstdc++(/usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.so、/usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a);
  • 在MacOS、iOS上,使用的C++库都是LLVM项目实现的libc++(/usr/lib/libc++.dylib);
  • 在Android上,使用的C++库为LLVM的libc++(NDK r18以前还是支持GNU的libstdc++的,在r18上被完全去除);注意这可不是系统库,你需要将库文件包含在apk中(Android上的系统库是/system/lib/libstdc++.so,这不是GNU的那个,只包含了最小的C++ runtime实现,如new delete等);
  • 在Windows上,使用的C++库都是CRT 。

  默认情况下,gcc和maven打包一样,不用配置依赖标准库,且自动去搜索。通过gcc -v可以查看到所有的依赖编程过程:

[lightdb@lightdb-dev cpp-learning]$ g++ -v -o test_struct_print test_struct_print.cpp 
使用内建 specs。
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
目标:x86_64-redhat-linux
配置为:../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
线程模型:posix
gcc 版本 8.5.0 20210514 (Red Hat 8.5.0-21) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-o' 'test_struct_print' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/8/cc1plus -quiet -v -D_GNU_SOURCE test_struct_print.cpp -quiet -dumpbase test_struct_print.cpp -mtune=generic -march=x86-64 -auxbase test_struct_print -version -o /tmp/ccd6GWin.s
GNU C++14 (GCC) 版本 8.5.0 20210514 (Red Hat 8.5.0-21) (x86_64-redhat-linux)
        由 GNU C 版本 8.5.0 20210514 (Red Hat 8.5.0-21) 编译,GMP 版本 6.1.2,MPFR 版本 3.1.6-p2,MPC 版本 1.1.0,isl 版本 isl-0.16.1-GMP

GGC 准则:--param ggc-min-expand=100 --param ggc-min-heapsize=131072
忽略不存在的目录“/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed”
忽略不存在的目录“/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include”
#include "..." 搜索从这里开始:
#include <...> 搜索从这里开始:
 /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8
 /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux
 /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward
 /usr/lib/gcc/x86_64-redhat-linux/8/include
 /usr/local/include
 /usr/include
搜索列表结束。
GNU C++14 (GCC) 版本 8.5.0 20210514 (Red Hat 8.5.0-21) (x86_64-redhat-linux)
        由 GNU C 版本 8.5.0 20210514 (Red Hat 8.5.0-21) 编译,GMP 版本 6.1.2,MPFR 版本 3.1.6-p2,MPC 版本 1.1.0,isl 版本 isl-0.16.1-GMP

GGC 准则:--param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 5e619065562b1933b9d60354681a5b3b
COLLECT_GCC_OPTIONS='-v' '-o' 'test_struct_print' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/ccXHfIeo.o /tmp/ccd6GWin.s
GNU assembler version 2.30 (x86_64-redhat-linux) using BFD version version 2.30-108.el8
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'test_struct_print' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccAQUNLq.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test_struct_print /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. /tmp/ccXHfIeo.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/8/crtend.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o
COLLECT_GCC_OPTIONS='-v' '-o' 'test_struct_print' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
[lightdb@lightdb-dev cpp-learning]$ ldd test_struct_print
        linux-vdso.so.1 (0x00007ffc59e81000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f2e024da000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f2e02158000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2e01f40000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f2e01b7b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2e0286f000)

https://blog.csdn.net/weixin_35351343/article/details/112674966

http://www.taodudu.cc/news/show-4790541.html?action=onClick

posted @ 2017-01-05 21:03  zhjh256  阅读(5639)  评论(0编辑  收藏  举报