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

QNX? Does anyone know of any resources for getting .NET Core compiled/running on it? #11839

Open
pauldotknopf opened this issue Jan 18, 2019 · 15 comments
Labels
area-PAL-coreclr os-unsupported OS which is not officially supported port question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@pauldotknopf
Copy link

I have a .NET Core code-base that I'd like to run on an embedded device that is using QNX as it's operating system.

QNX is very similar to Linux, and is posix-compliant. User-space code (without deps on drivers) that is posix-compliant should just work.

Has anyone looked into this?

Is there something specific I should be considering before digging in?

@Suchiman
Copy link
Contributor

While QNX is not officially supported, the first question should be if the embedded device is using a supported CPU architecture. Currently .NET Core supports x86, x64, ARM32 on ARMv7+ chips (that means no raspberry pi 1 / zero for example) and ARM64 (as of .NET Core 3)

@pauldotknopf
Copy link
Author

I should have mentioned that. In my case, this is x86. I fully understand that architecture is a bigger question.

@janvorli
Copy link
Member

I have no knowledge of QNX, but you can give it a try.
You can try to build native components of coreclr on QNX as the first step and see if you can make it work. For the first steps, you'd need at least cmake 2.8.12 or higher, clang 3.6 or higher and make. I would try to start from there and see what the build complains about. Then install missing packages / fix build scripts or source and repeat. I'll be happy to help you understand errors that you couldn't easily decipher.
To try to build, just clone the coreclr repo and run ./build.sh

@pauldotknopf
Copy link
Author

Great, that is good to hear! I will try to not bother you guys too much.

@pauldotknopf
Copy link
Author

What is the relation of libuv to ASP.NET Core 3? It looks like it isn't supported on QNX (See here).

@pauldotknopf
Copy link
Author

It looks like it isn't being used.

I created an MVC app using 2.2.103, published as self-contained, and all I see is this:

-rwxrw-rw- 1 pknopf pknopf  3126440 Dec  7 15:53 libclrjit.so
-rwxrw-rw- 1 pknopf pknopf 10296824 Dec  7 15:54 libcoreclr.so
-rwxrw-rw- 1 pknopf pknopf   718384 Dec  7 15:54 libcoreclrtraceptprovider.so
-rwxrw-rw- 1 pknopf pknopf  1071808 Dec  7 15:54 libdbgshim.so
-rwxrw-rw- 1 pknopf pknopf   692128 Dec  7 17:48 libhostfxr.so
-rwxrw-rw- 1 pknopf pknopf   712624 Dec  7 17:48 libhostpolicy.so
-rwxrw-rw- 1 pknopf pknopf  3942256 Dec  7 15:54 libmscordaccore.so
-rwxrw-rw- 1 pknopf pknopf  2750824 Dec  7 15:54 libmscordbi.so
-rwxrw-rw- 1 pknopf pknopf    88728 Dec  7 15:54 libsosplugin.so
-rwxrw-rw- 1 pknopf pknopf   719864 Dec  7 15:54 libsos.so
-rwxrw-rw- 1 pknopf pknopf    92216 Dec  7 15:54 System.Globalization.Native.so
-rwxrw-rw- 1 pknopf pknopf   768680 Dec  7 16:49 System.IO.Compression.Native.so
-rwxrw-rw- 1 pknopf pknopf    60848 Dec  7 16:48 System.Native.so
-rwxrw-rw- 1 pknopf pknopf    14832 Dec  7 16:48 System.Net.Http.Native.so
-rwxrw-rw- 1 pknopf pknopf    10672 Dec  7 16:48 System.Net.Security.Native.so
-rwxrw-rw- 1 pknopf pknopf   125616 Dec  7 16:48 System.Security.Cryptography.Native.OpenSsl.so

This looks good.

@Suchiman
Copy link
Contributor

@paulbrittain as of ASP.NET Core 2.1, socket transport (implemented over System.Net.Sockets) replaces the libuv transport as default.

@guesshe
Copy link

guesshe commented Dec 17, 2019

@pauldotknopf Were you able to make it work? I am facing the same requirement here.

@pauldotknopf
Copy link
Author

@guesshe, my requirements changed, I didn't need it after all.

@guesshe
Copy link

guesshe commented Dec 17, 2019

@pauldotknopf Thanks! Were you able to port cmake and clang to QNX anyways?

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@guesshe
Copy link

guesshe commented Mar 9, 2020

I have built coreclr but now I am stuck with how to execute a dll program on qnx. I tried to build dotnet executable but not sure if it is the right path. Any suggestions here would be greatly appreciated. Thanks!

@guesshe
Copy link

guesshe commented Mar 9, 2020

@janvorli Would you please help here? How can I execute a dll program on qnx? Do I need to build dotnet executable?

@huoyaoyuan
Copy link
Member

How can I execute a dll program on qnx?

Maybe you are unfamiliar with clr structure and I can help you about this.

Yes, running dll assembly requires a native executable to launch it, in several possible ways:

  1. dotnet command. The one powers every developer side things. May be most complex to build, but solves almost everything.
  2. corerun. It's too simple, and is only used for quickly debugging clr itself.
  3. The native executable produced by dotnet publish - r (I cannot remember the codename, maybe corehost?) Should be the best choice for embed scenarios that doesn't require developer stuff.

@karthikshanmugam
Copy link

@guesshe

While compiling the coreclr, I'm stuck at the fpsimd_context in the PAL, since the said structure is not available in QNX.
Can you please provide any pointers ?

@guesshe
Copy link

guesshe commented Oct 5, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-PAL-coreclr os-unsupported OS which is not officially supported port question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

7 participants