Skip to content
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

.github: cross-compile powerpc64 Linux asset #799

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Aug 16, 2023

Continue the recent zig cc work, such that the next configlet release will have two new release assets:

configlet_4.0.0-beta.n_linux_powerpc64.tar.gz
configlet_4.0.0-beta.n_linux_powerpc64.tar.gz.minisig

where the archive contains the executable:

$ file ./configlet
./configlet: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, stripped

The powerpc64-linux-musl target will have Tier 1 Zig support.

Note that powerpc64 is big endian.

Refs: #24
Closes: #810


To-do:

  • Fix configlet lint
  • Fix configlet --help
  • Fix configlet completion
  • Re-check configlet create|fmt|generate|info|sync|uuid|--version

@ee7
Copy link
Member Author

ee7 commented Aug 17, 2023

The newly built executable doesn't pass my local testing (note #790 and #791).

When running with qemu, some configlet commands produce an error. I would guess that these errors would also occur if the executable was run natively.

I'm not surprised by the errors. It looks like some of our dependencies assume that the platform is little endian, but powerpc64 is big endian.

I'll set this PR as a draft for now.

$ qemu-ppc64-static ./configlet lint -t /path/to/exercism-tracks/nim                                                                                                                                                      
[...]

The value of `online_editor.indent_style` is `space`, but it must be one of {"space", "tab"}:
/path/to/exercism-tracks/nim/config.json

A `files.solution` value is `%{snake_slug}.nim`, which is not a valid file pattern. Allowed placeholders are: %{kebab_slug}, %{snake_slug}, %{pascal_slug}, and %{camel_slug}:
/path/to/exercism-tracks/nim/config.json
[...]
$ qemu-ppc64-static ./configlet completion -s bash
Error: Invalid buffer, unable to uncompress
supersnappy.nim(112)     uncompress
Error: unhandled exception: Invalid buffer, unable to uncompress [SnappyError]

@ee7 ee7 marked this pull request as draft August 17, 2023 09:26
@ErikSchierboom
Copy link
Member

I'm not surprised by the errors. It looks like some of our dependencies assume that the platform is little endian, but powerpc64 is big endian.

Ah, the joys of endianness

@ee7 ee7 mentioned this pull request Aug 17, 2023
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build: consider adding powerpc64 Linux
2 participants