otel-cli icon indicating copy to clipboard operation
otel-cli copied to clipboard

feat: build artifacts for linux/riscv64

Open macabu opened this issue 6 months ago • 0 comments

Adds binaries and OCI images for linux/riscv64.

I also updated the dev Dockerfile base image to an Alpine based one, since the Debian variant doesn't support riscv64 yet (I can undo that since it is only for development).

The binary builds fine for linux/riscv64, and I ran some basic tests using the Examples section in the README:

user@bananapif3:~/Projects/otel-cli$ file otel-cli
otel-cli: ELF 64-bit LSB executable, UCB RISC-V, double-float ABI, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, Go BuildID=qDSUKfORsyrmBCW3XEtB/qCwmlXpQTQzDKGxF6-tw/zFSA2FhsuaIA_9Rongb9/m0duPj5m4mBtPdQ_0L1p, with debug_info, not stripped

user@bananapif3:~/Projects/otel-cli$ ldd otel-cli
	linux-vdso.so.1 (0x0000003fad164000)
	libc.so.6 => /lib/riscv64-linux-gnu/libc.so.6 (0x0000003facff0000)
	/lib/ld-linux-riscv64-lp64d.so.1 (0x0000003fad166000)
	
user@bananapif3:~/Projects/otel-cli$ ./otel-cli server tui
Trace ID                         | Span ID          | Parent           | Name                             | Kind   | Start | End    | Elapsed
                                 | bab93bed0fbf60aa | b7ad6b7169203331 | todo-generate-default-span-names | client | 0     | 122877 | 122877
b5788a359ecd584d2e129464e9429d9c | 4a4b0482ef8d5ffc |                  | curl google                      | client | 0     | 370    | 370

Similarly the Docker image also builds fine:

user@bananapif3:~/Projects/otel-cli$ docker image inspect otel-cli:test | grep Arch
        "Architecture": "riscv64",

macabu avatar Sep 01 '24 09:09 macabu