Skip to content

Build Erlang from source on AArch64 (ARMv8)#14

Merged
wohali merged 8 commits intoapache:masterfrom
lag-linaro:arm64-support-erlang
Dec 21, 2018
Merged

Build Erlang from source on AArch64 (ARMv8)#14
wohali merged 8 commits intoapache:masterfrom
lag-linaro:arm64-support-erlang

Conversation

@lag-linaro
Copy link
Contributor

Erlang Solutions do not provide packages for ARM, so we build/install it from scratch.

Copy link
Member

@wohali wohali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there @lag-linaro , this is starting to look really good, and sets the precedent for us to be able to add additional architectures to the CI infrastructure.

With my suggested changes I am +1 on this :)

Thank you again for sticking with this issue so doggedly! 🐕

@lag-linaro lag-linaro force-pushed the arm64-support-erlang branch 5 times, most recently from b1c65e1 to a00c549 Compare October 29, 2018 09:38
@wohali
Copy link
Member

wohali commented Nov 26, 2018

@lag-linaro I spent most of today on this - the RPi3 wasn't useful as it still runs a 32-bit build. Finally managed to get a Docker QEMU aarch64 shell set up. By that point I was out of patience and time.

I should have time to come back to this tomorrow.

Going to be painful figuring out how to build the docker cli tool with manifest support so I can cross-build and push these images (ASF policy does not allow us to have CI infrastructure push Docker binaries at this time)

@lag-linaro
Copy link
Contributor Author

Thanks for working on this @wohali.

Which version of the RPi3 do you have? I just installed Debian Buster (64bit userspace) on my RPi3 B.

It was as easy as dding the image to the SD card.

The RPi3 B+ (which I guess you have) is a little more challenging, but still not too bad - write-up HERE.

In the mean time, I will put the feelers out to see if I can get you any better H/W.

Another option would be to build the images in CI (I like CodeFresh) and push the binaries manually?

@wohali
Copy link
Member

wohali commented Nov 27, 2018

@lag-linaro Unfortunately, ASF policy prevents us from publishing any binaries from CI as assets from the project. Binary builds must be performed on hardware "fully controled" by the ASF Member.

I'm going to proceed with a qemu-based build at this point, since I'll need that for preparing the Docker images as well.

Copy link
Member

@wohali wohali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Lee,

We're much closer now - and have a working Erlang build - but needs one major fix and a few minor changes before I can land this. Back over to you for the last revision, I think.

For extra credit, enhance .travis.yml to test this on debian:stretch and arm64v8/aarch64 via Docker and qemu, since that's the OS/version/platform we'll target for the eventual Docker image.

@wohali
Copy link
Member

wohali commented Nov 28, 2018

@lag-linaro Did you forget to push to GitHub? I see all of the conversations resolved, but no actual changes as requested...

@lag-linaro
Copy link
Contributor Author

Thanks for looking.

I resolved the issues as I fixed them locally. I need to fully test the changes before re-posting.

@lag-linaro lag-linaro force-pushed the arm64-support-erlang branch 2 times, most recently from 51bb7f8 to 2289478 Compare November 30, 2018 12:34
@wohali
Copy link
Member

wohali commented Dec 6, 2018

Hi @lag-linaro , unfortunately for you I made a small change that more correctly separates the responsibilities of this repo vs. the couchdb-pkg repo. That means you'll probably need to move your changes to bin/build-js.sh over to the other repo, along with making a copy of your bin/detect-arch.sh script there as well.

I tried to hold off for your PR, but these changes were blocking our 2.3.0 release - which is going to be announced in a matter of hours. Sorry about that.

It should be easier to wrap your head around the build process now - I left behind a lot of good news in the README files, and both repos have parallel ./build.sh scripts that should be illuminating.

@lag-linaro
Copy link
Contributor Author

Oh no.

Hopefully the changes aren't too complex. I'll take a look.

Lee Jones added 6 commits December 7, 2018 07:43
…exists

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Change this if Erlang Solutions start providing packages for ARM.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Instead of manually calling `arch` in various scripts.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
…encies

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Lee Jones added 2 commits December 20, 2018 12:05
…ster|bionic) warning

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Fixes:

  Unrecognized Debian-like release: <UNRECOGNIZED_VERSION>! Skipping lintian work.
  chmod: cannot access '/usr/share/lintian/profiles/couchdb/main.profile': No such file or directory

Signed-off-by: Lee Jones <lee.jones@linaro.org>
@lag-linaro
Copy link
Contributor Author

Just pushed a small update to this too. Looking good now.

The Travis failures do not have anything to do with this PR it seems.

@wohali wohali merged commit 0fea4fa into apache:master Dec 21, 2018
@wohali
Copy link
Member

wohali commented Dec 21, 2018

@lag-linaro I'm going to accept both these PRs for now - but it's too late for me to consider whether or not this fixes everything we need to start releasing aarch64 binary packages. The other thing we need to work out is how to cross-build those pkgs and Docker images from an amd64 host. I have pointers to some docs on this but I haven't tried anything yet, and most approaches leave something to be desired.

Let's revisit in 2019 (I'm back on 2019.1.7) and finish this off. Thanks for your hard work on this!

@lag-linaro
Copy link
Contributor Author

@wohali I have all but run out of time on this project. No funding left unfortunately.

As I know you already appreciate I put a great deal of time into getting to where we are today.

Would you be able to put the icing on the cake and start to release images for aarch64?

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.

2 participants