Greetings, Rust community!
I have one simple question: does Rust compiles on QNX OS? I saw a few questions about it, but they were quite old. Any updates about that?
Greetings, Rust community!
What do you mean exactly?
Do you want rust compiler for QNX or maybe you're asking about the possibility to compile rust source code for qnx operating system?
As you can see my english isn't that good so you'll have to give me some more details.
My guess is that the question was meant more along the line of "Is is possible to build Rust programs for QNX [regardless of whether this means native tools or cross-compiling]?".
I am interested in this as well, but from what I've gathered: Rust depends heavily on LLVM for target platform support, and [official] LLVM doesn't support QNX. RIM do support LLVM on QNX7, but I haven't seen any signs that they are upstreaming and maintainting their changes -- likely they ported one LLVM version to QNX and are sticking with that.
I don't know how well newer versions of Rust work with old versions of LLVM.
It's pretty strange that RIM aren't supporting, and promoting, Rust on QNX -- it's like the most obvious combo ever.
So far I was able to compile example rust code for target platform but I've got problem with linker. As we know we can specify linker for specific target which I did but there are some flags generated for that target for example to link with pthread (-lpthread) which are not appropriate for QNX because there is no pthread library on QNX.
I found this command on internet:
$ rustc +nightly -Z unstable-options --target=aarch64-unknown-linux-gnu --print target-spec-json
but it does not mention anything about those libraries like pthread. Can anybody tell me where I can find those settings?
These get added by the
std build script.
Yikes that's an old post you found -- recent QNX most definitely has support for pthreads. I've used pthreads on 6.5.0 at least.
Sorry but that is not true at least not for all supported architectures. For example I have some commercial qnx license and in my case there is no libpthread for aarch64le but I can use multithreading without any problem and I have most recent QNX version which is 7.0.
Ah, ok -- I misunderstood. You meant the actual physical library libpthread.so? In QNX the pthread support is baked into libc.so if I recall correctly. So it has a /usr/include/pthread.h, but no libpthread.so. A least the armv7le version of QNX 6.5.0 has pthreads (in libc.so).
Unfortunately I don't have access to QNX 7 ... yet..
Ah, ok -- I misunderstood. You meant the actual physical library libpthread.so?
It was already said on that link I provided before
All our pthread stuff is in libc so you don't need to link against extra
and as jethrogb mention before target for aarch64-unknown-linux-gnu tries to link with following libraries:
which is not correct for QNX.
Apologies for double posting but I've got a question.
How can I use this existing target for example aarch64-unknown-linux-gnu but remove those unwanted linker flags like pthread, dl and rt? Are there any tools that can help me do that?
Any links how it is done would be much appreciated.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.