Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

钉钉无法启动 #8

Open
MingcongBai opened this issue Jan 22, 2024 · 1 comment
Open

钉钉无法启动 #8

MingcongBai opened this issue Jan 22, 2024 · 1 comment
Labels
bug Something isn't working bundled-dep Issue with bundled dependencies (usually shared objects) upstream-issue Issue to be addressed by upstream (vendor)

Comments

@MingcongBai
Copy link
Member

MingcongBai commented Jan 22, 2024

@shankerwangmiao 报告,钉钉内置的 libutforpc.so,其中定义了一些 SSL_* 符号,如图:

图片

初步调查的结论是:估计编译的时候没有加 -Wl,-z,defs 参数,然后又没有加 -lssl,所以没定义的 SSL_ 符号便没有正确定义,而且符号表里没有 SSL_ 相关符号的版本。这个库用到的 ssl 函数符号,有的是 OpenSSL 3.x 的,有的是 OpenSSL 1.1 的,程序便无法运行了。

需要强调的是,该问题是 libLoL 测试过程中发现的,和 libLoL 提供的环境无关,反而是暴露了钉钉语音发行内容中存在的问题;换言之,假若是旧世界系统升级了 OpenSSL 3.x,钉钉也会挂掉;目前只是刚好能运行而已。

@MingcongBai MingcongBai added bug Something isn't working bundled-dep Issue with bundled dependencies (usually shared objects) labels Jan 22, 2024
@shankerwangmiao
Copy link
Collaborator

目前来看的情况是:打包的共享库文件 libutforpc.so.dynamic 节中,缺少需要的库的声明(DT_NEEDED),该库文件至少还需要 libssl.so.1.1libldap-2.4.so.2;同时,在 .dynsym 节中,对 openssl 的符号的引用没有标注符号版本。上述问题可能致使 libutforpc.so 被连接上错误的 openssl 的符号版本。

结合上述现象,合理推测在连接 libutforpc.so 时,没有传入 -Wl,-z,defs 选项,同时没有指明其全部的直接依赖库,致使出现了未能连接的符号进入目标产物。同时,由于运行的系统上目前暂时不存在更新的 openssl 库,并且上述两个缺失的依赖库刚好作为其他共享库文件的依赖引入,于是掩盖了上述问题,看起来可以成功运行。

建议:在连接共享库文件的时候,应传入 -Wl,-z,defs 选项,并传入全部直接依赖(例如 -lssl)。前者可以当传入的依赖不完整的时候报错退出,后者可以在连接的目标产物中增加需要库的声明,并正确设定符号版本。

@shankerwangmiao shankerwangmiao added the upstream-issue Issue to be addressed by upstream (vendor) label Jan 23, 2024
@MingcongBai MingcongBai changed the title 钉钉语音无法启动 钉钉无法启动 Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bundled-dep Issue with bundled dependencies (usually shared objects) upstream-issue Issue to be addressed by upstream (vendor)
Projects
None yet
Development

No branches or pull requests

2 participants