New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Linux RISC-V 64 build to CI #31398
Conversation
This task requires support from the linker. |
d899820
to
1bd3b88
Compare
See #40199 |
It is almost ready: #40141 |
Looks like the compiler-rt library is missing. |
clang-16 is not required, actually clang-14 is enough. |
This is an automated comment for commit 98da25f with description of existing statuses. It's updated for the latest CI running
|
Wow, it works! |
Interesting, it does not work for me. Maybe you have real RISC-V machine? I got SIGSEGV with qemu (this is docker image that runs qemu inside): $ docker run -p 2222 --name riscv --rm -it davidburela/riscv-emulator
$ apt update
$ apt install curl
$ ./clickhouse local
[ 361.073643] clickhouse[3167]: unhandled signal 11 code 0x1 at 0xffffffff80016180 in clickhouse[10000+137af000]
[ 361.076816] CPU: 0 PID: 3167 Comm: clickhouse Not tainted 6.1.0-7-riscv64 #1 Debian 6.1.20-1
[ 361.078220] Hardware name: riscv-virtio,qemu (DT)
[ 361.079163] epc : 000000000d87f8b6 ra : 000000000d87f878 sp : 00ffffffce43e820
[ 361.080891] gp : 000000001399d888 tp : 00ffffffbea3c780 t0 : 00ffffff800161c0
[ 361.082941] t1 : 00000000057db19c t2 : 0000000000000000 s0 : 00000000000000f0
[ 361.085026] s1 : 00ffffff60000000 a0 : ffffffff80016180 a1 : 0000000000030000
[ 361.086458] a2 : 0000000000000000 a3 : 00ffffff60010000 a4 : 00ffffff60010000
[ 361.088158] a5 : 00ffffff60010000 a6 : 0000000000000000 a7 : 00ffffff60000000
[ 361.089689] s2 : 00ffffffbea3c980 s3 : 000000000e073080 s4 : 00ffffffce43ec68
[ 361.091433] s5 : 00ffffffbea3c790 s6 : 000000000000ffff s7 : 00ffffff00000000
[ 361.092908] s8 : 00fffffff6363820 s9 : 00fffffff6363838 s10: 00aaaaaac82bfa4c
[ 361.094654] s11: 00aaaaaac82bf9c0 t3 : 00ffffffbeb2d7be t4 : 0000000000079594
[ 361.095809] t5 : 00ffffffce43c650 t6 : 0000000002f75a7c
[ 361.096791] status: 8000000200006020 badaddr: ffffffff80016180 cause: 000000000000000d
Segmentation fault AFAIR the error is in jemalloc, but I haven't checked this time. |
We've tested it on a real RISC-V machine, including ClickBench run. I've also tested on QEMU, and found a couple of bugs (most likely in QEMU). |
Check this image instead: Or you can use chroot instead of docker - just place a few .so, mount /proc, /dev, and /tmp, and put qemu-riscv64-static there. |
Just in case - let's try to link it with Musl, maybe you can help... |
This is different, it is for riscv64 machine, not for amd64
|
@azat you need to register qemu-riscv64-static in the binfmt-misc kernel module. |
@alexey-milovidov I don't get how this will help? So I used docker container, that has everything inside it, and run qemu-riscv64-system Can you share how did you run binaries for riscv64 architecture? |
|
Nice, thank you! Forgot that all libraries are there already. But one more thing is required actually (to use binaries from CI artifacts) - #52138 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add experimental ClickHouse builds for Linux RISC-V 64 to CI.