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

Add Linux ARM Prebuilds to CI #590

Open
jcmalek opened this issue Dec 5, 2023 · 19 comments
Open

Add Linux ARM Prebuilds to CI #590

jcmalek opened this issue Dec 5, 2023 · 19 comments

Comments

@jcmalek
Copy link

jcmalek commented Dec 5, 2023

Describe the bug
I think that the v6.0.0-beta.7 release: v6.0.0-beta.7 may have lost support for a generic linux ARM build and/or no longer has 32-bit ARM support and the latest builds are now specific to MacOS/darwin. (Maybe happened during move from Travis to GitHub actions)

Reproducing
In previous versions there existed prebuilt code for /prebuilds/linux-arm and /prebuilds/linux-arm64, now I am only seeing /prebuilds/darwin-arm64 which may be unusable on more generic linux based 32-bit ARM systems.

Expected behavior
Please restore support for generic linux-arm and linux-arm64. This may just be a build naming issue if you aren't actually using anything specific to MacOS/darwin.

Tested on

  • Linux distro: ARM i.MX 7 Yocto Poky 4.0.12 (kirkstone) (Open-Embedded Linux)
  • ZeroMQ.js version: 6.0.0-beta.19
@jcmalek jcmalek added the bug label Dec 5, 2023
@jcmalek jcmalek changed the title Regression of generic linux ARM support. Regression of generic linux ARM 32-bit support. Dec 5, 2023
@aminya
Copy link
Member

aminya commented Dec 6, 2023

The prebuilds might have been not uploaded by the CI. We can release with those

@jcmalek
Copy link
Author

jcmalek commented Dec 18, 2023 via email

@aminya
Copy link
Member

aminya commented Dec 19, 2023

PRs for adding that to CI are welcome!

@aminya aminya added enhancement and removed bug labels Dec 19, 2023
@aminya aminya changed the title Regression of generic linux ARM 32-bit support. Add Linux ARM Prebuilds to CI Dec 19, 2023
@jcmalek
Copy link
Author

jcmalek commented Dec 20, 2023 via email

@enzoferey
Copy link

Could this be the cause why I'm getting this error while installing zeromq inside a Docker container?

No native build was found for platform=linux arch=arm64 runtime=node abi=108 uv=1 armv=8 libc=glibc node=18.17.0

The container's image is declared as:

FROM node:18.17.0

@dawadam
Copy link

dawadam commented Jan 2, 2024

This may be the same error as me: #594

@enzoferey
Copy link

Downgrading to zeromq@^5.3.1 fixed the issue for me, so I can confirm the corresponding prebuild was there at some point before.

@jcmalek
Copy link
Author

jcmalek commented Jan 2, 2024 via email

@aminya
Copy link
Member

aminya commented Jan 2, 2024

We can add ARM builds to CI, but we will need to use Qemu for ARM emulation. Travis used to support ARM, but GitHub Actions doesn't natively.

We can probably use something like this to make it easier:
https://github.com/marketplace/actions/run-on-architecture

@ShaharHD
Copy link

anyone working on this?

@aminya
Copy link
Member

aminya commented May 15, 2024

@ShaharHD Not now, but PRs are welcome.

@ShaharHD
Copy link

ShaharHD commented May 16, 2024

@ShaharHD Not now, but PRs are welcome.

Started to try and work on this, but when I try to follow the basic Build from source I'm faliing with:

git clone https://github.com/zeromq/zeromq.js.git
cd zeromq.js
npm install

During the npm install it tries to execute the build - and it fails on the following:

> tsc -p ./src/tsconfig.json && run-s build.library.compat

node_modules/@types/glob/index.d.ts:29:42 - error TS2694: Namespace '"/Users/shahar/Develop/github/zeromq.js/node_modules/minimatch/dist/cjs/index"' has no exported member 'IOptions'.

29     interface IOptions extends minimatch.IOptions {
                                            ~~~~~~~~

node_modules/@types/glob/index.d.ts:74:30 - error TS2724: '"/Users/shahar/Develop/github/zeromq.js/node_modules/minimatch/dist/cjs/index"' has no exported member named 'IMinimatch'. Did you mean 'Minimatch'?

74         minimatch: minimatch.IMinimatch;
                                ~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/@types/glob/index.d.ts:29

running npm install again, ignores that error it seems

but now running npm run build, still shows the same error as above

This is running on a Ubuntu v20.04.16 LTS WSL on an Intel core i7

Am I doing anything wrong?

@aminya
Copy link
Member

aminya commented May 16, 2024

You should probably use pnpm instead of npm.

@ShaharHD
Copy link

ShaharHD commented May 16, 2024

You should probably use pnpm instead of npm.

pnpm resolved the issue on the linux machine.

The README.md needs to be updated as well :)

FYI, the pnpm install does not work properly on Apple silicon based macOS (I'm guessing something broken with the rebuild scripts)

@ShaharHD
Copy link

Small update, I managed to manualy build the arm version without any issue.
Did some small changes in the prebuild an build files, but nothing major.

I'm now working on adding the relevant build steps.
I cannot use the alpine version, but there's no issue with Ubuntu v20 - can I use the docker image of ubuntu 20.0x? (its much bigger than alpine, but it has the required build tools as part of apt and not manual tricky is needed)

@aminya
Copy link
Member

aminya commented May 21, 2024

Yes, feel free to use Ubuntu. PRs are very welcome for the changes!

@ShaharHD
Copy link

While I'm working on the PR, @jcmalek if you still in the need for it, attached is the arm64 linux version of the library (glibc only for now)

This file needs to be unzipped and copied manually (for now) into node_modules/zeromq/prebuilds/linux-arm64

node.napi.glibc.node.zip

@jcmalek
Copy link
Author

jcmalek commented May 27, 2024

Thanks so much for working on this @ShaharHD! We'll definitely use this once it is merged. Much appreciated :)

@aminya
Copy link
Member

aminya commented Jun 17, 2024

@ShaharHD Could you make a pull request with your progress? We can work on it together to finish it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants