Linuxbrew port to arm64, some test results

(Edward Vielmetti) #1

I took a “top 100” list of linuxbrew commands, and attempted to install them on arm64. Here’s a summary of findings.

66 attempts fail with a READ THIS re troubleshooting.

48 of those installs failed with an error in openssl, where the system tries instead to build an linux-x86_64 binary instead of an arm64 binary.

8 attempts fail on go, where the installer attempts to download an x86 binary to do a bootstrap build.

In the other 10 cases I didn’t dig deep into what went wrong, but in two of those configure made a guess error.

My first recommendation in making progress with this port is to sort out openssl and go.

[edited to fix typo]

(Shaun Jackman) #2

I suspect you mean openssl rather than openssh. Thanks for this work!

(Edward Vielmetti) #3

Exactly so - I fixed the original.

(Claudia) #4

Yeah, thanks @vielmetti :+1:

(Edward Vielmetti) #5

Some additional results. I have a loop going to build everything I possibly can. So far it has built 430 packages, and failed to build 721. Of those 721, 419 are openssl failures, 78 are go failures, and 61 are configure guess failures.

Builds are way slower than they should be. The build machine has 64 cores and 128G of memory, but it’s got a long-term load average of less than 2 because really nothing is parallel except the actual builds (it’s not possible to do multiple simultaneous installs).

(Steve Peters) #6

Could you install into multiple docker containers in parallel? It would be a little bit more work to set up, but you might get some extra speed-up that way.

(Shaun Jackman) #7

The compilations are built in parallel with make -j, so you should be seeing higher parallelism. What’s the output of brew config | grep CPU ?

(Edward Vielmetti) #8

Build complete. Some stats.

1336 builds reported success (brew list | wc -l).
92292 lines in log file.
3237 builds failed with a pointer to the troubleshooting file.
1889 builds failed on target build_crypto (openssl)
298 failures for libpng
288 failures for golang
262 configure: error: cannot guess build type; you must specify one

I’d like to get these three builds fixed first for arm64 (openssl, libpng, golang) and then rerun the build all loop. It should go a lot faster too because the failures are very slow.

(Edward Vielmetti) #9

Brew config output doesn’t include a CPU line.

HEAD: 1920eecb7104301647af0bcf548144f2d85f4e27
Last commit: 5 days ago
Core tap ORIGIN:
Core tap HEAD: f286f4890032d7a8cbbf74e8e7dce72bf3814351
Core tap last commit: 2 days ago
HOMEBREW_PREFIX: /home/emv/.linuxbrew
HOMEBREW_REPOSITORY: /home/emv/.linuxbrew/Homebrew
HOMEBREW_CELLAR: /home/emv/.linuxbrew/Cellar
HOMEBREW_CACHE: /home/emv/.cache/Homebrew
HOMEBREW_LOGS: /home/emv/.cache/Homebrew/Logs
Homebrew Ruby: 2.5.1 => /usr/bin/ruby2.5
Clang: N/A
Git: 2.17.1 => /usr/bin/git
Curl: 7.58.0 => /usr/bin/curl
Kernel: Linux 4.15.0-34-generic aarch64 GNU/Linux
OS: Ubuntu 18.04.1 LTS (bionic)
Host glibc: 2.27
/usr/bin/gcc: 7.3.0
glibc: N/A
gcc: 5.5.0_4
xorg: N/A

(Shaun Jackman) #10

Please report the output of brew irb <<<'RUBY_PLATFORM'
It should be a one-line fix. Would you like to submit a PR to fix it?
See Hardware::CPU.type at

(Edward Vielmetti) #11
$ brew irb <<<'RUBY_PLATFORM'
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
Switch to inspect mode.

(Shaun Jackman) #12

Great. Would you like to open a PR to fix it?