Building qtwebengine fails in Docker container
Description
Environment
Activity

Stephane Desneux March 28, 2018 at 1:07 PM
Thanks! Closing...

christian.gromm March 28, 2018 at 12:48 PM
It works for me with the "external volume" approach. You can close this SPEC. Thanks.

Stephane Desneux March 28, 2018 at 12:10 PM
Any update ? Should I close this one ?

Stephane Desneux March 14, 2018 at 3:21 PM
Cool: the bug is now easy to reproduce
Definitely, this is an aufs issue: search for '242' here: http://aufs.sourceforge.net/aufs3/man.html
I have 3 workarounds to propose:
Use smaller paths: the filename which is too long contains the build folder name. So if you use a smaller build dir, it may work (ex: use /xdt/build instead of /home/devel/agl-builds).
Pros: nothing to do, no container to drop, no docker config to touch
Cons: just a quick workaroundUse external volume: if you created the container using the create_container script provided as a contrib script in docker-worker-generator, you should have /xdt mounted as a volume, pointing to a host folder (possibly on a fast device as SSD with ext4, far more efficient that aufs on a HDD). The host filesystem will be ext4, xfs, btrfs depending on your host conifig and it won't suffer the limit of 242 characters for filenames. If you are not already with a volume for /xdt, you'll have to create a new docker container as you can't 'hotplug' volumes on an existing container. Then use /xdt/build (or $XDT_BUILD, see /etc/xdtrc) for building.
Pros: easy if /xdt is already an external volume.
Cons: container may have to be deleted and re-createdUse BTRFS for /var/lib/docker: this is another solution to get rid of aufs...
Pros: container filesystem accessible even if container stopped/crashed
Cons: docker config to redo from scratch (drop all containers and images!)
The best solution is to combine everything: use btrfs for /var/lib/docker on the host + run a container where /xdt is an external volume on SSD or even RAM (tmpfs) + build inside /xdt (smaller paths)

christian.gromm March 14, 2018 at 12:52 PM
The touch command fails
touch _third_party_WebKit_Source_bindings_modules_v8_bindings_modules_v8_generated_init_partialhome_devel_agl-builds_master_m3_build_tmp_work_aarch64-agl-linux_qtwebengine_5.9.4_gitAUTOINC_a86ac3eb0a_b7a9c9bf5b-r0_build_src_toolchain_target_rule.rsp
touch: cannot touch '_third_party_WebKit_Source_bindings_modules_v8_bindings_modules_v8_generated_init_partialhome_devel_agl-builds_master_m3_build_tmp_work_aarch64-agl-linux_qtwebengine_5.9.4_gitAUTOINC_a86ac3eb0a_b7a9c9bf5b-r0_build_src_toolchain_target_rule.rsp': File name too long
$docker --version
Docker version 1.13.1, build 092cba3
$ docker info
Containers: 3
Running: 1
Paused: 0
Stopped: 2
Images: 4
Server Version: 1.13.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 16
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: N/A (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-116-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 15.66 GiB
Name: kar-sv-agl01.mchp-main.com
ID: 6ZOM:DQYQ:4OKH:3Q7E:IAK2:UXAR:JG7I:LQLF:T4DQ:MXNI:4BR4:M7ZG
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Details
Details
Assignee

Reporter

Current master fails when building qtwebengine inside the docker container
(docker.automotivelinux.org/agl/worker-generic:4.99.2) with following error message:
ninja: error: WriteFile(_third_party_WebKit_Source_bindings_modules_v8_bindings_modules_v8_generated_init_partialhome_devel_agl-builds_master_m3_build_tmp_work_aarch64-agl-linux_qtwebengine_5.9.4_gitAUTOINC_a86ac3eb0a_b7a9c9bf5b-r0_build_src_toolchain_target_rule.rsp): Unable to create file. File name too long
ninja: build stopped: .
Makefile.gn_run:321: recipe for target 'run_ninja' failed
make[3]: *** [run_ninja] Error 1
make[3]: Leaving directory '/home/devel/agl-builds/master/m3_build/tmp/work/aarch64-agl-linux/qtwebengine/5.9.4+gitAUTOINC+a86ac3eb0a_b7a9c9bf5b-r0/build/src/core'
Makefile:80: recipe for target 'sub-gn_run-pro-make_first' failed
make[2]: *** [sub-gn_run-pro-make_first] Error 2
make[2]: Leaving directory '/home/devel/agl-builds/master/m3_build/tmp/work/aarch64-agl-linux/qtwebengine/5.9.4+gitAUTOINC+a86ac3eb0a_b7a9c9bf5b-r0/build/src/core'
Makefile:78: recipe for target 'sub-core-make_first' failed
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory '/home/devel/agl-builds/master/m3_build/tmp/work/aarch64-agl-linux/qtwebengine/5.9.4+gitAUTOINC+a86ac3eb0a_b7a9c9bf5b-r0/build/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2
ERROR: oe_runmake failed
WARNING: /home/devel/agl-builds/master/m3_build/tmp/work/aarch64-agl-linux/qtwebengine/5.9.4+gitAUTOINC+a86ac3eb0a_b7a9c9bf5b-r0/temp/run.do_compile.19012:1 exit 1 from 'exit 1'
ERROR: Function failed: do_compile (log file is located at /home/devel/agl-builds/master/m3_build/tmp/work/aarch64-agl-linux/qtwebengine/5.9.4+gitAUTOINC+a86ac3eb0a_b7a9c9bf5b-r0/temp/log.do_compile.19012)
ERROR: Task (/home/devel/agl-builds/master/meta-qt5/recipes-qt/qt5/qtwebengine_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1966 tasks of which 410 didn't need to be rerun and 1 failed.
Summary: 1 task failed: