Description of problem: 加载Anolis7.9 ARM64镜像后,使用clang编译.c文件时,出现错误 # clang hello.c -o hello2 /usr/bin/ld: 找不到 crtbegin.o: 没有那个文件或目录 /usr/bin/ld: 找不到 -lgcc /usr/bin/ld: 找不到 -lgcc_s clang: error: linker command failed with exit code 1 (use -v to see invocation) Version-Release number of selected component (if applicable): # cat /etc/image-id image_name="Anolis OS 7.9 RHCK 64 bit ARM Edition" image_id="anolisos_7_9_arm64_20G_rhck_alibase_20220413.vhd" release_date="20220413173429" # clang -v clang version 3.4.2 (tags/RELEASE_34/dot2-final) Target: aarch64-redhat-linux-gnu Thread model: posix Selected GCC installation: gcc -v 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/4.8.5/lto-wrapper 目标:aarch64-redhat-linux 配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.openanolis.cn --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-aarch64-redhat-linux/cloog-install --enable-gnu-indirect-function --build=aarch64-redhat-linux 线程模型:posix gcc 版本 4.8.5 20150623 (Anolis 4.8.5-44.0.1) (GCC) How reproducible: 必现 Steps to Reproduce: 1.部署anolisos_7_9_arm64_20G_rhck_alibase_20220413.vhd镜像 2.安装clang yum install clang -y 3.编写简单的.c文件,如: #include<stdio.h> int main() { printf("Hello World!\n"); return 0; } 4、使用clang编译: clang hello.c -o hello Actual results: 编译出错,未生成对应可执行文件 Expected results: 编译成功,生成可执行文件且可正常运行 Additional info:
anolis7 中不提供clang,bug中的clang包是通过epel源拉入的。不在支持范围内。
Created attachment 216 [details] centos7.9 test pic centos7.9 aarch64存在相同问题 暂时降低优先级
6月份镜像 anolisos_7_9_arm64_20G_anck_alibase_20220701.vhd 有相同问题
7月份镜像测试anolisos_7_9_arm64_20G_anck_alibase_20220727.vhd有相同问题