Skip to content

CrossGen2 musl nupkg embeds the libc host #73908

Open
@ayakael

Description

@ayakael

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

$ 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 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions