Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,19 @@ the CI locally you may need to reduce that entropy by running:
sudo sysctl -w vm.mmap_rnd_bits=28
```

It is recommended to run the ci system in a clean env. To run the test stage
with a specific configuration,
To run a test that requires emulating a CPU architecture different from the
host, we may rely on the container environment recognizing foreign executables
and automatically running them using `qemu`. The following sets us up to do so
(also works for `podman`):

```
docker run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes
```
Comment on lines +31 to +38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe unrelated, because I think it was working at some point, but using podman on various distros (Debian/Ubuntu/OpenSuse) to try to run the s390x task fails with a segfault in the depends compilation:

...
[58/817] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qfsfileengine_iterator.cpp.o
[59/817] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qloggingcategory.cpp.o
FAILED: qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qloggingcategory.cpp.o 
/usr/bin/g++ -DHAVE_CONFIG_H -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_DISABLE_JIT -DQT_BOOTSTRAPPED -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_AS_CONST -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=7 -DQT_VERSION_PATCH=3 -DQT_VERSION_STR=\"6.7.3\" -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/Core_autogen/include -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/include -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/include/QtCore -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/global -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/kernel -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/../3rdparty/tinycbor/src -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/include/QtCore/6.7.3 -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/include/QtCore/6.7.3/QtCore -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/../3rdparty/double-conversion/double-conversion -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/../3rdparty/double-conversion -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/.rcc -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/mkspecs/linux-g++ -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/include/QtZlib -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/3rdparty/zlib -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/3rdparty/pcre2/src -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/tools/bootstrap/../../corelib/global -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/tools/bootstrap/.. -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/tools/bootstrap/../../3rdparty/tinycbor/src -I/ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/tools/bootstrap/../../3rdparty/pcre2/src -DNDEBUG -O2 -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -ffunction-sections -fdata-sections -Wsuggest-override -MD -MT qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qloggingcategory.cpp.o -MF qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qloggingcategory.cpp.o.d -o qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qloggingcategory.cpp.o -c /ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/qtbase/src/corelib/io/qloggingcategory.cpp
Segmentation fault (core dumped)
[60/817] Building CXX object qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/io/qiodevice.cpp.o
ninja: build stopped: subcommand failed.
make: *** [funcs.mk:343: /ci_container_base/depends/work/build/s390x-linux-gnu/native_qt/6.7.3-3eadf23fa87/./.stamp_built] Error 1
make: Leaving directory '/ci_container_base/depends'
Command '['./ci/test/02_run_container.sh']' returned non-zero exit status 2.
Error: Process completed with exit code 1.

On Fedora, or RHEL-based VMs with podman and qemu-user-s390x it seems to work. A bit odd and unrelated to the code changes here, but I wanted to drop the note somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've seen similar segfaults when building for s390x on NixOS. Don't know if some distros apply custom patches or use other versions, or if they set up the environment differently in some other way.


It is recommended to run the CI system in a clean environment. The `env -i`
command below ensures that *only* specified environment variables are propagated
into the local CI.
To run the test stage with a specific configuration:

```
env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, this was half-fixed in commit fd813bf for env vars that have nothing to do with the CI (like DEBUGINFOD_URLS). However, it is still needed for env vars that have a meaning outside and inside CI (like HOST)

However, your HOST is not set, so the comment "Should help in cases such as: #31176 (comment)" may not be accurate here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Pushed new version which is hopefully slightly more accurate.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reminds me that the bash -c isn't needed here, now that env is used. Feel free to remove, or ignore the unrelated nit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reminds me that the bash -c isn't needed here, now that env is used. Feel free to remove, or ignore the unrelated nit.

Added a commit for this to #33903, as that CI pull didn't have any review yet anyway.

Expand Down
Loading