【问题标题】:RCC: Error in 'resource.qrc': Cannot find file '*.png'RCC:“resource.qrc”中的错误:找不到文件“*.png”
【发布时间】:2018-12-14 04:26:41
【问题描述】:

我在 docker 容器 (archlinux) 上使用 qt 的 rcc 编译资源文件时遇到问题。我正在尝试交叉编译 mingw --host 机器

$ cat resource.qrc
<!DOCTYPE RCC><RCC version="1.0">
    <qresource >
        <file>images/small.png</file>
    </qresource>
</RCC>
$ ls -lR
.:
total 8
drwxr-xr-x 2 devel devel 4096 Jul  5 15:32 images
-rw-r--r-- 1 devel devel  106 Jul  5 15:35 resource.qrc

./images:
total 20
-rw-r--r-- 1 devel devel 15511 Apr 28  2010 small.png
$ rcc resource.qrc 
RCC: Error in 'resource.qrc': Cannot find file 'images/small.png'

相同的命令在我的 OSX 主机上运行良好。 (((

任何帮助将不胜感激

【问题讨论】:

    标签: qt docker makefile qt5 mingw-w64


    【解决方案1】:

    我遇到过类似的问题;事实证明,这是几个因素的组合。 Qt 5.10+ 想要使用statx 系统调用,但是:

    • 18.04 版之前的 Docker 不将此系统调用包含在 libseccomp 的系统调用白名单中(因此您必须提供自己的 seccomp 配置)
    • 即使使用 Docker 18.04 或更高版本,您仍然需要最新版本的 libseccomp(2.3.3 或更高版本,例如当前的 Debian 或 Ubuntu 版本未附带),因为旧版本不理解 statx 系统调用条目在白名单中。

    如果升级这些组件中的任何一个不是一个选项,如果您信任 Docker 容器内的构建环境,您可以尝试以下解决方法:将参数 --security-opt seccomp:unconfined 添加到您的 docker 命令行。

    进一步阅读的资源:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-01
      • 2018-09-11
      • 2016-02-24
      • 2015-12-11
      • 2014-11-15
      • 2014-03-30
      • 2012-05-13
      • 1970-01-01
      相关资源
      最近更新 更多