Skip to content

dotnet-install.sh dependency checks are incorrect #6

Closed

Description

@Gnbrkm41

When I build the coreclr component, I get dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib. soon after the script starts running, even though I do have zlib installed and the build finishes without any error.

This also appears to be happening in CI builds as well, as can be seen here: https://dev.azure.com/dnceng/public/_build/results?buildId=614751&view=logs&j=2336a351-be5a-5f79-bbfa-f7a178b0fa04&t=faf0c5b5-f158-5102-6aff-48775dc0e8ed&l=24

It seemed to not cause any problems, but it's odd to see the warning there.

Activity

  1. ViktorHofer commented on Apr 28, 2020

    @ViktorHofer
    Member

    Funny that this comes up today as we just merged a documentation update regarding zlib: dotnet/runtime@efc260c 😁

  2. Gnbrkm41 commented on Apr 28, 2020

    @Gnbrkm41
    Author

    I noticed it before (around 2~3 weeks ago? that's when I attempted to build coreclr on Linux for the first time) as well; it's just that I forgot to raise an issue until I saw the PR you mentioned 😄

  3. jkotas commented on Apr 28, 2020

    @jkotas
    Member

    Still, this looks like a bug in the dotnet-install.sh script. The warning won't go away even if you install the -dev package you have added in dotnet/runtime@efc260c

    dotnet-install.sh does not seem to check the presence dependencies correctly. There are number of other problems, e.g. it checks for libcurl that is no longer required, etc.

  4. jkotas commented on Apr 28, 2020

    @jkotas
    Member

    Moving to SDK repo where the dotnet-install.sh script lives currently.

    Related: https://github.com/dotnet/arcade/issues/5152

  5. transferred this issue fromdotnet/runtimeon Apr 28, 2020
  6. ViktorHofer commented on Apr 28, 2020

    @ViktorHofer
    Member

    Still, this looks like a bug in the dotnet-install.sh script. The warning won't go away even if you install the -dev package you have added in dotnet/runtime@efc260c

    I agree and I noticed the same behavior locally a few weeks ago.

  7. transferred this issue fromdotnet/sdkon May 19, 2020
  8. changed the title [-]`Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.` during CI / local builds[/-] [+]Script fails to detect installed dependency(zlib), it also requires tools (libcurl) that are not needed[/+] on May 26, 2020
  9. donJoseLuis commented on May 26, 2020

    @donJoseLuis
    Contributor

    The need tracked in this issue should is tracked as a lower priority item under the re-engineering effort. Moving to the re-engineering project.

  10. changed the title [-]Script fails to detect installed dependency(zlib), it also requires tools (libcurl) that are not needed[/-] [+]Failure detecting installed dependency(zlib), also requiring tools (libcurl) that are not needed[/+] on May 28, 2020
  11. donJoseLuis commented on May 28, 2020

    @donJoseLuis
    Contributor

    Tracking the "requiring of tools that are not needed" separately, in #36

  12. changed the title [-]Failure detecting installed dependency(zlib), also requiring tools (libcurl) that are not needed[/-] [+]Failure detecting installed dependency(zlib)[/+] on May 28, 2020
  13. 1 remaining item

  14. Cuniq commented on Jun 8, 2020

    @Cuniq

    @yatli changing zlib to libz solved everything

  15. anirugu commented on Aug 25, 2020

    @anirugu

    Does anyone know how to fix it, I am not able to install either zlib or libz. same for the command given to all package. How I can solve it on ubuntu 20.

  16. Cuniq commented on Aug 25, 2020

    @Cuniq

    @anirugu try sudo apt install zlib1g

  17. danmoseley commented on Aug 31, 2020

    @danmoseley

    I have done sudo apt install zlib1g and that is probably correct per @Cuniq above and the documentation here

    However the script checks with ldconfig -v | grep zlib and that does not appear to find it. I am guessing this is expected.

    In general as pointed out above the script does not check for everything required
    https://github.com/dotnet/install-scripts/blob/master/src/dotnet-install.sh#L270-L274
    \eg for Ubuntu they are listed here
    https://github.com/dotnet/install-scripts/blob/master/src/dotnet-install.sh#L270-L274

    The title of this issue should perhaps be "dotnet-install.sh dependency checks are incorrect"

  18. changed the title [-]Failure detecting installed dependency(zlib)[/-] [+]dotnet-install.sh dependency checks are incorrect[/+] on Aug 31, 2020
  19. SamuelJohnsonMedia commented on Oct 7, 2020

    @SamuelJohnsonMedia

    This needs resolving on Github Actions too.

  20. added a commit that references this issue on Oct 27, 2020
  21. self-assigned this
    on Oct 29, 2020
  22. AR-May commented on Oct 29, 2020

    @AR-May
    Member

    The installation script does not resolve dependencies, so this warning is a part of the dependencies check. It concerns dotnet, not the script itself, so there is no reason for the script to fail.

    Dependencies check indeed has problems. We decided to remove it and instead always ask the customer to visit the documentation page and to check the dependencies listed there.

  23. added a commit that references this issue on Oct 29, 2020
  24. AR-May commented on Nov 2, 2020

    @AR-May
    Member

    @SamuelJohnsonMedia, is there anything we can do to help you with this:

    This needs resolving on Github Actions too.

    Or this is something your team can fix internally?

  25. SamuelJohnsonMedia commented on Nov 2, 2020

    @SamuelJohnsonMedia

    Or this is something your team can fix internally?

    Not something we can fix; its an issue with the GitHub action as it emits this warning when using the script on Ubuntu 18.04:

    /home/runner/work/_actions/actions/setup-dotnet/v1.7.2/externals/install-dotnet.sh --version 5.0.100-rc.2.20479.15
    dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
    dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.2.20479.15/dotnet-sdk-5.0.100-rc.2.20479.15-linux-x64.tar.gz
    dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.2.20479.15/dotnet-sdk-5.0.100-rc.2.20479.15-linux-x64.tar.gz
    dotnet-install: Adding to current process PATH: `/home/runner/.dotnet`. Note: This change will be visible only when sourcing script.
    dotnet-install: Installation finished successfully.
    /home/runner/.dotnet:/opt/hostedtoolcache/node/12.19.0/x64/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/opt/pipx_bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    

    On Ubuntu 20 we get an additional warning:

    /home/runner/work/_actions/actions/setup-dotnet/v1.7.2/externals/install-dotnet.sh --version 5.0.100-rc.2.20479.15
    dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
    dotnet_install: Warning: Unable to locate liblttng. Probable prerequisite missing; install libcurl.
    dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.2.20479.15/dotnet-sdk-5.0.100-rc.2.20479.15-linux-x64.tar.gz
    dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-rc.2.20479.15/dotnet-sdk-5.0.100-rc.2.20479.15-linux-x64.tar.gz
    dotnet-install: Adding to current process PATH: `/home/runner/.dotnet`. Note: This change will be visible only when sourcing script.
    dotnet-install: Installation finished successfully.
    /home/runner/.dotnet:/opt/hostedtoolcache/node/12.19.0/x64/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/opt/pipx_bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    
  26. AR-May commented on Nov 6, 2020

    @AR-May
    Member

    I see. Well, I suppose we do not hit this issue with GitHub actions anymore: these were only warnings that we showed and now they are removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions