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

CrossGen2 nupkg on linux-musl-arm64 environment links to wrong libc #66791

Closed
ayakael opened this issue Mar 17, 2022 · 8 comments
Closed

CrossGen2 nupkg on linux-musl-arm64 environment links to wrong libc #66791

ayakael opened this issue Mar 17, 2022 · 8 comments
Labels
area-crossgen2-coreclr os-linux-musl Linux distributions using musl library.
Milestone

Comments

@ayakael
Copy link
Contributor

ayakael commented Mar 17, 2022

Description

CrossGen2 6.0.3 nupkg links to wrong libc on linux-musl-arm64 environment

Reproduction Steps

$ wget 'https://globalcdn.nuget.org/packages/microsoft.netcore.app.crossgen2.linux-musl-arm64.6.0.3.nupkg'
$ unzip microsoft.netcore.app.crossgen2.linux-musl-arm64.6.0.3.nupkg
$ ldd tools/crossgen2
	/lib/ld-linux-aarch64.so.1 (0xffff8fce9000)
	libpthread.so.0 => /lib/ld-linux-aarch64.so.1 (0xffff8fce9000)
	libdl.so.2 => /lib/ld-linux-aarch64.so.1 (0xffff8fce9000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xffff8fac8000)
	libm.so.6 => /lib/ld-linux-aarch64.so.1 (0xffff8fce9000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xffff8faa3000)
	libc.so.6 => /lib/ld-linux-aarch64.so.1 (0xffff8fce9000)
Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /home/build/.nuget/packages/microsoft.netcore.app.crossgen2.linux-musl-arm64/6.0.3/tools/crossgen2)

Expected behavior

Should link to ld-linux-musl-aarch64.so.1

Actual behavior

Rather links to ld-linux-aarch64.so.1

Regression?

No response

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/testing/armv7/dotnet6-bootstrap-artifacts-6.0.102-r1.apk (tar package, availabe at ./usr/share/dotnet/artifacts/6.0.102/microsoft.netcore.app.crossgen2.linux-musl-arm64.6.0.2.nupkg)

Configuration

No response

Other information

No response

@AaronRobinsonMSFT AaronRobinsonMSFT added area-crossgen2-coreclr os-linux-musl Linux distributions using musl library. labels Mar 17, 2022
@AaronRobinsonMSFT
Copy link
Member

/cc @mangod9 @dotnet/crossgen-contrib

@AaronRobinsonMSFT AaronRobinsonMSFT added the untriaged New issue has not been triaged by the area owner label Mar 17, 2022
@mangod9
Copy link
Member

mangod9 commented Mar 17, 2022

Thanks for reporting the issue @ayakael. Is this a new issue on 6.0.3?

@mangod9 mangod9 added this to the 6.0.x milestone Mar 17, 2022
@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label Mar 17, 2022
@mangod9
Copy link
Member

mangod9 commented Mar 17, 2022

@janvorli has anything changed recently on musl builds?

@janvorli
Copy link
Member

No, nothing has changed. This looks like some higher level RID related issue.

@AaronRobinsonMSFT
Copy link
Member

/cc @agocke since the "RID" acronym was mentioned.

@agocke
Copy link
Member

agocke commented Mar 17, 2022

I don't think this is a RID issue -- the actual binary inside the package is linked to the wrong libc. I think either our packaging is wrong (it's pulling from the wrong directory) or the build is wrong (it's building against the wrong libc).

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 18, 2022
@am11
Copy link
Member

am11 commented Mar 18, 2022

It is the case of CrossBuild = true where we were computing wrong RID for CG2, and eventually picking up linux-arm64 apphost instead of linux-musl-arm64. Fixed by #66814.

@am11
Copy link
Member

am11 commented Apr 1, 2022

@ayakael, this issue should be fixed in latest main now that the bigger refactoring PR #65948 is merged. Please let me know if that's not the case. Thanks.

@am11 am11 closed this as completed Apr 1, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 1, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-crossgen2-coreclr os-linux-musl Linux distributions using musl library.
Projects
None yet
Development

No branches or pull requests

6 participants