-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Hugo bin is not working with Docker on Mac M1 Pro #118
Comments
Does Hugo provide a binary that works on your system? If so, which one exactly? I don't use Docker not do I have such a system to test, so if the above applies, I might need you to test some things for me. |
Similar issue as above for me, but my local install works. I installed on my m1 via homebrew hugo: stable 0.94.2 |
Well, this is where the platform choice happens Lines 14 to 47 in c809456
Since I don't have such a system, you will need to figure this out and submit a PR :) Don't forge t to CC me if you make a PR. |
I'll see if can get to it this weekend. In the meantime here are some references. homebrew hugo formula: https://formulae.brew.sh/formula/hugo
|
Hey @XhmikosR, I believe that this might suffice (for both extended and no extended versions).
If you create a branch with this (or publish a test release), I believe I might be able to test this in the next days. |
The thing is that there's no such binary upstream: https://github.com/gohugoio/hugo/releases |
@XhmikosR Please note that the binary is From what I understand, aarch64 & arm64 are the same arch. |
Looking deeply into the code I see that bottomline the dependency to detect OS Arch does not properly work in this scenarios feross/arch#19 |
Unsure what to do here... happy to accept a clean PR that doesn't break something, but I don't have such a system to test, and our CI might not catch all the cases. |
Please try with the latest version which updates Hugo to the latest version and uses universal binaries. |
…ifying as aarch64.
This is still an issue for me even after using the latest version hugo-bin that incorporates the Hugo universal binaries. The problem is that Docker containers based on linux-arm64 Docker images do not identify as
@XhmikosR I've created a PR based on @joaolrpaulo's suggestion in #118 (comment) that I think should resolve this issue: #124 |
After further investigation and testing, I've come to the same conclusion as @joaolrpaulo in #118 (comment):
The real problem lies in the NPM arch package (which is a dependency of os-filter-obj package that the bin-wrapper package depends on). The arch package does not support non-intel architectures and it's unclear how actively that package is maintained at this point. There is an open PR that would add See also: kevva/os-filter-obj#3 |
Not a lot we can do here with the current state of things. I've pinged feross in that PR, so if a patch release is made with the fix then things will work. |
I'm made an issue to replace bin-wrapper with something else lighter and which hopefully works with M1. If someone makes a clean PR, happy to review. |
I plan to fork the arch and os-filter-obj packages in the next days to fix this issue. |
Could someone test the xmr/os-filter-obj branch?
I don't own such an environment, so any help is welcome. We might need to adapt https://github.com/fenneclab/hugo-bin/blob/main/lib/index.js. |
Is there anyone with such a machine that they can try the above? |
This has landed on main since a few version ago. I still don't know if the issue is fixed or not, though. |
Currently is not possible to use this lib on the new M1 Pro processor using Docker, I suspect it is because of the arch that docker is reporting, but cannot confirm.
The error I get executing this lib is:
Lib Version: 0.82.2
Docker reported Architecture:
aarch64 Linux
The text was updated successfully, but these errors were encountered: