Qt 5.2.1支持ICU:所有应用程序都以代码1退出(Qt 5.2.1 with ICU support: all applications exit with code 1)

编程入门 行业动态 更新时间:2024-10-19 06:15:49
Qt 5.2.1支持ICU:所有应用程序都以代码1退出(Qt 5.2.1 with ICU support: all applications exit with code 1)

我在linux嵌入式操作QT 5.2.1应用程序时遇到问题(所有这些应用程序,甚至是最简单的“hello world”应用程序,代码为1)。

我使用TI提供的工具链(SDK 6.00.00)交叉编译了QT 5.2.1 for linux嵌入式设备(TI AM335x)。 我还添加了ICU支持(因为我计划交叉编译QtWebkit,ICU是必需的依赖项)。

所以,我之前构建了ICU(版本52),然后使用以下配置交叉编译QT:

./configure -prefix /opt/qt5 -opensource -confirm-license -platform linux-g++ -icu -I /opt/icu/include -L /opt/icu/lib -R /opt/icu/lib -no-cups -no-nis -no-dbus -no-pch -no-accessibility -no-gtkstyle -no-xcb -eglfs -no-directfb -qpa eglfs-xplatform linux-arm-gnueabihf-g++ -opengl es2 -nomake examples -nomake tests -v

(以前构建的ICU库驻留在/ opt / icu / lib中)。

然后像往常一样使用make && make install编译QT。

然后我在开发机器上配置了我的QT Creator IDE(Ubuntu 12.04 LTS 32位),用于编译针对新QT版本的应用程序,只需交叉编译,使用TI提供的相同工具链(SDK 6.00.00)。

一切都很好:我的基于控制台的“hello,world”应用程序已经过编译,然后我可以将它部署到设备上(设置让QT找到自己的库所需的所有请求的环境变量)。

但问题出现了

应用程序始终以代码1退出并且不生成输出。

如果我strace我的应用程序,运行strace -o trace.log ./TestConsole然后它会产生你可以在这里找到的输出。

换句话说,似乎有人在加载了libicudata.so.52之后调用了exit_group(1) 。

但谁在呼唤它呢? 为什么?

请考虑如果我在没有ICU支持的情况下交叉构建QT,那么我可以针对它编译和运行应用程序...所以我认为它与ICU相关......有什么想法吗?

I have a problem running QT 5.2.1 applications on linux embedded (all of them, even the simplest "hello world" exits with code 1).

I cross compiled QT 5.2.1 for a linux embedded device (TI AM335x) using the toolchain supplied by TI (SDK 6.00.00). I also added ICU support (because I am planning to cross-compile QtWebkit too and ICU is a required dependency).

So, I previously built ICU (version 52) and then I cross-compiled QT using the following configuration:

./configure -prefix /opt/qt5 -opensource -confirm-license -platform linux-g++ -icu -I /opt/icu/include -L /opt/icu/lib -R /opt/icu/lib -no-cups -no-nis -no-dbus -no-pch -no-accessibility -no-gtkstyle -no-xcb -eglfs -no-directfb -qpa eglfs-xplatform linux-arm-gnueabihf-g++ -opengl es2 -nomake examples -nomake tests -v

(previously built ICU libraries reside in /opt/icu/lib).

QT was then compiled using make && make install, as usual.

Then I configured my QT Creator IDE on development machine (Ubuntu 12.04 LTS 32-bit) for compiling applications against the new QT version, just cross-compiled, using the same toolchain provided by TI (SDK 6.00.00).

Everything is fine: my console-based "hello, world" application is compiled and then I am able to deploy it to the device (setting all the requested environment variables required for letting QT find its own libraries).

BUT here comes the problem:

the application always exits with code 1 and produces no output.

If I strace my application, running strace -o trace.log ./TestConsole then it produces the output that you can find here.

In other words it seems that somebody is calling exit_group(1) just after having loaded libicudata.so.52.

But who is calling it? and why?

Please consider that if I cross-build QT without ICU support, then I can compile and run applications against it... So I think it is something ICU-related... Any ideas about that?

最满意答案

我发现了问题:问题与ICU有关。

我注意到,即使在目标平台上执行工具/ opt / icu / bin / icuinfo也会在启动时退出1(您可以在此处找到完整的strace日志)。

这里发布了一个与ICU相关的新问题,因此我认为这个问题可以解决。

I found the problem: the problem is ICU-related.

I noticed that even the execution of the tool /opt/icu/bin/icuinfo on the target platform exits with 1 at startup (you can find the full strace log here).

A new ICU-related question has been published here, so I think that this question can be closed.

更多推荐

本文发布于:2023-08-05 07:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428899.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:都以   应用程序   代码   ICU   Qt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!