cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.92k stars 3.78k forks source link

build: add support for s390x #55307

Open ruixin-bao opened 3 years ago

ruixin-bao commented 3 years ago

Hello,

I am wondering if is it possible to add support for CI, binary release and Docker image for s390x? I have compiled and tested the recent version (20.1.5) of CockroachDB on s390x and haven't faced too many issues with the test cases.

For CI, let me know if I can provide any assistance. Hardware/VM access can be provided if needed. TeamCity should work on s390x already.

For binary support, on my local machine, I was able to follow the similar steps from https://github.com/cockroachdb/cockroach/pull/24354 and with one modification to the vendor file to cross compile s390x binary on an intel machine using crosstool-ng toolchain. For the vendor file change, it is to change github.com/ianlantaylor/cgosymbolizere/config.h to recognize s390x architecture. There is already a PR related to this merged to the original repo at https://github.com/ianlancetaylor/cgosymbolizer/pull/9, so it should be safe to open a PR to cockroach/vendor repository as well. I then copied the cross-compiled binary onto a s390x machine and tested it using this example. I can open a PR for binary support afterwards if you are ok with it.

For Docker image, once there is binary support, I think it should be straightforward to follow the steps here to build the docker container?

Any help or advice would be appreciated, thank you.

Jira issue: CRDB-3678

blathers-crl[bot] commented 3 years ago

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

knz commented 3 years ago

@ruixin-bao you can open the PR and if you say that it builds we can probably accept it. However be prepared that it's likely to be at the same level of our ARM support: we'll know about it, it will be in the repository, but we won't (yet) recommend anyone to use it nor offer official support for it.

ruixin-bao commented 3 years ago

@knz, thank you for the information and quick reply.

you can open the PR and if you say that it builds we can probably accept it.

thanks, I will prep the code and raise a PR soon.

However be prepared that it's likely to be at the same level of our ARM support: we'll know about it, it will be in the repository, but we won't (yet) recommend anyone to use it nor offer official support for it.

Understood, thank you.

srajmane commented 1 year ago

This issue is handled through this PR: https://github.com/cockroachdb/cockroach/pull/55617 and it can be closed.