System.Native.a in System.Console package
System.Native.so is part of the System.Console package. This works well for CoreCLR scenario where the PAL is a shared object.
For CoreRT console scenarios, we need to link the PAL into the application and thus, need System.Native.a to be part of the nuget package.
@stephentoub - please share your thoughts on this :)
@brthor @MichalStrehovsky @schellap - FYI
@tarekgh can you please track this work with the other CoreRT PAL work we are have.
Last I knew, our working plan for the shims is what @ericstj outlined at: https://github.com/dotnet/corefx/issues/2302#issuecomment-156132918 so assuming we stick with that, if System.Native.so is in the System.Console package today, I wouldn't expect it to be longer term.
But that's neither here nor there... the real request is for the .a to be in whatever package includes the corresponding .so / .dylib / etc. I don't have any fundamental concerns with that. How much would we expect it'll increase the size of the relevant package? My assumption is not by very much, in which case seems reasonable to me, barring any other concerns that are aired.
Just FYI, I had to #if 0 out ShmOpen and ShmUnlink implementations to get it linking for dotnet-cli. Please let me know when this is ready for PR so we can test this out.
I had to #if 0 out ShmOpen and ShmUnlink implementations to get it linking for dotnet-cli
Why? What was the problem?
shm_open and shm_unlink weren't found if I just exported the System.Native.so as a static library.
Are we supposed to link differently? I saw this option: -lrt
Are we supposed to link differently? I saw this option: -lrt
Yes, those functions are exported from librt, so one needs to link with -lrt, e.g. see http://linux.die.net/man/3/shm_open.
System.Native.so is part of the System.Console package.
This is not correct. System.Native.so is currently part of the Microsoft.NETCore.Runtime.CoreCLR packages.
We already have https://github.com/dotnet/corefx/issues/2302#issuecomment-156132918 tracking pulling that out of the runtime package and packaging shims independently.
If this is indeed tracking inclusion of some new .a file in the same package that includes the .so, please outline the requirements for the .a file.
Where does it build? What is it? What does the build system need to do with it? All of these will influence how it is packaged.
@stephentoub could you please help answering @ericstj question if we need to include the .a and .dylib files too?
I thought I already did :smile: :
the real request is for the .a to be in whatever package includes the corresponding .so / .dylib / etc. I don't have any fundamental concerns with that. How much would we expect it'll increase the size of the relevant package? My assumption is not by very much, in which case seems reasonable to me, barring any other concerns that are aired.
I've not heard an answer to the question from @gkhanna79, but assuming including the .a's addresses the concern and no one raises any other concerns with it, sounds fine.
Where does it build? What is it?
They'd be built at the same time as the .so / .dylib. .so is for dynamic linking whereas .a is for static linking.
@stephentoub Yes, including the .a should address the concern. The question that will remain is knowing which nuget package will contain them :)
@gkhanna79 from Eric's comment
We already have dotnet/runtime#14821 (comment) tracking pulling that out of the runtime package and packaging shims independently.
This is done and now the package is in myget and also containing the static library (.a).
@schellap is going to do the integration in corert to consume such packages
@schellap @tarekgh Is there a corresponding issue for updating CoreRT repo to consume this?
@schellap @gkhanna79 I have created a new issue in corert and linked it to this issue. the new issue track the work of integrating System.Native to corert toolchain