Skip to content

Allow installing HLS from source #15

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

Closed
wants to merge 14 commits into from
Closed

Allow installing HLS from source #15

wants to merge 14 commits into from

Conversation

tfausak
Copy link
Contributor

@tfausak tfausak commented Nov 10, 2022

Alternative to #14. Would fix #12. Also would fix #13.


  • I manually tested the code locally to make sure that it works.
  • If there is documentation, I made sure it's accurate and up to date.
  • If possible, I wrote automated tests for the new behavior.

@tfausak
Copy link
Contributor Author

tfausak commented Nov 10, 2022

So, what changed here?

  • I moved the "configure Cabal" block immediately after "install Cabal". This is because compiling HLS from source uses Cabal, so we need it to be configured before compiling.
  • I did the same thing for Stack, just for symmetry.
  • I upgraded to GHC 9.2.5.
  • Same for GHC 9.4.3.
  • I changed the HLS installation to look for HLS_VERSION values that look like commit hashes. If it's a commit hash, it will try to compile from source. Otherwise it will install like it used to before.
  • I reformatted the Dockerfile to indent conditionals, which hopefully makes things a little clearer.

@tfausak
Copy link
Contributor Author

tfausak commented Nov 10, 2022

ARM build ran out of memory:

[Container] 2022/11/10 20:48:56 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: docker build --build-arg GHC_VERSION="$GHC_VERSION" --build-arg HLS_VERSION="$HLS_VERSION" --tag "$tag" .. Reason: exit status 9

I think I can give it more.

@tfausak
Copy link
Contributor Author

tfausak commented Nov 10, 2022

Actually AMD failed for the same reason. I changed both of them to have 16 GB of RAM and 8 vCPUs. I restarted the GHC 9.4.3 builds to see if they succeed. If they do, I'll restart all the builds.

@tfausak
Copy link
Contributor Author

tfausak commented Nov 10, 2022

Unfortunately that failed too. I can configure a larger machine for AMD, but not for ARM. I'm going to try setting --jobs=1.

@tfausak
Copy link
Contributor Author

tfausak commented Nov 10, 2022

That failed again for both AMD and ARM. I think this approach isn't going to work for us. HLS simply requires more resources to build than we are able to provide.

There is another step up in CodeBuild for the AMD machines, but we're already at the top for the ARM machines. I suppose it's possible that we could build for ARM using emulation on a giant AMD machine, but that seems like more trouble than it's worth at this point.

@tfausak tfausak closed this Nov 11, 2022
@tfausak tfausak deleted the 2022-11-10-scratch branch November 11, 2022 13:58
@codygman
Copy link
Contributor

I suppose it's possible that we could build for ARM using emulation on a giant AMD machine, but that seems like more trouble than it's worth at this point.

Wouldn't that just be changing the machine and activating binfmt or something?

@tfausak tfausak restored the 2022-11-10-scratch branch November 11, 2022 18:18
@tfausak
Copy link
Contributor Author

tfausak commented Nov 11, 2022

It would use docker buildx build --platform=.... Actually now that I look at it, it doesn't seem so bad. Let me give it a try.

@tfausak tfausak reopened this Nov 11, 2022
@tfausak
Copy link
Contributor Author

tfausak commented Nov 11, 2022

I think that my code is all correct, but I keep getting this error with the ARM64 build:

Error while loading /usr/local/sbin/apt-get: No such file or directory

I have no idea how to fix it.

@tfausak tfausak mentioned this pull request Nov 11, 2022
3 tasks
@tfausak
Copy link
Contributor Author

tfausak commented Nov 11, 2022

Closing in favor of #16.

@tfausak tfausak closed this Nov 11, 2022
@tfausak tfausak deleted the 2022-11-10-scratch branch November 11, 2022 20:57
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.

Upgrade to GHC 9.4.3 Upgrade to GHC 9.2.5
2 participants