为树莓派构建 Qt 库时出错 [英] An error building Qt libraries for the raspberry pi

查看:55
本文介绍了为树莓派构建 Qt 库时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的 RPI 编译 Qt 5 库,但它总是崩溃.

I am trying to compile the Qt 5 libraries for my RPI, but it always crashes.

这些是我尝试遵循的指南:

These are the guides I have tried to follow:

http://qt-project.org/wiki/RaspberryPi_Beginners_guide
http://qt-project.org/wiki/RaspberryPi

我已经按照指南下载了交叉编译器和 sysroot-image,并从 git repo 中提取了 Qt5 源.

I have downloaded the cross-compiler and sysroot-image according to the guide and pulled the Qt5 sources from the git repo.

遵循其中一个指南后,我现在陷入了make.

After following one of the guides I am now stuck at make.

这是我收到的错误:

.obj/release-shared/qlibrary_unix.o: In function `QLibraryPrivate::load_sys()':
qlibrary_unix.cpp:(.text+0xf84): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlopen.o): In function `dlopen':
(.text+0xc): undefined reference to `__dlopen'
/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlclose.o): In function `dlclose':
(.text+0x0): undefined reference to `__dlclose'
/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlsym.o): In function `dlsym':
(.text+0xc): undefined reference to `__dlsym'
/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.a(dlerror.o): In function `dlerror':
(.text+0x0): undefined reference to `__dlerror'
/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libm.a(feholdexcpt.o): In function `feholdexcept':
(.text+0x48): undefined reference to `_dl_hwcap'
/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libm.a(fesetenv.o): In function `fesetenv':
(.text+0x64): undefined reference to `_dl_hwcap'
collect2: virhe: ld:n paluuarvo oli 1                                           # collect2: error: ld returnvalue was 1
make[2]: *** [../../lib/libQt5Core.so.5.0.0] Virhe 1                            # Error 1
make[2]: Poistutaan hakemistosta "/home/esa/qtonpi/qt5/qtbase/src/corelib"      # Leaving directory
make[1]: *** [sub-corelib-make_first] Virhe 2                                   # Error 2
make[1]: Poistutaan hakemistosta "/home/esa/qtonpi/qt5/qtbase/src"              # Leaving directory
make: *** [sub-src-make_first] Virhe 2                                          # Error 2

推荐答案

修复 sysroot 中库的路径.一些库是绝对路径的符号链接,当放置在您的系统中时会被破坏.检查类似/home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.so 或类似的内容.您应该会看到那些指向绝对路径的符号链接已损坏.修复所有这些.在您报告的文档中提供了用于此目的的脚本.你运行它了吗(https://gitorious.org/交叉编译工具/交叉编译工具/blob/master/fixQualifiedLibraryPaths)?

Fix the paths of the libraries in your sysroot. Some libraries are symlinks to absolute paths which are broken when placed in your system. Check something like /home/esa/qtonpi/rpi_image/usr/lib/arm-linux-gnueabihf/libdl.so or similar. You should see those are broken symlinks to absolute paths. Fix all of those. In the documents you reported a script for this purpose is provided. Did you run it (https://gitorious.org/cross-compile-tools/cross-compile-tools/blobs/master/fixQualifiedLibraryPaths)?

也尝试检查这个 如果你仍然遇到麻烦:我写了一些笔记,从 git 中为 wheezy 图像编译了一个最新版本.

Try also to check this if you still encounter troubles: I wrote down some notes compiling a recent version from the git for the wheezy image.

这篇关于为树莓派构建 Qt 库时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆