Closed shishkin closed 1 year ago
Someone reported the same issue some days ago. We think it's a bug of the last version of pagefind in the Apple M1 processors.
Try again configuring the pagefind version to the previous version: v0.10.5
.
Try again configuring the pagefind version to the previous version: v0.10.5.
Thanks @oscarotero. Setting the version to v0.10.5 worked indeed.
@oscarotero I think this is an issue on the Lume side — either in dbin and untar, from a skim? Though I'm not quite sure how it would be happening.
I'm seeing the same error as reported in this issue on my M1 machine. Running Pagefind through its npx
wrapper is working fine for me, and downloading the release url specified in the Lume log (https://github.com/CloudCannon/pagefind/releases/download/v0.10.6/pagefind-v0.10.6-aarch64-apple-darwin.tar.gz
) extracts fine, and the binary runs correctly.
My _bin/pagefind
file created by Lume looks identical to the one referenced above:
30 mtime=1671398107.623792028
22 GNU.sparse.major=1
22 GNU.sparse.minor=0
28 GNU.sparse.name=pagefind
32 GNU.sparse.realsize=10945478
This looks like the tar headers of the file, in some way? I'm not super familiar with tar headers, but the mtime
lines up with when that archive was created in the GitHub Action, and the realsize
works out to the correct size of the decompressed Pagefind binary. So it looks like everything is downloading correctly, but the tar headers are being copied over instead of the tar contents.
I have no explanation for why a previous version of Pagefind is working, however. Nothing in the release flow changed between those two versions, and looking at the logs they both ran on the same OS version/build image, so they should have been archived the same.
Let me know if there's anything I can help debug using my machine
Okay, what I think is the case is that the Deno standard library archive functions don't support sparse tar files — and v0.10.6
happened to archive as sparse, as that can happen by default on the system tar used in macOS.
I don't know how common it is for tar libraries to handle sparse tars, so I don't know if it's worth opening any issue against Deno for this. It might be one to look further into, though, as any GitHub action building for macOS that uses the system tar may, at any point, create a sparse archive that fails in Deno/Lume. Whether it does so seems to depend on the underlying blocks of the filesystem, so it's a tossup whether or not it will happen.
In any case, I've updated Pagefind's release flow to force GNU tar instead of bsdtar on macOS, which defaults the other way on sparse files, so they will no longer be created. That means version v0.10.7
and onwards of Pagefind will be working again in Lume.
Many many thanks @bglw for your time digging into this issue and releasing a new patch for Deno/Lume. I'm not familiarized with how tar files work, but I guess Deno standard library should be able to handle sparse files. I'll post an issue to Deno.
Thanks again!
Thanks @bglw. I can confirm that 0.10.7 works .
Version
1.15.1
Platform
MacOS on M1/ARM
What steps will reproduce the bug?
deno task lume
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
Build works
What do you see instead?
I see an error:
The byte array content above is:
Additional information
Contents of the
_bin/pagefind
file: