登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
我知道了
查看详情
登录
注册
Gitee Talk | 模力方舟 AI 应用开发沙龙第六站 · 8月23日 广州集结中!
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
131
Star
0
Fork
72
src-openEuler
/
rust
代码
Issues
14
Pull Requests
0
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
openEuler 23.09 Kuasar 项目调用 Rust 执行编译目标为 aarch64-unknown-linux-musl 时报错
已验收
#I7WM18
缺陷
flyflyflypeng
创建于
2023-08-28 19:29
**openEuler 23.09 Kuasar 项目调用 Rust 执行编译目标为 aarch64-unknown-linux-musl 时报错)** **一、缺陷信息** **缺陷归属组件:** rust-std-static-1.71.1-1.oe2309.aarch64 **缺陷归属的版本:** openEuler 23.09 **缺陷简述:** 1. openEuler 23.09下面采用Rust语言编写的项目[Kuasar](https://gitee.com/src-openeuler/kuasar)在进行静态编译(编译目标是:--target=aarch64-unknown-linux-musl)遇到了如下错误: ```bash bash-5.2# cargo build --target=aarch64-unknown-linux-musl --release Compiling vmm-common v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/common) Compiling vmm-task v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/task) error: linking with `cc` failed: exit status: 1 | = note: LC_ALL="C" PATH="/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.cargo/bin:/root/.cargo/bin:/root/.cargo/bin: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/.fzf/bin:/usr/lib/golang:/root/go/bin:/root/bin:/usr/lib/golang:/root/go/bin" VSLANG="1033" "cc" "/usr/lib/rustlib/aarch6 4-unknown-linux-musl/lib/self-contained/crt1.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt begin.o" "/tmp/rustcYD9Lks/symbols.o" ...... libcfg_if-bac17d2f9d215c51.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liblibc-0bef094f71fa95fe.rlib" "-lc" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liballoc-503524184 17a195b.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_core-dc3b5b81de625ffe.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcore-83eb02c8c05b0d7c .rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-06fb3afc834e8de9.rlib" "-Wl,-Bdynamic" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/ usr/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/t ask/target/aarch64-unknown-linux-musl/release/deps/vmm_task-a19bbb31ca38fd9a" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/usr/lib/rustlib/aa rch64-unknown-linux-musl/lib/self-contained/crtend.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o" = note: /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetDataRelBase': (.text._Unwind_GetDataRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetDataRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetTextRelBase': (.text._Unwind_GetTextRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetTextRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_Backtrace': (.text._Unwind_Backtrace+0xf4): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o):(.text._Unwind_Backtrace+0x188): more undefined references to `__ fprintf_chk' follow collect2: error: ld returned 1 exit status = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-lib kindname) error: could not compile `vmm-task` (bin "vmm-task") due to previous error ``` 2. kuasar项目在2023-08-23之前能够正常编译构建,但是现在kuasar项目没有任何改动,出现了上述的编译错误。 **【环境信息】** 软件信息 OS:openEuler 23.09 **【问题复现步骤】** 1. 执行`osc co openEuler:23.09 kuasar`命令将kuasar obs项目拉取到本地 2. 执行`osc up -S`拉取最新的代码 3. 执行`osc osc build --root=/home/obstmp-kuasar-23.09 standard_$(uname -m)`编译构建 4. 编译过程中就出现上面的错误信息 **【实际结果】** 编译过程遇到错误终端,返回下面的错误信息 ```bash bash-5.2# cargo build --target=aarch64-unknown-linux-musl --release Compiling vmm-common v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/common) Compiling vmm-task v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/task) error: linking with `cc` failed: exit status: 1 | = note: LC_ALL="C" PATH="/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.cargo/bin:/root/.cargo/bin:/root/.cargo/bin: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/.fzf/bin:/usr/lib/golang:/root/go/bin:/root/bin:/usr/lib/golang:/root/go/bin" VSLANG="1033" "cc" "/usr/lib/rustlib/aarch6 4-unknown-linux-musl/lib/self-contained/crt1.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt begin.o" "/tmp/rustcYD9Lks/symbols.o" ...... libcfg_if-bac17d2f9d215c51.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liblibc-0bef094f71fa95fe.rlib" "-lc" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liballoc-503524184 17a195b.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_core-dc3b5b81de625ffe.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcore-83eb02c8c05b0d7c .rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-06fb3afc834e8de9.rlib" "-Wl,-Bdynamic" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/ usr/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/t ask/target/aarch64-unknown-linux-musl/release/deps/vmm_task-a19bbb31ca38fd9a" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/usr/lib/rustlib/aa rch64-unknown-linux-musl/lib/self-contained/crtend.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o" = note: /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetDataRelBase': (.text._Unwind_GetDataRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetDataRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetTextRelBase': (.text._Unwind_GetTextRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetTextRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_Backtrace': (.text._Unwind_Backtrace+0xf4): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o):(.text._Unwind_Backtrace+0x188): more undefined references to `__ fprintf_chk' follow collect2: error: ld returned 1 exit status = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-lib kindname) error: could not compile `vmm-task` (bin "vmm-task") due to previous error ``` **【其他相关附件信息】** kuasar项目在openEuler:Mainline项目下能够正常编译通过,但是相同的kuasar项目源码在openEuler:23.09 项目下就编译构建失败。 openEuler:Mainline编译环境中查询到的rust版本信息: ```bash bash-5.2# rpm -qa |grep rust rust-std-static-1.71.1-1.oe2309.aarch64 p11-kit-trust-0.25.0-1.oe2309.aarch64 rust-1.71.1-1.oe2309.aarch64 python3-rust2rpm-23-1.oe2309.aarch64 rust-packaging-23-1.oe2309.aarch6 ``` openEuler:23.09编译环境中查询到的rust版本信息: ```bash rust-std-static-1.71.1-1.oe2309.aarch64 p11-kit-trust-0.25.0-1.oe2309.aarch64 rust-1.71.1-1.oe2309.aarch64 python3-rust2rpm-23-1.oe2309.aarch64 rust-packaging-23-1.oe2309.aarch64 ``` 两者的版本号信息都相同,但是通过上面错误信息`/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetDataRelBase'`进行正向分析,发现`/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a`静态库文件存在差异,通过`nm`命令分析结果如下: openEuler:Mainline编译环境中查看`libunwind.a`文件的外部符号分析 ``` bash-5.2# nm -u /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a ... UnwindLevel1-gcc-ext.o: U abort U fflush U fprintf //差异点 U logAPIs U logUnwinding U __stack_chk_fail U __stack_chk_guard U stderr U __unw_add_dynamic_fde U __unw_getcontext U __unw_get_proc_info U __unw_get_proc_name U __unw_get_reg U _Unwind_GetIP U _Unwind_RaiseException U _Unwind_Resume U __unw_init_local U __unw_is_signal_frame U __unw_remove_dynamic_fde U __unw_set_reg U __unw_step ``` openEuler:23.09编译环境中查看`libunwind.a`文件的外部符号分析 ```bash bash-5.2# nm -u /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a ... UnwindLevel1-gcc-ext.o: U abort U fflush U __fprintf_chk // 差异点 U logAPIs U logUnwinding U __stack_chk_fail U __stack_chk_guard U stderr U __unw_add_dynamic_fde U __unw_getcontext U __unw_get_proc_info U __unw_get_proc_name U __unw_get_reg U _Unwind_GetIP U _Unwind_RaiseException U _Unwind_Resume U __unw_init_local U __unw_is_signal_frame U __unw_remove_dynamic_fde U __unw_set_reg U __unw_step ``` 对比分析上面libunwind.a库文件中符号结果,openEuler 23.09项目中`libunwind.a`文件中`fprintf`符号变更为了`__fprintf_chk`,导致了最终的kuasar项目静态编译最后链接阶段失败了。
**openEuler 23.09 Kuasar 项目调用 Rust 执行编译目标为 aarch64-unknown-linux-musl 时报错)** **一、缺陷信息** **缺陷归属组件:** rust-std-static-1.71.1-1.oe2309.aarch64 **缺陷归属的版本:** openEuler 23.09 **缺陷简述:** 1. openEuler 23.09下面采用Rust语言编写的项目[Kuasar](https://gitee.com/src-openeuler/kuasar)在进行静态编译(编译目标是:--target=aarch64-unknown-linux-musl)遇到了如下错误: ```bash bash-5.2# cargo build --target=aarch64-unknown-linux-musl --release Compiling vmm-common v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/common) Compiling vmm-task v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/task) error: linking with `cc` failed: exit status: 1 | = note: LC_ALL="C" PATH="/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.cargo/bin:/root/.cargo/bin:/root/.cargo/bin: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/.fzf/bin:/usr/lib/golang:/root/go/bin:/root/bin:/usr/lib/golang:/root/go/bin" VSLANG="1033" "cc" "/usr/lib/rustlib/aarch6 4-unknown-linux-musl/lib/self-contained/crt1.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt begin.o" "/tmp/rustcYD9Lks/symbols.o" ...... libcfg_if-bac17d2f9d215c51.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liblibc-0bef094f71fa95fe.rlib" "-lc" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liballoc-503524184 17a195b.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_core-dc3b5b81de625ffe.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcore-83eb02c8c05b0d7c .rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-06fb3afc834e8de9.rlib" "-Wl,-Bdynamic" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/ usr/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/t ask/target/aarch64-unknown-linux-musl/release/deps/vmm_task-a19bbb31ca38fd9a" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/usr/lib/rustlib/aa rch64-unknown-linux-musl/lib/self-contained/crtend.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o" = note: /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetDataRelBase': (.text._Unwind_GetDataRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetDataRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetTextRelBase': (.text._Unwind_GetTextRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetTextRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_Backtrace': (.text._Unwind_Backtrace+0xf4): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o):(.text._Unwind_Backtrace+0x188): more undefined references to `__ fprintf_chk' follow collect2: error: ld returned 1 exit status = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-lib kindname) error: could not compile `vmm-task` (bin "vmm-task") due to previous error ``` 2. kuasar项目在2023-08-23之前能够正常编译构建,但是现在kuasar项目没有任何改动,出现了上述的编译错误。 **【环境信息】** 软件信息 OS:openEuler 23.09 **【问题复现步骤】** 1. 执行`osc co openEuler:23.09 kuasar`命令将kuasar obs项目拉取到本地 2. 执行`osc up -S`拉取最新的代码 3. 执行`osc osc build --root=/home/obstmp-kuasar-23.09 standard_$(uname -m)`编译构建 4. 编译过程中就出现上面的错误信息 **【实际结果】** 编译过程遇到错误终端,返回下面的错误信息 ```bash bash-5.2# cargo build --target=aarch64-unknown-linux-musl --release Compiling vmm-common v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/common) Compiling vmm-task v0.1.0 (/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/task) error: linking with `cc` failed: exit status: 1 | = note: LC_ALL="C" PATH="/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin:/usr/lib/rustlib/aarch64-unknown-linux-gnu/bin/self-contained:/root/.cargo/bin:/root/.cargo/bin:/root/.cargo/bin: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/.fzf/bin:/usr/lib/golang:/root/go/bin:/root/bin:/usr/lib/golang:/root/go/bin" VSLANG="1033" "cc" "/usr/lib/rustlib/aarch6 4-unknown-linux-musl/lib/self-contained/crt1.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crti.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crt begin.o" "/tmp/rustcYD9Lks/symbols.o" ...... libcfg_if-bac17d2f9d215c51.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liblibc-0bef094f71fa95fe.rlib" "-lc" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/liballoc-503524184 17a195b.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/librustc_std_workspace_core-dc3b5b81de625ffe.rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcore-83eb02c8c05b0d7c .rlib" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/libcompiler_builtins-06fb3afc834e8de9.rlib" "-Wl,-Bdynamic" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-nostartfiles" "-L" "/ usr/lib/rustlib/aarch64-unknown-linux-musl/lib" "-L" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained" "-o" "/home/abuild/rpmbuild/BUILD/kuasar-0.0.1/kuasar-openeuler/vmm/t ask/target/aarch64-unknown-linux-musl/release/deps/vmm_task-a19bbb31ca38fd9a" "-Wl,--gc-sections" "-static" "-no-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "/usr/lib/rustlib/aa rch64-unknown-linux-musl/lib/self-contained/crtend.o" "/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/crtn.o" = note: /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetDataRelBase': (.text._Unwind_GetDataRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetDataRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetTextRelBase': (.text._Unwind_GetTextRelBase+0x44): undefined reference to `__fprintf_chk' /usr/bin/ld: (.text._Unwind_GetTextRelBase+0x68): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_Backtrace': (.text._Unwind_Backtrace+0xf4): undefined reference to `__fprintf_chk' /usr/bin/ld: /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o):(.text._Unwind_Backtrace+0x188): more undefined references to `__ fprintf_chk' follow collect2: error: ld returned 1 exit status = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified = note: use the `-l` flag to specify native libraries to link = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-lib kindname) error: could not compile `vmm-task` (bin "vmm-task") due to previous error ``` **【其他相关附件信息】** kuasar项目在openEuler:Mainline项目下能够正常编译通过,但是相同的kuasar项目源码在openEuler:23.09 项目下就编译构建失败。 openEuler:Mainline编译环境中查询到的rust版本信息: ```bash bash-5.2# rpm -qa |grep rust rust-std-static-1.71.1-1.oe2309.aarch64 p11-kit-trust-0.25.0-1.oe2309.aarch64 rust-1.71.1-1.oe2309.aarch64 python3-rust2rpm-23-1.oe2309.aarch64 rust-packaging-23-1.oe2309.aarch6 ``` openEuler:23.09编译环境中查询到的rust版本信息: ```bash rust-std-static-1.71.1-1.oe2309.aarch64 p11-kit-trust-0.25.0-1.oe2309.aarch64 rust-1.71.1-1.oe2309.aarch64 python3-rust2rpm-23-1.oe2309.aarch64 rust-packaging-23-1.oe2309.aarch64 ``` 两者的版本号信息都相同,但是通过上面错误信息`/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a(UnwindLevel1-gcc-ext.o): in function `_Unwind_GetDataRelBase'`进行正向分析,发现`/usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a`静态库文件存在差异,通过`nm`命令分析结果如下: openEuler:Mainline编译环境中查看`libunwind.a`文件的外部符号分析 ``` bash-5.2# nm -u /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a ... UnwindLevel1-gcc-ext.o: U abort U fflush U fprintf //差异点 U logAPIs U logUnwinding U __stack_chk_fail U __stack_chk_guard U stderr U __unw_add_dynamic_fde U __unw_getcontext U __unw_get_proc_info U __unw_get_proc_name U __unw_get_reg U _Unwind_GetIP U _Unwind_RaiseException U _Unwind_Resume U __unw_init_local U __unw_is_signal_frame U __unw_remove_dynamic_fde U __unw_set_reg U __unw_step ``` openEuler:23.09编译环境中查看`libunwind.a`文件的外部符号分析 ```bash bash-5.2# nm -u /usr/lib/rustlib/aarch64-unknown-linux-musl/lib/self-contained/libunwind.a ... UnwindLevel1-gcc-ext.o: U abort U fflush U __fprintf_chk // 差异点 U logAPIs U logUnwinding U __stack_chk_fail U __stack_chk_guard U stderr U __unw_add_dynamic_fde U __unw_getcontext U __unw_get_proc_info U __unw_get_proc_name U __unw_get_reg U _Unwind_GetIP U _Unwind_RaiseException U _Unwind_Resume U __unw_init_local U __unw_is_signal_frame U __unw_remove_dynamic_fde U __unw_set_reg U __unw_step ``` 对比分析上面libunwind.a库文件中符号结果,openEuler 23.09项目中`libunwind.a`文件中`fprintf`符号变更为了`__fprintf_chk`,导致了最终的kuasar项目静态编译最后链接阶段失败了。
评论 (
2
)
登录
后才可以发表评论
状态
已验收
待办的
已挂起
修复中
已确认
已完成
已验收
已取消
负责人
未设置
caodongxia
caodongxia
负责人
协作者
+负责人
+协作者
标签
sig/sig-Rust
未设置
项目
未立项任务
未立项任务
里程碑
openEuler-23.09-round-1
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (31)
标签 (26)
master
openEuler-25.09
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-Next
openEuler-24.03-LTS-SP2
openEuler-25.03
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-22.03-LTS-SP1
openEuler-24.09
openEuler-20.03-LTS-SP4
openEuler-24.03-LTS
sync-pr129-openEuler-24.03-LTS-to-master
openEuler-22.03-LTS-Next
openEuler-20.03-LTS-SP1
openEuler-22.03-LTS-SP2
openEuler-22.03-LTS
openEuler-23.09
openEuler-23.03
openEuler-22.03-LTS-LoongArch
openEuler-22.09
openEuler-20.03-LTS-SP3
openEuler-20.03-LTS
openEuler-20.03-LTS-SP2
openEuler-21.09
openEuler-20.03-LTS-Next
openEuler-21.03
openEuler-20.09
20.09
openEuler1.0
openEuler1.0-base
openEuler-24.03-LTS-SP2-release
openEuler-24.03-LTS-SP1-update-20250516
openEuler-25.03-release
openEuler-22.03-LTS-SP3-update-20250307
openEuler-22.03-LTS-SP4-update-20250307
openEuler-24.03-LTS-SP1-release
openEuler-24.09-release
openEuler-22.03-LTS-SP4-release
openEuler-24.03-LTS-release
openEuler-22.03-LTS-SP3-release
openEuler-23.09-rc5
openEuler-22.03-LTS-SP1-release
openEuler-22.09-release
openEuler-22.09-rc5
openEuler-22.09-20220829
openEuler-22.03-LTS-20220331
openEuler-22.03-LTS-round5
openEuler-22.03-LTS-round3
openEuler-22.03-LTS-round2
openEuler-22.03-LTS-round1
openEuler-20.03-LTS-SP3-release
openEuler-20.03-LTS-SP2-20210624
openEuler-21.03-20210330
openEuler-20.09-20200929
openEuler-20.03-LTS-20200606
openEuler-20.03-LTS-tag
开始日期 - 截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
1
https://gitee.com/src-openeuler/rust.git
git@gitee.com:src-openeuler/rust.git
src-openeuler
rust
rust
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册