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

bootstrapping SDK on linux distro without libgcc/libstdc++ #2954

Closed
kqzkqz opened this issue Jul 31, 2022 · 2 comments
Closed

bootstrapping SDK on linux distro without libgcc/libstdc++ #2954

kqzkqz opened this issue Jul 31, 2022 · 2 comments
Labels
area-native-bootstrapping Allowing new platforms/operating systems to use source-build

Comments

@kqzkqz
Copy link

kqzkqz commented Jul 31, 2022

I'm currently attempting to build dotnet 6.0 on a distro that uses an LLVM toolchain instead of a GCC one, and therefore doesn't have libstdc++ and uses libc++ instead

following the build instructions, this ends up failing because it downloads a prebuilt SDK which links to this instead of libc++

~/dev/dotnet-6/installer $ ./build.sh /p:ArcadeBuildTarball=true /p:TarballDir=/home/dev/dotnet-6/sources
Downloading 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
Attempting to install dotnet from public_location.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.106/dotnet-sdk-6.0.106-linux-musl-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.106/dotnet-sdk-6.0.106-linux-musl-x64.tar.gz
dotnet-install: Installed version is 6.0.106
dotnet-install: Adding to current process PATH: `/home/dev/dotnet-6/installer/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.
Error loading shared library libstdc++.so.6: No such file or directory (needed by /home/dev/dotnet-6/installer//.dotnet/dotnet)
,,,
,,,
,,,
Build failed with exit code 127. Check errors above.

what is the process to build in such an environment? FWIW I was able to hack up the old buildbootstrapcli.sh and use the old bootstrap to new os instructions to get a (semi) working dotnet 3.1 SDK built, but I don't see a way to do the same for 6.0 and up, I also attempted to update that old bootscrap script to use the installer repo and updated the paths / commit detection, but it still prompts prompts for an SDK download.

is there a way forward for this or is this a bug with the current new build process?

@dotnet-issue-labeler dotnet-issue-labeler bot added area-native-bootstrapping Allowing new platforms/operating systems to use source-build untriaged labels Jul 31, 2022
@omajid
Copy link
Member

omajid commented Aug 2, 2022

There's some discussion at #2930 about bringing back the buildbootstrapcli.sh script in some form.

The current approach to this issue would to set up a cross compile environment. Then you can build in an environment that has the GCC toolchain and target an environment that has the llvm toolchain.

@MichaelSimons
Copy link
Member

[Triage] Closing as a duplicate of #2930. Feel free to continue the conversation there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-native-bootstrapping Allowing new platforms/operating systems to use source-build
Projects
None yet
Development

No branches or pull requests

3 participants