Hi everyone,
1、gcc-12版本已经放入openEuler 22.09 EPOL仓里,openEuler 22.09每日构建版本地址为 http://121.36.84.172/dailybuild/openEuler-22.09/ 当前最新的每日构建版本为 http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... 可以从该网页下载ISO镜像进行系统安装。
2、yum源配置可以参考如下 ``` $ cat /etc/yum.repos.d/openEuler.repo
[OS] name=OS baseurl=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... enabled=1 gpgcheck=1 gpgkey=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5...
[everything] name=everything baseurl=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... enabled=1 gpgcheck=1 gpgkey=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5...
[EPOL] name=EPOL baseurl=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... enabled=1 gpgcheck=1 gpgkey=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5...
[debuginfo] name=debuginfo baseurl=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... enabled=1 gpgcheck=1 gpgkey=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5...
[source] name=source baseurl=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... enabled=1 gpgcheck=1 gpgkey=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5...
[update] name=update baseurl=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... enabled=1 gpgcheck=1 gpgkey=http://121.36.84.172/dailybuild/openEuler-22.09/openeuler-2022-09-07-12-34-5... ``` 需要注意的是,当最新的每日构建版本发布时,历史版本baseurl地址内的RPM包部分会被删除,所以使用时需要更新一下baseurl地址
3、gcc-12相关RPM包列举如下(x86_64为例) ``` $ yum list | grep gcc-toolset-12 gcc-toolset-12-cpp.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc-c++.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc-debuginfo.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc-debugsource.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc-gdb-plugin.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc-gfortran.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-gcc-plugin-devel.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libasan.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libasan-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libatomic.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libatomic-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libgcc.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libgccjit.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libgccjit-devel.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libgfortran.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libgfortran-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libgomp.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libitm.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libitm-devel.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libitm-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-liblsan.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-liblsan-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libquadmath.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libquadmath-devel.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libquadmath-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libstdc++.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libstdc++-devel.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libstdc++-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libtsan.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libtsan-static.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libubsan.x86_64 12.1.1-3.oe2209 EPOL gcc-toolset-12-libubsan-static.x86_64 12.1.1-3.oe2209 EPOL ``` 可以直接 yum install gcc-toolset-12-* 安装gcc-12所有包或者选取需要使用的包进行安装
4、配置环境参数,当前gcc-12首版本需要手动配置相关环境参数才能使能编译和运行 ``` export PATH=/opt/openEuler/gcc-toolset-12/root/usr/bin:$PATH export LD_LIBRARY_PATH=/opt/openEuler/gcc-toolset-12/root/usr/lib64:$LD_LIBRARY_PATH ```
Thanks, Zhiheng