Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RCC: Error in 'resource.qrc': Cannot find file '*.png'

I'm having trouble compiling a resource file using qt's rcc on a docker container (archlinux). I'm trying to cross compile for a 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'

the same command works fine on my OSX host machine. ((

Any help would be appreciated

like image 405
MUH Mobile Inc. Avatar asked Jul 05 '18 15:07

MUH Mobile Inc.


1 Answers

I had encountered a similar issue; It turns out that this is a combination of several factors. Qt 5.10+ wants to use the statx syscall, however:

  • Docker before version 18.04 does not include this syscall in its syscall whitelist for libseccomp (so you would have to supply your own seccomp configuration)
  • Even when using Docker 18.04 or newer, you still need a recent version of libseccomp (2.3.3 or newer, which is e.g. not shipped with current Debian or Ubuntu versions) because older versions do not understand the statx syscall entry in the whitelist.

If upgrading either of those components is not an option, you can try the following workaround if you trust the build environment inside your Docker container: Add the parameter --security-opt seccomp:unconfined to your docker command line.

Resources for further reading:

  • Corresponding Qt bug report: https://bugreports.qt.io/browse/QTBUG-66930
  • Pull request that adds the statx syscall to the Docker whitelist, including the mention of the required seccomp version: https://github.com/moby/moby/pull/36417
like image 152
j_schultz Avatar answered Sep 18 '22 06:09

j_schultz