-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
CrossGen2 musl nupkg embeds the libc host #73908
Comments
Tagging subscribers to this area: @hoyosjs Issue DetailsDescriptionCrossGen2 6.0.8 nupkg links to wrong libc on Unfortunately it seems that it wasn't fixed here, as to this day the error still occurs. Reproduction Steps$ wget 'https://globalcdn.nuget.org/packages/microsoft.netcore.app.crossgen2.linux-musl-arm64.6.0.8.nupkg'
$ unzip microsoft.netcore.app.crossgen2.linux-musl-arm64.6.0.8.nupkg
$ ldd tools/crossgen2
/lib/ld-linux-aarch64.so.1 (0xffffb84a3000)
libpthread.so.0 => /lib/ld-linux-aarch64.so.1 (0xffffb84a3000)
libdl.so.2 => /lib/ld-linux-aarch64.so.1 (0xffffb84a3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xffffb8282000)
libm.so.6 => /lib/ld-linux-aarch64.so.1 (0xffffb84a3000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xffffb825d000)
libc.so.6 => /lib/ld-linux-aarch64.so.1 (0xffffb84a3000)
Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by tools/crossgen2) Expected behaviorShould link to Actual behaviorRather links to Regression?I've been keeping track of the fix, waiting for it to eventually apply to the Known WorkaroundsDoes not occur when built via source-build on Alpine environment. See package available at via ConfigurationNo response Other informationNo response
|
linux-musl-arm64
/ linux-musl-arm
environment links to wrong libc
@mangod9 I haven't tested if this only affects 6.0 |
It is fixed in v7: $ ldd 7.0.0-preview.7.22375.6/tools//crossgen2
/lib/ld-musl-aarch64.so.1 (0x4000000000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x4002572000)
libz.so.1 => /lib/libz.so.1 (0x4002762000)
libc.musl-aarch64.so.1 => /lib/ld-musl-aarch64.so.1 (0x4000000000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x4002789000)
# vs.
$ ldd 6.0.8/tools/crossgen2
/lib/ld-linux-aarch64.so.1 (0x4000000000)
libpthread.so.0 => /lib/ld-linux-aarch64.so.1 (0x4000000000)
libdl.so.2 => /lib/ld-linux-aarch64.so.1 (0x4000000000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40018df000)
libm.so.6 => /lib/ld-linux-aarch64.so.1 (0x4000000000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x4001acf000)
libc.so.6 => /lib/ld-linux-aarch64.so.1 (0x4000000000)
Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by 6.0.8/tools/crossgen2) so we would need to backport it manually to v6 branch, since in v6, the issue is not related to AOT vs. singlefile but rather the configuration which affects the compile step. |
@ayakael, if you could apply https://github.com/dotnet/runtime/pull/73986.patch and test whether it fixes the issue in Alpine distro package, that would be great. |
Yup, it works on my side when crossbuilding from x64 to aarch64. Testing armv7 now. Thanks :) |
Is there any way to set a system-level nuget |
There's ways to modify that behavior, namely a global nuget config (granted that can be overridden) or an env variable |
One way is to add a 'package source' entry in the system-level nuget default config <?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="OfficialDistroPackages" value="/path/to/directory/containing/system-level-*.nupkg-files" />
</packageSources>
</configuration> A more versatile way (with degree more complexity) is to host nuget repository for your distro https://docs.microsoft.com/en-us/nuget/hosting-packages/overview, add the feed URL in |
Description
CrossGen2 6.0.8 nupkg links to wrong libc on
linux-musl-arm64
/linux-musl-arm
environment.Unfortunately it seems that it wasn't fixed here, as to this day the error still occurs.
Reproduction Steps
Expected behavior
Should link to
ld-linux-musl-aarch64.so.1
Actual behavior
Rather links to
ld-linux-aarch64.so.1
Regression?
I've been keeping track of the fix, waiting for it to eventually apply to the
crossgen2
nuget packages. It never did.Known Workarounds
Does not occur when built via source-build on Alpine environment. See package available at via
https://dl-cdn.alpinelinux.org/alpine/edge/community/arm64/dotnet6-bootstrap-artifacts-6.0.108-r2.apk
(tar package, available at `./usr/lib/dotnet/artifacts/6.0.108/microsoft.netcore.app.crossgen2.linux-musl-arm64.6.0.8.nupkg)Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: