-
Notifications
You must be signed in to change notification settings - Fork 542
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 cmake compilation scripts for quickjs #2827
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: wenlingyun1 <[email protected]>
Signed-off-by: wenlingyun1 <[email protected]>
refactor aiotjsc tools cmake and cmake-format related CMakeLists.txt Signed-off-by: liaobin1 <[email protected]>
…sn't exist Signed-off-by: wenlingyun1 <[email protected]>
[Experimental Bot, please feedback here] No, this PR likely does not fully meet the NuttX requirements based on the provided information. Here's why:
To meet the requirements, the PR needs the following:
Without these improvements, the PR is likely to be rejected or require significant revisions. |
Sorry I have to cancel the CI Check, there's a problem with CI Test: |
I have restarted the CI task, is that okay? :-P |
@cederom Sure but sim-01 will run CI Test very slowly, and after 6 hours, GitHub will kill it anyway due to timeout. I was chatting about it here: apache/nuttx#14680 |
And we're trying to fix it now: #2829 |
ACK! Sorry, task cancelled :-) |
@cederom Ack sorry my mind is slow - If you need to restart any of the jobs I cancelled earlier, please click "Restart All Jobs", not "Restart Failed Jobs". This will rerun Fetch-Source to pick up the latest fixes from NuttX Apps. Thanks :-) |
Please restart yourself @lupyuen when ready :-) Thank you for the hint on restart-all to re fetch all updates!! :-) |
@WenLY1 I have problem testing this PR locally.. my first cmake steps in NuttX.. could you please advise? :-)
Looks like cmake tries to create
There is no problem on nuttx master all works fine:
|
@cederom Thanks for your testing work. I tested the command |
Signed-off-by: wenlingyun1 <[email protected]>
No, under |
7191a58
to
7ab6d2a
Compare
@cederom Sorry, the testing steps is not clear. This PR is for |
@WenLY1 For easier testing: Maybe we can create a new defconfig in NuttX Repo that will build sim:nsh with QuickJS? Please keep the defconfig in a Draft PR, so it won't be accidentally merged. Thanks! |
@lupyuen Sure. The defconfig is given in apache/nuttx#14693 |
Thanks @WenLY1! Sorry I have a compile error on macOS, did I miss something? (I'll retest on Ubuntu) $ git clone https://github.com/WenLY1/nuttx --branch qjs_defconfig
$ git clone https://github.com/WenLY1/nuttx-apps apps --branch quickjs_upstream
$ cd nuttx
$ cmake -B build -DBOARD_CONFIG=sim:nsh
$ cmake --build build
/tmp/241108/nuttx/fs/vfs/fs_pseudofile.c:99:3: error: incompatible function pointer types initializing 'ssize_t (*)(struct file *, const struct uio *)' (aka 'long (*)(struct file *, const struct uio *)') with an expression of type 'int (struct inode *)' [-Wincompatible-function-pointer-types]
99 | pseudofile_unlink, /* unlink */
| ^~~~~~~~~~~~~~~~~ https://gist.github.com/lupyuen/784f0c9bd84e5c009e264664017723b2 Update: Yep it works OK on Ubuntu. Let's ignore macOS thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested OK on Ubuntu. Thank you so much for contributing QuickJS to NuttX! :-)
https://gist.github.com/nuttxpr/966a3ee6c05ff98727d6d001ea14d738
$ git clone https://github.com/WenLY1/nuttx --branch qjs_defconfig
$ git clone https://github.com/WenLY1/nuttx-apps apps --branch quickjs_upstream
$ cd nuttx
$ cmake -B build -DBOARD_CONFIG=sim:nsh
$ cmake --build build
$ ./build/nuttx
NuttShell (NSH)
nsh> qjs
QuickJS - Type "\h" for help
qjs > console.log("Hello World")
Hello World
Summary
add cmake compilation scripts for quickjs
Impact
nop
Testing
cd nuttx
cmake -B build -DBOARD_CONFIG=sim:nsh
cmake --build build -t menuconfig and enable following configs: CONFIG_PIPES, CONFIG_SYSTEM_POPEN, LIBC_DLFCN, CONFIG_INTERPRETERS_QUICKJS, CONFIG_INTERPRETERS_QUICKJS_BIGNUM
cmake --build build