Skip to content
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

Support ARM64 builds #13

Closed
Davi5Alexander opened this issue May 1, 2024 · 8 comments
Closed

Support ARM64 builds #13

Davi5Alexander opened this issue May 1, 2024 · 8 comments
Labels

Comments

@Davi5Alexander
Copy link

I have tried to compile for arm64, but I’m facing issues with the dependencies. I would appreciate it if you could add the binary to the release.

@Gkiokan Gkiokan added the todo label May 1, 2024
@Gkiokan
Copy link
Owner

Gkiokan commented May 1, 2024

I will check that when I have time, probably in 2 weeks earliest.
Meanwhile you can try to figure out what the parameter would be for pkg to build the arm64 binary.

pkg is used to build the binaries. Keep in mind that you may stay on node 16 or 18 for not breaking dependencies.

@Gkiokan
Copy link
Owner

Gkiokan commented May 1, 2024

Alternatively you should be able to run the project without building the binary from the source code anyway.

@Gkiokan
Copy link
Owner

Gkiokan commented May 31, 2024

I have to apologize, been busy way more then I thought.
You might solve this by changing nvm to 16, then you might be able to install all dependencies and build it.
Probably use nvm for it. nvm install 16 && nvm use 16 && npm run build

@meska-lt
Copy link

meska-lt commented Jun 8, 2024

Hello!
Thanks to your suggestions I was able to successfully build and package the app on Raspberry Pi OS (Debian 12 ARM64).
Though, once I configure the app and download the required binaries, I get the following error:
image

Things I have tried so far (with no luck):

  • remove /tmp/pkg/...;
  • remove node_modules/better-sqlite3 and package-lock.json, then running npm -i and then running npm run build:linux-arm;
  • remove node_modules completely along with package-lock.json, then running npm -i and then running npm run build:linux-arm;
  • add additional step (npm rebuild better-sqlite3 --update-binary) between npm run clean and npm run dist.

What am I missing? 🤔

@Gkiokan
Copy link
Owner

Gkiokan commented Jun 8, 2024

On which node version are you? Check by node -v and npm -v and make sure you are at least on 14 or 16.
17+ has Breaking Changes.

Make sure you are at least on node v16 because the Error log clearly complains about node compatible missmatch with the sqlite3 library. Alternatively look for node sqlite3 build error, you ain't the first one.

Just curious, isn't the Released Linux Build working for you?

@meska-lt
Copy link

meska-lt commented Jun 8, 2024

On which node version are you? Check by node -v and npm -v and make sure you are at least on 14 or 16.
17+ has Breaking Changes.

[alarm@alarm hb-store-cdn-cli-server]$ node -v
v16.20.2
[alarm@alarm hb-store-cdn-cli-server]$ npm -v
8.19.4

Just curious, isn't the Released Linux Build working for you?

In current case - no, because it is built towards different architecture (x64, I suppose). In order to run the app on Raspberry Pi 3 (arm64) I have to build it.

@meska-lt
Copy link

meska-lt commented Jun 8, 2024

Thank you for your tip again!

I've wiped /tmp/pkg and node_modules again, used nvm to set up node version 14, ran npm i (following npm i pkg, as far as it was missing after wipe), then (finally) npm run build:linux-arm. After this I've successfully launched the app on my Raspberry Pi 3 without any errors!

@Gkiokan
Copy link
Owner

Gkiokan commented Jun 8, 2024

Yeah somehow I missed to put pkg into my package.json because I use it globally but this isn't a big issue.
Well great I am glad you got it working, have fun with it.
Everything else should be straight forward.

@Gkiokan Gkiokan closed this as completed Jun 8, 2024
@Gkiokan Gkiokan pinned this issue Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants