RCC:'resource.qrc' 中的错误:找不到文件“*.png”
RCC: Error in 'resource.qrc': Cannot find file '*.png'
我在 docker 容器 (archlinux) 上使用 qt 的 rcc 编译资源文件时遇到问题。我正在尝试为 mingw --host machine
交叉编译
$ 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 5.10+ 想要使用 statx
系统调用,但是:
- Docker 18.04 之前的版本不将此系统调用包含在其 libseccomp 的系统调用白名单中(因此您必须提供自己的 seccomp 配置)
- 即使使用 Docker 18.04 或更新版本,您仍然需要最新版本的 libseccomp(2.3.3 或更新版本,例如当前的 Debian 或 Ubuntu 版本未附带)因为旧版本版本不理解白名单中的
statx
系统调用条目。
如果无法升级这些组件中的任何一个,并且您信任 Docker 容器内的构建环境,则可以尝试以下解决方法:将参数 --security-opt seccomp:unconfined
添加到 docker
命令行。
进一步阅读的资源:
- 相应的 Qt 错误报告:https://bugreports.qt.io/browse/QTBUG-66930
- 将
statx
系统调用添加到 Docker 白名单的拉取请求,包括提及所需的 seccomp 版本:https://github.com/moby/moby/pull/36417
我在 docker 容器 (archlinux) 上使用 qt 的 rcc 编译资源文件时遇到问题。我正在尝试为 mingw --host machine
交叉编译$ 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 5.10+ 想要使用 statx
系统调用,但是:
- Docker 18.04 之前的版本不将此系统调用包含在其 libseccomp 的系统调用白名单中(因此您必须提供自己的 seccomp 配置)
- 即使使用 Docker 18.04 或更新版本,您仍然需要最新版本的 libseccomp(2.3.3 或更新版本,例如当前的 Debian 或 Ubuntu 版本未附带)因为旧版本版本不理解白名单中的
statx
系统调用条目。
如果无法升级这些组件中的任何一个,并且您信任 Docker 容器内的构建环境,则可以尝试以下解决方法:将参数 --security-opt seccomp:unconfined
添加到 docker
命令行。
进一步阅读的资源:
- 相应的 Qt 错误报告:https://bugreports.qt.io/browse/QTBUG-66930
- 将
statx
系统调用添加到 Docker 白名单的拉取请求,包括提及所需的 seccomp 版本:https://github.com/moby/moby/pull/36417