Repository navigation
Closed
Description
Alpine 3.11.3 on WSL2
danmose3:~/git/tmp# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.11.3
PRETTY_NAME="Alpine Linux v3.11"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
Installing 5.0 with dotnet-install.sh leaves me with a broken dotnet:
[2020/08/20 21:03:10][INFO] $ /root/git/performance/tools/dotnet/x64/dotnet-install.sh -InstallDir /root/git/performance/tools/dotnet/x64 -Architecture x64 -Channel master
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate libintl. Probable prerequisite missing; install libintl (or gettext).
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate libicu. Probable prerequisite missing; install libicu.
[2020/08/20 21:03:11][INFO] dotnet_install: Warning: Unable to locate liblttng. Probable prerequisite missing; install libcurl.
[2020/08/20 21:03:11][INFO] dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.1.20420.14/dotnet-sdk-5.0.100-rc.1.20420.14-linux-musl-x64.tar.gz
...
[2020/08/20 21:03:14][INFO]
[2020/08/20 21:03:15][INFO] dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.1.20420.14/dotnet-sdk-5.0.100-rc.1.20420.14-linux-musl-x64.tar.gz
[2020/08/20 21:03:18][INFO] dotnet-install: Adding to current process PATH: `/root/git/performance/tools/dotnet/x64`. Note: This change will be visible only when sourcing script.
[2020/08/20 21:03:18][INFO] dotnet-install: Installation finished successfully.
...
[2020/08/20 21:03:26][INFO] $ dotnet --info
[2020/08/20 21:03:26][INFO] Error loading shared library libstdc++.so.6: No such file or directory (needed by /root/git/performance/tools/dotnet/x64/dotnet)
[2020/08/20 21:03:26][INFO] Error loading shared library libgcc_s.so.1: No such file or directory (needed by /root/git/performance/tools/dotnet/x64/dotnet)
[2020/08/20 21:03:26][INFO] Error relocating /root/git/performance/tools/dotnet/x64/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm: symbol not found
[2020/08/20 21:03:26][INFO] Error relocating /root/git/performance/tools/dotnet/x64/dotnet: _ZNKSt5ctypeIcE13_M_widen_initEv: symbol not found
[2020/08/20 21:03:26][INFO] Error relocating /root/git/performance/tools/dotnet/x64/dotnet: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc: symbol not found
.. etc...
By running these commands, I fixed it:
danmose3:~/git/tmp# apk add libstdc++
danmose3:~/git/tmp# apk add libgcc
BUG: It should warn me that libstdc++ and libgcc are missing since apparently these are required for dotnet to run on Alpine.
POSSIBLE OTHER ISSUE: When I try to install the prerequisites it does recommend, two don't install:
danmose3:~/git/tmp# apk add libintl zlib libicu liblttng
ERROR: unsatisfiable constraints:
libicu (missing):
required by: world[libicu]
liblttng (missing):
required by: world[liblttng]
Metadata
Metadata
Assignees
Labels
No labels
Activity
danmoseley commentedon Aug 20, 2020
Per https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/master/src/alpine/3.12/helix/amd64/Dockerfile#L41
So in summary, for Alpine, dotnet-install should recommend
icuor maybeicu-libsinstead oflibiculttng-usgapparently instead ofliblttnglibstdc++libgccAlso consider moving these warnings to install dependencies AFTER the download, at teh END of dotnet-install.sh. At least on Alpine, the download creates 100's and 100's of lines of progress messages. After that it untars and tries to run and fails as above. It's likely most people won't scroll way back and spot the warnings about dependencies.
bekir-ozturk commentedon Aug 26, 2020
@danmosemsft This is not just an install script issue, but can also be seen if one downloads the archive from downloads page and extracts it, right? I don't see how we are communicating these requirements to the people visiting our downloads page.
danmoseley commentedon Sep 3, 2020
Agreed - I suggest you reach out to @leecow for his thoughts about that page when he returns next week. However, I don't think that should prevent us improving the script. We are never going to prevent every missed dependency scenario but if we can make some effort to help people be successful, within reason we should. Folks running the install script are obviously customers we care a great deal about (and worked hard to get to this point) and in many cases they aren't dedicated to the .NET platform yet -- if they run the script and doing quickly get to successfully running
dotnet, some proportion will give up and do something else. Of course, you're well aware of that and I realize that argument can apply to almost any improvement we make to the scripts. 😸My other argument is that the script already attempts to remind folks of missing dependencies, we should at least not do it inaccurately such as suggesting they install something that does not exist on their distro and we should know does not exist.
AR-May commentedon Oct 23, 2020
@danmosemsft, @bozturkMSFT and I thought a bit about how to resolve this problem.
I see that we actually have a lot of problems checking for the prerequisites: it seems they are listed only for ubuntu, and even for ubuntu they are out of date. As you said, checking all prerequisites for each possible case is not actually desired. Moreover, I am not sure I like how we check that we do have a prerequisite: we try to check that there is a command word installed with the prerequisite (for example,
lttngforliblttng). This does not work in the case of libraries that do not install any command.So, what if we remove these checks and instead at the very end of the installation (right before "Installation finished successfully."), we always will say something like "Please check the dependencies: <link to docs, depending on OS>"?
For Alpine, for example, we could show the following link to the docs: "https://docs.microsoft.com/en-us/dotnet/core/install/linux-alpine#dependencies". I believe this should be the right place for checking the dependencies. What do you think of this?
AR-May commentedon Oct 26, 2020
I got it wrong, nevermind the comment above.
@grinrag, could you please take a look at this issue?
genalt commentedon Oct 26, 2020
@danmosemsft this
dotnet-install.shscript has a developer purpose. If we would install dotnet via a package manager, it will resolve all the dependencies. So, it just checks the library cache and tries to find all the necessary libraries by their names.Again, we just check that the required libraries, to link with dotnet, present on the system. Developers should prepare their system themselves before running this script.
If there is any missing library, we print a warning with the
nameof this library. For some distros, the name of a library and package, which provides this library can mismatch. I'm not experienced with Alpine Linux, but looks like this is the case here. It's similar to CentOS when you need to installopenssl-libsRPM package to getlibsslinstalled.danmoseley commentedon Oct 26, 2020
I think it would be fine to no longer check for dependencies (since as you say it's always going to be incomplete/not easy) and just link to the docs with a reminder to check dependencies. That could be https://docs.microsoft.com/en-us/dotnet/core/install/linux or it could be the specific distro's doc.
issues dotnet#72, dotnet#6, dotnet#36: removing dependencies check, a…
issues dotnet#72, dotnet#6, dotnet#36: removing dependencies check, a…
AR-May commentedon Nov 2, 2020
Fixed