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

打包成so包之后,dlopen(dynamicModulePath.c_str(), RTLD_LAZY);加载会报错时因为什么 #26

Closed
Han-WG opened this issue Jan 11, 2024 · 5 comments

Comments

@Han-WG
Copy link

Han-WG commented Jan 11, 2024

dll存在

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

@Han-WG
Copy link
Author

Han-WG commented Jan 11, 2024

debug到 m_DynamicModulePtr = dlopen(dynamicModulePath.c_str(), RTLD_LAZY);这一行时会报错误:

Signal: SIGSEGV (signal SIGSEGV: invalid address (fault address: 0x10))

我编译的时候没有出错

@HW140701
Copy link
Owner

debug到 m_DynamicModulePtr = dlopen(dynamicModulePath.c_str(), RTLD_LAZY);这一行时会报错误:

Signal: SIGSEGV (signal SIGSEGV: invalid address (fault address: 0x10))

我编译的时候没有出错

先检查下你的so库路径是否正确,dlopen是否打开的是正确路径的so

@Han-WG
Copy link
Author

Han-WG commented Jan 11, 2024

路径是没有问题的,我换了别的so包,就可以加载成功,换了自己编译的so包就不行了
不知道编译过程中哪里出了问题,我编译是成功了的,编译了好几遍
用的是GoogleMediapipePackageDll/dll/hand_tracking_test/里的文件直接复制的
编译指令是
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="/home/hanwg/anaconda3/envs/torch/bin/python3" mediapipe/examples/desktop/hand_tracking_test:Mediapipe_Hand_Tracking --verbose_failures

唯一的修改是在BUILD里加了几行
Screenshot from 2024-01-11 11-16-27

@Han-WG
Copy link
Author

Han-WG commented Jan 11, 2024

这是编译成功的界面

Screenshot from 2024-01-11 11-35-26

@HW140701
Copy link
Owner

我没有实际在Ubuntu上编译和运行过这个项目,所以没有办法对你的问题提出建议。
无法加载so,使用ldd看下这个so链接的有些库是不是没有找到。

@Han-WG Han-WG closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants