---
stage: Systems
group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

# Developing for s390x architecture

## Endianness

[Linux on IBM Z](https://en.wikipedia.org/wiki/Linux_on_IBM_Z) runs on the s390x architecture. Unlike x86,
the s390x architecture is [big-endian](https://en.wikipedia.org/wiki/Endianness). Many open source projects only
test against little-endian systems, so there may be endian-related bugs
lurking. For example, in the Ruby implementation of Protocol Buffers,
we [fixed a handful of big-endian bugs](https://github.com/protocolbuffers/protobuf/issues/9141#issuecomment-962698503).

## VM provisioning

There are several ways to develop for s390x. You can use:

- [A LinuxONE virtual server](https://community.ibm.com/zsystems/l1cc/).
- [QEMU to emulate s390x](https://qemu-project.gitlab.io/qemu/system/target-s390x.html).

  Use the following commands to spin up an emulated s390x virtual machine with Docker:

  ```shell
  docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  docker run --rm -it s390x/ubuntu bash
  ```

Note that the QEMU virtual machine is usually slower than a LinuxONE
machine.

## Bazel

[Bazel](https://bazel.build/) is needed by a number of Google projects,
such as Protocol Buffers. When compiling from source, you might run [into these fatal compiler warnings](https://github.com/protocolbuffers/protobuf/issues/9141#issuecomment-955997742).
There is a [workaround to disable those warnings](https://github.com/bazelbuild/bazel/issues/13597#issuecomment-930606195).
In addition, IBM [posted these instructions](https://github.com/linux-on-ibm-z/docs/wiki/Building-Bazel).

## Omnibus build image

To build Omnibus GitLab for s390x, you can use [this Dockerfile template](https://gitlab.com/gitlab-org/gitlab-omnibus-builder/-/blob/master/docker/Dockerfile_debian_10_s390x.erb). Generate the Dockerfile with:

```shell
./docker/scripts/generate-dockerfile docker/Dockerfile_debian_10_s390x.erb
```
