Something weird happens when using the Rover tool with the System.Data.SqlClient DLL. It is there in the RHEL source payload, but not in the built package.
This could be an issue with my project.json file, I will have to investigate further.
project.json
Could you paste in deps from your file / some steps to reproduce maybe? So we can try different packages, compare, ...
The application is basic demo with Microsoft SQL Server.
Running with COREHOST_TRACE=1 I think I am onto this issue:
The targeted framework does not support the runtime 'fedora.25-x64'. Some native libraries from [runtime.win7-x86.runtime.native.System.Data.SqlClient.sni/4.0.1] may fail to load on this platform. The targeted framework does not support the runtime 'fedora.25-x64'. Some native libraries from [System.Data.SqlClient/4.1.0] may fail to load on this platform. The targeted framework does not support the runtime 'fedora.25-x64'. Some native libraries from [System.Net.NetworkInformation/4.1.0] may fail to load on this platform. The targeted framework does not support the runtime 'fedora.25-x64'. Some native libraries from [System.IO.Pipes/4.0.0] may fail to load on this platform. The targeted framework does not support the runtime 'fedora.25-x64'. Some native libraries from [runtime.win7-x64.runtime.native.System.Data.SqlClient.sni/4.0.1] may fail to load on this platform.
So it detects the runtime correctly and that is probably the reason why it doesn't work.
Another interesting development, changing VERSION_ID in /etc/os-release to 24 for example, makes the dotnet --info to report that version and not rhel-7.2.
/etc/os-release
dotnet --info
Fixed it by modifying:
/usr/lib64/dotnetcore/sdk/1.0.0-preview2-1-003175/.version
-rhel.7.2-x64 +fedora.25-x64
and added Fedora 25 RID to /usr/lib64/dotnetcore/shared/Microsoft.NETCore.App/1.1.0/Microsoft.NETCore.App.deps.json:
/usr/lib64/dotnetcore/shared/Microsoft.NETCore.App/1.1.0/Microsoft.NETCore.App.deps.json
+ "fedora.25-x64": [ + "fedora.25", + "fedora-x64", + "fedora", + "linux-x64", + "linux", + "unix-x64", + "unix", + "any", + "base" + ],
SqlClient unix native DLL gets loaded, application works then.
This also results in the correct RID being reported to dotnet --info:
[nmilosev@toshiba-x70-a dotnetcore]$ dotnet --info .NET Command Line Tools (1.0.0-preview2-1-003175) Product Information: Version: 1.0.0-preview2-1-003175 Commit SHA-1 hash: bb053ed000 Runtime Environment: OS Name: fedora OS Version: 25 OS Platform: Linux RID: fedora.25-x64
I would like to implement patches so this is done automatically in our packages until we have F25 RID in the upstream as a compatibility workaround.
Please advise @rhea @omajid
This issue can be closed now :)
@nmilosev Can you add the f25 RID to corefx at build time? See https://github.com/dotnet/corefx/blob/master/pkg/Microsoft.NETCore.Platforms/runtime.json and https://github.com/dotnet/corefx/blob/master/pkg/Microsoft.NETCore.Platforms/readme.md. Here's what an example patch adding RHEL 7.3 RID looks like: https://github.com/dotnet/corefx/pull/15006/files
Finishing this up at the moment. Also the debuginfo patch is done. New package tonight or tomorrow morning. :)
This was a bit of a headscratcher.
So, adding F25 and F26 to runtimes.json isn't enough, I had to patch the payload as well, because the supported runtimes of Microsoft.NETCore.App (the deps.json file) seem to get carried over. I'm not sure how to rebuild this. It is a nuget package?
I patch on both places now (before the build), it's probably not necessary but just to be sure. Both patches and the new spec file are in the tree. The dotnet --info returns correct RID and my test application for SqlClient works perfectly.
https://copr.fedorainfracloud.org/coprs/nmilosev/dotnet-clean/build/510147/
Please reinstall the package, I didn't bump the version number.
New packages:
https://copr-be.cloud.fedoraproject.org/results/nmilosev/dotnet-clean/fedora-25-x86_64/00510147-dotnetcore/
Metadata Update from @rhea: - Issue tagged with: bug
This has been fixed. Closing! :)
Metadata Update from @rhea: - Issue assigned to nmilosev - Issue tagged with: bug
Login to comment on this ticket.