-
Notifications
You must be signed in to change notification settings - Fork 1k
Help: How to build for RPi - armv7l ? #1221
Comments
Requires pkg-fetch 3.2.0 Ref: #1215 |
Thank you @robertsLando. I use this workaround to force pkg to use pkg-fetch 3.2.0:
But it seems it doesn't want to use
|
Based on this: https://github.com/vercel/pkg/blob/master/lib/index.ts#L163 Seems that linuxstatic binaries are only used when host platform is different from target and the target is linux or alpine, platform comes from here: https://github.com/vercel/pkg-fetch/blob/main/lib/system.ts#L61 I would suggest to allow override this with an option @jesec @erossignon ? Maybe @dimitribocquet What you could do is to patch the code on your side and edit that line to force linuxstatic for now to see if it works |
I have hardcoded
|
Ok so creating an option like |
Not a good idea. linuxstatic-armv7 platform is supported on best-effort basis, and it does not worth the complexity of a top-level command line argument. That argument is confusing, hard to maintain and pretty much only useful in extremely limited scenarios (and, provided the users understand the implications). OP is doing things wrong. You are not supposed to emulate armv7 platform. Instead, you should use Linux x86-64, and configure binfmt to allow armv7 binaries to execute. Additionally, read README again. |
@jesec Ok so just to know how should someone build an armv7 linux image from for example an x86/64 or arm64 linux? |
Read README. You have to either setup emulation (so armv7 binaries can be executed) or disable bytecode generation. |
@jesec I understand that this option is not a good idea. Here I try to This is the reason why this option appears. Maybe there is another way to do that? |
I am running into inverted problem here. Our buildfarm is arm64 and we are trying to build both arm64 and armv7 binaries. It is perfectly possible to do so (in fact e.g. Ubuntu compiles the entire distribution armv7 binaries on arm64 too). Because build host arch (arm64) != target arch (armv7), pkg forces linux to linuxstatic which is not needed (in fact it will break build in fetch with Not able to build 'linuxstatic' ...). I think it would be good to have a way to tell pkg to use whatever destination triplet user selected and not replace linux with linuxstatic based on host and target mismatch. |
i have the same problem as @dimitribocquet. pkg on a pi which downloads linuxstatic but does not use it somehow. is there any way to support? may a bountyhunt or something similar help? pkg for raspi would be awesome. thanks for great work so far. |
thanks @QuickJack sounds great. i will test it asap |
@QuickJack could you open a PR for this? |
I already created a PR. Unfortunately, it was rejected (s. #1275). But you are free to use/test my fork. |
It is necessary because it is extremely difficult to set up an environment to run normal As for |
Hi guys,
First of all thank you for this package, it looks awesome.
I would like to build my NodeJS app for my Raspberry PI, working on
armv7l
.I've been trying to do that for a week, no success.
I am pretty new in this world, so any help is really appreciated.
Currently I'm working on MacOS, but if needed I can move to a Linux machine if it's simpler to do it.
I tried to compile directly via a RPi, but it takes endless hours, and my RPi is hot as hell.
Then I tried to emulate a RPi with QEMU, I did not succeed.
I'm stuck, I don't know what to do.
Thanks for your help!
The text was updated successfully, but these errors were encountered: