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 riscv64 backend for node.js #37856

Closed
luyahan opened this issue Mar 22, 2021 · 15 comments
Closed

Add riscv64 backend for node.js #37856

luyahan opened this issue Mar 22, 2021 · 15 comments
Labels
build Issues and PRs related to build files or the CI. feature request Issues that request new features to be added to Node.js. question Issues that look for answers.

Comments

@luyahan
Copy link
Contributor

luyahan commented Mar 22, 2021

Hi all,
I am a developer about v8 for riscv64 and v8 for riscv64 patch had been upstreamed into google repo.
I want to add support for node.js. I have build success locally.
And what should i do before opening a pr to submit it ?

@Ayase-252
Copy link
Member

Hello,
I'd suggest to read Pull Requests guide to get yourself familiar with commit message guidelines.

Then you are good to go.

@aduh95 aduh95 added build Issues and PRs related to build files or the CI. feature request Issues that request new features to be added to Node.js. question Issues that look for answers. labels Mar 22, 2021
@luyahan
Copy link
Contributor Author

luyahan commented Mar 23, 2021

Hello,
I'd suggest to read Pull Requests guide to get yourself familiar with commit message guidelines.

Then you are good to go.

Thanks

@luyahan
Copy link
Contributor Author

luyahan commented Mar 23, 2021

And i have another question
About https://github.com/nodejs/node/tree/master/deps/openssl/config/archs
Where do these openssl assembly codes come from? I don't find these in https://github.com/openssl/openssl
@Ayase-252

@luyahan
Copy link
Contributor Author

luyahan commented Mar 23, 2021

@Ayase-252
Copy link
Member

Ayase-252 commented Mar 23, 2021

@luyahan

It seems that those files are pre-generated during building. Please refer to README in openssl dep and official maintainence guide.

FYI, Node.js has switched openssl to quictls/openssl in order to support QUIC in #37601

@sxa
Copy link
Member

sxa commented Mar 26, 2021

@luyahan I've only just noticed this issue - great timing as I was about to start taking a look at the port that you've done and give it a try. I'm interested in helping out with getting this in the main codebase if possible. I've sent a request to join your slack :-)

luyahan added a commit to luyahan/nodejs-riscv64 that referenced this issue Mar 29, 2021
   v8 had been add riscv64 backend, so i open this
pr to add riscv64 configure.

Refs: nodejs#37856
@luyahan
Copy link
Contributor Author

luyahan commented Mar 29, 2021

@luyahan I've only just noticed this issue - great timing as I was about to start taking a look at the port that you've done and give it a try. I'm interested in helping out with getting this in the main codebase if possible. I've sent a request to join your slack :-)

@sxa Thanks. I am encountering a problem about openssl. About generate openssl noasm code for riscv64. What i need do to fix this error?
Details:

yahan@f06755d88c20:~/source/node/deps/openssl/config $ make
cd ../openssl; CONFIGURE_CHECKER_WARN=1 perl ./Configure no-comp no-shared no-afalgeng enable-ssl-trace \
no-asm linux64-riscv64;
Configuring OpenSSL version 1.1.1j+quic (0x101010afL) for linux64-riscv64
Using os-specific seed configuration
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]

pick os/compiler from:
BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8
BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 Cygwin-i586
Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN VC-CE VC-WIN32
VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A VC-WIN64A-ONECORE
VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc android-arm
android-arm64 android-armeabi android-mips android-mips64 android-x86
android-x86_64 android64 android64-aarch64 android64-mips64 android64-x86_64
bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc darwin64-arm64-cc
darwin64-debug-test-64-clang darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86
haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc
hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc
hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross
ios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc
irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout
linux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32
linux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64
linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang
linux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-s390x
linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 purify sco5-cc sco5-gcc
solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc
solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc solaris64-sparcv9-cc
solaris64-sparcv9-gcc solaris64-x86_64-cc solaris64-x86_64-gcc tru64-alpha-cc
tru64-alpha-gcc uClinux-dist uClinux-dist64 unixware-2.0 unixware-2.1
unixware-7 unixware-7-gcc vms-alpha vms-alpha-p32 vms-alpha-p64 vms-ia64
vms-ia64-p32 vms-ia64-p64 vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x
vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen
vxworks-simlinux debug debug-erbridge debug-linux-ia32-aes debug-linux-pentium
debug-linux-ppro debug-test-64-clang

NOTE: If in doubt, on Unix-ish systems use './config'.
make: *** [Makefile:63: linux64-riscv64] Error 1

luyahan added a commit to luyahan/nodejs-riscv64 that referenced this issue Mar 30, 2021
 v8 had been add riscv64 backend, so i open this
pr to add riscv64 configure.

Refs: nodejs#37856
luyahan added a commit to luyahan/nodejs-riscv64 that referenced this issue Mar 30, 2021
 v8 had been add riscv64 backend, so i open this
pr to add riscv64 configure.

Refs: nodejs#37856
@mhdawson
Copy link
Member

@luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

@luyahan
Copy link
Contributor Author

luyahan commented Apr 1, 2021

@luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on

I am running Fedroa for riscv64.

, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

PLCT Lab may be can provide it. I need to ask my leader.

@luyahan
Copy link
Contributor Author

luyahan commented Apr 1, 2021

@luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

I know V8 can be built with simulator mode that can run other arch V8 on X64 machine. Can Node.js support it ?

@luyahan
Copy link
Contributor Author

luyahan commented Apr 1, 2021

@luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

About May, PLCT Lab can get some riscv64 .borads and can donate it to Node.js ci

@lazyparser
Copy link

@luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

PLCT Lab is happy to donate RISC-V dev boards. We had ordered dozens of RISC-V boards last year and still waiting to receive them :(
Hopefully we will get more boards in May.

@mhdawson
Copy link
Member

mhdawson commented Apr 9, 2021

@lazyparser can the PLCT Lab host the donated boards ? The project typically has vm's donated versus hardware as we don't have an easy place to host physical hardware.

@lazyparser
Copy link

@lazyparser can the PLCT Lab host the donated boards ? The project typically has vm's donated versus hardware as we don't have an easy place to host physical hardware.

Sure. We are building an open CI infrastructure for RISC-V porting ( https://ci.rvperf.org ) and will provide a board farm to nodejs and v8, etc.

luyahan added a commit to luyahan/nodejs-riscv64 that referenced this issue Apr 14, 2021
 v8 had been add riscv64 backend, so i open this
pr to add riscv64 configure.

Refs: nodejs#37856
BethGriggs pushed a commit that referenced this issue Apr 15, 2021
v8 had been add riscv64 backend, so i open this
pr to add riscv64 configure.

Refs: #37856

PR-URL: #37980
Fixes: #37856
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
@playground
Copy link

How can I install nodejs on risc-v Fedora?


## Installing the NodeSource Node.js 16.x repo...


## Inspecting system...

+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release
+ uname -m

## You don't appear to be running a supported machine architecture: riscv64. Please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your architecture to be considered for support. ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. feature request Issues that request new features to be added to Node.js. question Issues that look for answers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants