【问题标题】:Qt +musl system exceptionQt +musl 系统异常
【发布时间】:2021-12-11 08:14:39
【问题描述】:

您好,我用 c++ 构建库并用 c++ 编程打开 dll,它可以工作。问题是,当我想使用 qt 打开我的 dll 时,它会打开它加载符号,但之后当我想使用它并调用某些函数时,我遇到了系统异常。 我读到混合 libgcc_s.so.1 可能是问题,但我不知道是什么原因。

/tmp/install (3)/Release$ musl-ldd ./libx.so 
        musl-ldd (0x7fca78cea000)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by ./libx.so)
    libc.musl-x86_64.so.1 => musl-ldd (0x7fca78cea000)
Error relocating ./libx.so: _Unwind_GetIPInfo: symbol not found
Error relocating ./libx.so: _Unwind_RaiseException: symbol not found
Error relocating ./libx.so: _Unwind_SetGR: symbol not found
Error relocating ./libx.so: _Unwind_GetDataRelBase: symbol not found
Error relocating ./libx.so: _Unwind_GetLanguageSpecificData: symbol not found
Error relocating ./libx.so: _Unwind_GetTextRelBase: symbol not found
Error relocating ./libx.so: _Unwind_DeleteException: symbol not found
Error relocating ./libx.so: _Unwind_GetRegionStart: symbol not found
Error relocating ./libx.so: _Unwind_Resume: symbol not found
Error relocating ./libx.so: _Unwind_SetIP: symbol not found
Error relocating ./libx.so: _Unwind_Resume_or_Rethrow: symbol not found

我遇到内核错误:

Oct 25 22:52:31 x-VirtualBox kernel: [176384.989436] dlloader-x[4110792]: segfault at 0 ip 000055a23feac63e sp 00007fff15948050 error 4 in dlloader-x[55a23fea9000+5000]
Oct 25 22:52:31 x-VirtualBox kernel: [176384.989441] Code: 87 69 00 00 48 89 c7 e8 00 d4 ff ff 48 8d 85 50 ff ff ff 48 89 c7 e8 37 d5 ff ff 48 8d 85 50 ff ff ff 48 89 c7 e8 a0 01 00 00 <48> 8b 10 48 83 c2 10 48 8b 12 48 89 c7 ff d2 48 c7 85 28 ff ff ff

我尝试链接 libc static 但没有差异,可能是 qt 链接器的问题?有人可以帮忙吗?

【问题讨论】:

    标签: c++ qt linker flags musl


    【解决方案1】:

    您的问题是链接器根本没有找到 libgcc_s.so。该库是 gcc 的运行时库,它与 libc 没有任何关系(请确保不要将其与 glibc 混淆)

    如果您在 alpine 上,请安装 libgcc 软件包。

    如果没有,请确保它存在于musl动态链接器的搜索路径中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-01
      • 2017-08-04
      • 1970-01-01
      • 1970-01-01
      • 2016-06-12
      • 2018-11-21
      • 2012-11-26
      • 1970-01-01
      相关资源
      最近更新 更多