-
Notifications
You must be signed in to change notification settings - Fork 166
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
RISC-V to Experimental tier #2876
Comments
@nodejs/build @nodejs/releasers |
Without knowing enough about the current RISC-V landscape, it would be interesting to hear about distributions, operating systems and devices that are common. Are there lowest common denominators that we can leverage? Or is it a scattered landscape where we'd need to be shipping 5 different binaries to keep everyone happy? Already having musl as a competitor to glibc is slightly tricky to support on x64. Beyond that - how would we test this in our CI system? Then how do we build binaries? Are we emulating everything? Is emulation a straightforward proposition? Are there any infra providers that might be convinced to provide RISC-V hardware? If someone just wants to have a stab at it, you could try and contribute a recipe to unofficial-builds @ https://github.com/nodejs/unofficial-builds/; using a container on x64 to cross-compile a binary to RISC-V somehow. That'd probably be where such a binary would end up without significant CI and people resources anyway. |
Hi @rvagg great to hear from you.
Major Linux distributions declared RISC-V support: openSUSE, Debian/Ubuntu, Arch, Gentoo, Fedora,... Most of them converges on: RV64GC baseline.
I represent SiFive and we would gladly provide real Hardware for regression and CI here is the platform: https://www.sifive.com/boards/hifive-unmatched
That is sounds awesome! |
Hi @drom I'm very interested in this. The question would be how such boards could be hosted if we had them - do you have hosting for boards (Possibly via the PLCT lab?) or would you just be providing the hardware to the project that we'd have to host? Cross-compiling would likely be the preferred option with the testing completed on real boards, although with ccache enabled it could be done natively on the boards too in a reasonably timely manner (it's under 10 minutes for a "full" rebuild when the source hasn't changed using the onboard SD card for storage) @rvagg I've used RISC-V systems with Ubuntu, Debian and Fedora and all of those are usable. As Aliaksei says there is a fairly good baseline that we can target for this that most boards that anyone would be likely to run on support so that shouldn't be a concern at this time. FYI I have previously built a RISC-V port of Node.js from https://github.com/v8-riscv/node on a SiFive Unleashed board that I have for another project so this is very much feasible (I just haven't had the cycles to push it forward since there's been little to drive it, but with SiFive's interest I'm sure we can make it happen and I'm very keen to help push it!) |
@sxa Great to hear from you.
We (SiFive) are open for any of these options. What ever is more convenient, comfortable for the Node project.
Great. I will try both options and report.
Thank you for your help. |
I'm also now trying to build the current nodejs/node master branch on my unleashed to see what state it's in |
Took about eight hours to build on the unleashed board using
|
Also builds ok natively in about ten hours with just
but a shared openssl for a first pass shouldn't be too much of a problem :-) For reference, a sample command line being used for the attempt at compiling openssl is as follows - it has configured itself for x64 instead of riscv64 which probably isn't too hard to resolve: |
v16.x and v17.x can build. but 17.x ocurs large segment fault. May be some patch of v8 not merge. |
Wow. @sxa you just killing it! 👍 |
Neither :-) It's on an Unleashed board that I have access to for another project (so sadly no M.2 drives unlike the Unmatched ones). I've used an RV64 qemu in the past but that would take days to build Node.js I expect! |
I moved the issue to nodejs/build as I think it's the most relevant repository to continue this discussion (since there'll be work around setting up infrastructure). As discussed on Slack we can start with setting up one Jenkins agent and having a test job running on it. Once we have that setup we can discuss how many nodes would be convenient for both the Node.js project and for SiFive. Question for @nodejs/build-infra: would we prefer RISC-V nodes being hosted by SiFive, or do we want to host those ourselves? |
Assuming we'd have full access to them I think having it hosted by SiFive would generally be the preferred option assuming we had full access to it, although I could probably host one too. |
Managed hosting where we have reason to trust the provider is the preferred option, by far. I've tried to minimise our reliance on infra hosted by individuals wherever possible and it would be good to reduce that even further over time. Let's try and avoid signing up our infra for more boxes on desks. It's a big weak point in terms of reliability and, to some degree security. |
A brief update on this - while it does build ok with the ICU support, it does seem to get stuck when building the |
I'm looking to get this building with a cross-compiler although I'm currently getting compiler failures when doing so. This PR doesn't resolve the issue I'm seeing. I'm going to build natively on the RISC-V board to see if it's a specific issue with the cross compile. If it can be convinced to work (and it should do) then we can likely get it added as an unofficial build using the existing system fairly quickly afterwards. |
I've got a clean build with a cross compiler now so we should be able to incorporate this into a suitable dockerfile now. I've got one based on the |
"Unofficial build" support is now live (although the server that's building is is creaking a bit under space limitations) so we have builds at https://unofficial-builds.nodejs.org/download/release/v17.9.0/ so we just need to get that formalised in the docs. The builds don't pass all the tests (mainly failures in crypto - perhaps due to openssl-no-asm - and addons tests) but it fundamentally works so I'm comfortable that it's good enough for experimental. It is built with full-icu (there's a version of 17.7.1 without ICU) so may well have an issue with the hangs described above with the doc target mentioned previously but we should consider whether we wish to perform some formal testing on this on real boards other than the ones I'm using elsewhere for now :-) |
fancy, good work @sxa .. I guess we need to deal with those space problems |
I see RISC-V now included in the unofficial builds, great! Seems that the space issues from April are resolved. |
The next step would be to look at getting the build passing all the tests that come with node, since they weren't all passing last time I tried. SInce this is pretty much a spare time project for me I haven't had too much time to look at progressing that. |
FYI There's a build break on 19.0.0 so there is no unofficial build for RISC-V in the latest version yet: nodejs/node#45059 |
Ref the last comment, 19.1.0 has RISC-V support back again at https://unofficial-builds.nodejs.org/download/release/v19.1.0/ While it's not part of the build pipelines yet (Performance would likely be an issue) I have connected in a RISC-V Ubuntu system into the CI and set up a job to build from the It would be good to get openssl support building without |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
@nodejs/build Revisiting this because it's been marked as stale (and we ran out of time in the call today for me to raise it). We describe experimental platforms as "May or may not pass test suites. The core team does no create releases for these platforms". Given that we have unofficial builds and there is generally a desire to fix those when they go wrong (but it doesn't pass all the test cases yet) are we in a position where we can consider riscv64 a valid "experimental tier" platform? |
@sxa, @luyahan, I contacted Ludovic Henry from the Language Runtime WG in RISE and he would be happy to integrate a group maintaining node, if there is interest. I don't know the team who worked on the RISC-V port, but I think they would also be a good candidate to be part of a RISC-V node WG. Stewart, apparently you already contacted RISE, perhaps you can catalyse the efforts and reach some agreement with them. |
Yep I know Ludovic and am involved with that working group (Not just for Node stuff) ;-) |
@sxa, could you contact me by email? |
Done - to the address on your github profile. I'm also on the openjsf slack (and various others!) if you want to contact me there :-) |
@sxa are the only RISC-V boards used for teesting currently the ones you have? |
Yes. but only one (not one in my house!) is connected to the Node CI. |
I created the @nodejs/platform-riscv64 GitHub team and invited @sxa to it. |
I'd like to be notified about RISC-V stuff. |
@targos please add me tot the list |
I invited both of you. |
@luyahan would you like to be part of the team? |
I realise I am quite late to reply, but if possible I am also (still) interested to be notified about RISC-V stuff. |
@olof-nord you're invited too :) |
Any updates on this effort? What's needed to move it forward? |
nodejs/node#56175 was just closed "not planned". |
@andreamancuso, as I understand it we don't have enough volunteers who are keeping the non-official builds building/running/working (II think I heard they have been broken recently) Until more people step up to volunteer their time to work on riskv. What's need are people to volunteer their time to fist keep the non-official builds green, and then possibly on-ramp more hardware, etc. See #3511 for a similar request for another architecture and an outline of what it would take. |
@mhdawson thank you for the feedback. I'll admit that from a user's perspective I'm happy to use the official Debian Trixie packages for the riscv-64 architecture. At the end of the day they do the job just fine. That being said, I'll be happy to have a look at the build whenever I can - do I need special permissions to look at the logs, etc.? Cheers |
What is the problem this feature will solve?
Support growing number of RISC-V based devices
What is the feature you are proposing to solve the problem?
Provide RISC-V release of node-js
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: