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

Can not use on Linux Arm #137

Closed
Tracked by #152 ...
smcclure15 opened this issue Aug 8, 2024 · 16 comments · Fixed by #140
Closed
Tracked by #152 ...

Can not use on Linux Arm #137

smcclure15 opened this issue Aug 8, 2024 · 16 comments · Fixed by #140
Labels
enhancement New feature or request feature request A new feature description

Comments

@smcclure15
Copy link

What was wrong?

$ curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C .
$ ./coveralls --help
bash: ./coveralls: cannot execute binary file: Exec format error

I think this is only for x86 arch, whereas I am on an Arm arch:

$ arch
aarch64
@smcclure15 smcclure15 added the bug Something isn't working label Aug 8, 2024
@afinetooth
Copy link
Member

@smcclure15 checking it out...

@afinetooth
Copy link
Member

@smcclure15 what flavor of Linux are you using?

@smcclure15
Copy link
Author

ubuntu 22.04

@afinetooth
Copy link
Member

@smcclure15 OK, a couple of options / next steps here:

  1. I'm seeing how quickly we can cut a new release of coverage-reporter (coveralls-linux) cross-compiled for x86_64 and aarch64. We should probably be doing so in the first place.
  2. I'm drafting instructions for building coverage-reporter on aarch64 that you could use in the meantime, if you like. We have a number of customers who build coverage-reporter themselves, for reasons of security, efficiency, or what in this case would be compatibility.

Question:

  • Are you interested in (2)? Or would you rather wait for (1)? Or both?

@smcclure15
Copy link
Author

(1) is what I'm after.
For context, I'm currently using gcovr to go from .gcda directly to coveralls json format, but I know we'll soon have other tools that will produce lcov format, so I'll have to transform that to coveralls json anyway, so I was seeing what this tool could do for me.

@afinetooth
Copy link
Member

afinetooth commented Aug 8, 2024

@smcclure15 OK, great, thanks.

We are hopeful that (1) will be available tomorrow. I'll update you via normal channels.

Note: I will post (2) here in a separate comment for anyone else tuning in who wants to build coverage-reporter themselves.

For context, I'm currently using gcovr to go from .gcda directly to coveralls json format, but I know we'll soon have other tools that will produce lcov format, so I'll have to transform that to coveralls json anyway, so I was seeing what this tool could do for me.

Got it. Thanks for the context.

All Coveralls integrations (like gcovr, which we refer to as a language integration) do the same basic thing, minimally, which is to convert a coverage report found in the local CI environment from its native format into Coveralls JSON.

We recommend our official integrations because we can support your entire toolchain, and they will convert from many different native formats into Coveralls JSON for you. LCOV, being perhaps the most ubiquitously available native format, is at the top of our list of supported coverage report formats.

I would definitely let some integration---any integration---perform that conversion for you, and coverage-reporter is your best choice of official integration if you aren't using GitHub Actions or CircleCI for CI. Although, even if you are using either of those, coverage-reporter will give you more control over the process.

@afinetooth
Copy link
Member

Duplicated in this issue: github-action #218

@smcclure15
Copy link
Author

Is this resolved or not?

I can repro the original:

$ curl -L https://coveralls.io/coveralls-linux.tar.gz | tar -xz -C .
$ ./coveralls --help
bash: ./coveralls: cannot execute binary file: Exec format error

And peeking into what merged, I tried the -aarch64 url, to no avail:

$ curl -L https://coveralls.io/coveralls-linux-aarch64.tar.gz | tar -xz -C .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2946    0  2946    0     0  25130      0 --:--:-- --:--:-- --:--:-- 24966

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

@afinetooth
Copy link
Member

afinetooth commented Sep 4, 2024

Hi @smcclure15. Not yet. We are still testing and hope to complete this week. We've run into multiple issues cross-compiling linux binaries for aarch64 when testing on different Linux varieties.

Which reminds me to ask: You are using Ubuntu 22.04, right? Do you think you will need aarch64 binaries for Debian, or Centos, anytime soon? Or will Ubuntu serve your needs for at least the next 2-4 weeks?

Being Rubyists, our coverage-reporter was written in Crystal, which is the reason for the relative lack of support for cross-compilation, primarily in libraries for static linking across platforms. Our long-term plan is to migrate coverage-reporter to go, or similar, but for now, we think we've found our solution to cross-compile and test for at least Ubuntu (aarch64).

@smcclure15
Copy link
Author

Can this issue remain Open until it is resolved?

And yes, ubuntu should suffice for my needs.

@afinetooth
Copy link
Member

Totally. I have re-opened it. (Closing it was a mistake---I don't remember doing it or know why I would have, but I do see it in the history so my bad!)

And yes, ubuntu should suffice for my needs.

Great. Thanks.

@afinetooth
Copy link
Member

afinetooth commented Oct 4, 2024

@smcclure15

Wanted to let you know that we released v0.6.15 of coverage-reporter, which includes a statically-compiled binary for Linux (aarch64).

Download & install the aarch64 version like this:

curl -L https://coveralls.io/coveralls-linux-aarch64.tar.gz | tar -xz -C /usr/local/bin

Usage:

No differences in usage beyond downloading the correct tar.gz archive:

  1. Download & install the correct archive: Follow the same install instructions for Linux that you'll find in the coverage-reporter README, just use the appropriate filename, which you can find in these release assets.
  2. Use as normal after installation: All .tar.gz archives in all releases, regardless of filename, will un-tar as a binary named coveralls so the binary is ready receive the commands covered in our standard usage instructions.

Other notes:

  • Testing of new multi-arch binares: Each newly-created RC binary is tested right after it's created in CI (the aarch64 version is tested in QEMU) against all supported coverage report formats.

@afinetooth afinetooth added enhancement New feature or request feature request A new feature description and removed bug Something isn't working labels Oct 7, 2024
@afinetooth
Copy link
Member

Closing this. Please open a new issue if your are looking for help with the Linux (aarch64)-compatible version of coverage-reporter (v0.6.15+).

@afinetooth
Copy link
Member

afinetooth commented Oct 24, 2024

For users of coverage-reporter through the Coveralls GitHub Action:

Per this update on coverallsapp/github-action #218, the v2.3.4 release of our github-action now supports the coverage-reporter-platform input option, with values of [x86_64 | aarch64 (or arm64)].

You can use the latest version of the github-action (in this case v2.3.4) simply by continuing to use coverallsapp/github-action@v2 in your workflows.

@afinetooth
Copy link
Member

@smcclure15 ^^ in case your other users need arm64 support, but are using the Coveralls GitHub Action.

@afinetooth
Copy link
Member

For users of coverage-reporter through the Coveralls Orb for CircleCI:

As of its v2.2.5 release, our orb supports the coverage_reporter_platform input parameter, with values of [x86_64 | aarch64 (or arm64)].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request A new feature description
Projects
None yet
2 participants