-
Notifications
You must be signed in to change notification settings - Fork 1k
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 Vxworks #1408
Support Vxworks #1408
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This should at least test that libc builds correctly for this target (e.g. check ci/builds.sh, you might want to add all the vxworks target triples to the "rust nightly" environment variable). |
@gnzlbg |
You should probably add the target triples first, then libcore support, then libc, then liballoc, and then libstd support. WIth libcore support, the target triples here would work. |
Also, is it possible to run VxWorks under KVM or qemu on Linux ? If so, we'll need docker containers for these targets that do just that (e.g. see |
ping |
No, VxWorks can't run under KVM or qemu. |
Sorry for the late response. |
Congrats and awesome.
Just update this PR with the build tests, and then we can merge it. |
I guess the rust version used for testing is not new enough to have the code to support vxWorks targets. |
The version used for testing is the latest nightly version. If the target
isn’t there, then no rust version exists with the target.
|
My code was merged yerterday night some point, I guess these targets will show up with the next build. |
Yes that's normal, it might take one day till the next nightly is released. You can locally try to see if your target is there. If it isn't then maybe publishing the |
The PR to fix this issue has been created yesterday, it is waiting to be merged: |
This seems not a problem in my code. |
This is expected result as to build the "rust-std" for target armv7-wrs-vxworks, vxworks's work envionment(the compiler used to build C code, the linker to link libraries and executables etc) has to be installed somethere. |
Can you give any suggestion what should I do next? Thanks, |
ci/build.sh
Outdated
@@ -93,6 +93,13 @@ x86_64-unknown-freebsd \ | |||
x86_64-unknown-linux-gnu \ | |||
x86_64-unknown-linux-musl \ | |||
x86_64-unknown-netbsd \ | |||
armv7-wrs-vxworks \ |
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.
These are in the incorrect list of targets. You need to put them in the RUST_NIGHTLY_LINUX_TARGETS
variable.
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.
Hi gnzlbg,
I have moved these vxworks targets to RUST_NIGHTLY_LINUX_TARGETS.
Thanks,
Baoshan
@BaoshanPang so apparently that didn't work, can you try moving them to |
Hi gnzlbg, Can you help to check what's problem? It doesn't look like caused by my code.
Thanks, |
This is an LLVM bug introduced with the upgrade to LLVM 9 in rust-lang/rust. There is a tracking issue there (rust-lang/rust#62932) that has been reproduced and now an LLVM bug has been filled (https://bugs.llvm.org/show_bug.cgi?id=42760). You can try commenting out the thumbv6m-none-eabi target in the build.sh script (adding a FIXME linking to the rust-lang/rust issue). |
I've disabled the failing build test on master temporarily. Closing and reopening the PR to restart the CI builds. |
Thanks for help. |
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.
Some minor nits, but it looks good. I think we can merge this afterwards.
@bors: r+ |
📌 Commit b277cd5 has been approved by |
Sadly, the repo is in the middle of a transition to Azure Pipelines, and until it is finished nothing can be merged anymore. |
Thanks for lettting me know it. Do we have a time when the transition could be done? Thanks. |
I don't think so. As soon as #1376 is merged. |
@bors: r+ |
📌 Commit 5c101cc has been approved by |
Support Vxworks Define the C interface to VxWorks
💔 Test failed - status-azure |
@bors: r+ let's merge this! |
📌 Commit 4e3fcdd has been approved by |
Support Vxworks Define the C interface to VxWorks
💔 Test failed - status-azure |
…owerPC, PowerPC SPE and PowerPC 64-bit.
@gnzlbg Thanks, |
@bors: r+ |
📌 Commit d18003a has been approved by |
Support Vxworks Define the C interface to VxWorks
☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, status-azure |
@BaoshanPang thank you for working on this! Sorry that it took so long to merge it! Does VxWorks provide any kind of emulator to test applications on, e.g., x86 linux ? |
We are using "simics" to test rust: https://en.wikipedia.org/wiki/Simics |
@gnzlbg thanks for your help getting this initial VxWorks support into Rust libc.
We don't (yet) have a straightforward way for people other than Wind River's VxWorks customers to build and run VxWorks applications (including Rust executables), but this is something we hope to address in future. We'd certainly like to be able to provide a way for "anyone" to try out Rust under VxWorks. Stay tuned! |
@n-salim until such a method is available, my recommendation is for Wind River to run libc tests internally at least, and submit PRs that fix them (fill issues if you have questions). That should catch most serious bugs in the implementation of the FFI wrapper. If you want to get started with that check out the |
@gnzlbg thanks very much for this information. We'll look into running the libc tests on VxWorks. |
Define the C interface to VxWorks