MikeAxtell / ShortStack

ShortStack: Comprehensive annotation and quantification of small RNA genes
MIT License
88 stars 29 forks source link

ShortStack 4.0.0 does not install in ubuntu 22.04 #122

Closed cche closed 1 year ago

cche commented 1 year ago

Hi, I have problems installing the latest version of ShortStack.

conda install -n shortstack shortstack installs version 3.8.5

When I try to install with conda install -n shortstack shortstack=4.0.0

It does not install due to incompatibility issues: The following specifications were found to be incompatible with your system:

Your installed version is: 2.36

Does anybody know how to solve this problem?

Thanks Cristian

MikeAxtell commented 1 year ago

This isn't a ShortStack bug per se; it is a glib / libgcc issue on your machine. I'm not the best at figuring out library dependencies and I'm foggy on how libgcc-ng relates to __glibc. But I think these are issues with out of date or non-supported glibc / libgcc-ng libraries on your box.

You could try another machine.

Or you would try to install each of the ShortStack dependencies (samtools, cutadapt, bedtools, etc. .. they are listed in the README) yourself without using conda.

forrestbao commented 1 year ago

I have the same issue too!

AlineMuyle commented 1 year ago

We're having the same issue

cche commented 1 year ago

I've tested the installation on a ubuntu 22.10 machine which is up to date on all packages, ubuntu WSL 22.04 and on a Rocky linux machine, also up to date, and it does not install.

When trying the installation by hand, conda installs bowtie 1.0 and when I try to force the installation of bowtie 1.3 it gives a similar error as cited before (problem with gcc).

In the meantime, we did the analysis with version 3.8.5, but I would really like to be able to do future analyses with version 4.0.0 to be able to use all the latest additions and reduce calculation time.

Could you share your machine configuration to compare to what I'm using? Thanks!

MikeAxtell commented 1 year ago

Hi everyone, sorry about these problems. We are unable to reproduce them here, so I am groping in the dark for solutions. My primary testing device is one of Penn State's HPC clusters, which is running Red Hat Enterprise Linux 8.7. We have also tested successfully on various Mac laptops running both Intel and Silicon chipsets. None of us have encountered this error on any of our machines to date.

I believe this is a conda configuration issue of some kind. Here are some ideas to try, based on googling similar issues from other similarconda malfunctions:

MikeAxtell commented 1 year ago

I asked chatGPT and here's what it said:

This error message is indicating that the package you are trying to install has dependencies that require a specific version of the GNU C Library (glibc) that is not compatible with the version installed on your system.

One possible solution is to update your glibc to the required version. However, this is not recommended as it can potentially break other programs that rely on the current version of glibc.

An alternative solution is to create a new environment with a compatible version of glibc and install the package in that environment. To do this, follow these steps:

  1. Create a new conda environment with a compatible version of glibc. For example, if the package you are trying to install requires glibc version 2.17, you can create a new environment with that version using the following command:

conda create --name myenv linux-64::__glibc==2.17

  1. Activate the new environment:

conda activate myenv

  1. Install the package in the new environment:

conda install package_name

This should resolve the dependency issue and allow you to install the package in a separate environment.

MikeAxtell commented 1 year ago

More from chatGPT:

(Me): The error message says that version 2.17 or higher is required, but it also says that version 2.36 is installed. Can you explain why version 2.36 is not acceptable for a requirement of 2.17 or higher?

(chatGPT): Yes, I can explain that.

When a package specifies a minimum version requirement for a library, it expects that any version of the library equal to or greater than the minimum requirement will be compatible. However, in some cases, newer versions of a library may introduce changes that are not backward-compatible with the older versions, which can cause compatibility issues.

In the case of glibc, there are known cases where newer versions of the library have introduced backward-incompatible changes, which could cause issues with packages that were designed to work with an older version of glibc. Therefore, even though version 2.36 is higher than the minimum requirement of 2.17, it's possible that the package you're trying to install was not tested with glibc version 2.36 and therefore may not be compatible with it.

To ensure maximum compatibility and stability, it's generally recommended to use the exact version of the library specified by the package or a version that is known to be compatible.

MikeAxtell commented 1 year ago

@cche Here is the configuration of my machine, per your request. Note it using glibc version 2.28, which must be backwards compatible with the dependencies. However, it looks like the 2.36 version you all have is not backwards compatible with some of ShortStack 4.0.0's dependencies.

$ conda info

     active environment : ShortStack4
    active env location : /storage/home/mja18/work/miniconda3/envs/ShortStack4
            shell level : 2
       user config file : /storage/home/mja18/.condarc
 populated config files : /storage/home/mja18/.condarc
          conda version : 22.11.1
    conda-build version : not installed
         python version : 3.10.8.final.0
       virtual packages : __archspec=1=x86_64
                          __glibc=2.28=0
                          __linux=4.18.0=0
                          __unix=0=0
       base environment : /storage/home/mja18/work/miniconda3  (writable)
      conda av data dir : /storage/home/mja18/work/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /storage/home/mja18/work/miniconda3/pkgs
                          /storage/home/mja18/.conda/pkgs
       envs directories : /storage/home/mja18/work/miniconda3/envs
                          /storage/home/mja18/.conda/envs
               platform : linux-64
             user-agent : conda/22.11.1 requests/2.28.1 CPython/3.10.8 Linux/4.18.0-425.13.1.el8_7.x86_64 rhel/8.7 glibc/2.28
                UID:GID : 69299:69299
             netrc file : None
           offline mode : False
MikeAxtell commented 1 year ago

Two more thoughts on this for folks to try ...

Try using mamba instead of conda. mamba is said to give better / more helpful error messages when it fails to resolve dependencies. Overall I am leaning towards the idea that your very very recent Ubuntu builds, using glibc 2.36, are not backwards compatible with the indicated conda recipes for bowtie, etc. Anyway, give mamba a try.

Like I said, this is ultimately not a ShortStack issue, it is a conda / bioconda recipe issue (I think :)).

Lastly, conda is supposed to make package management easier, but it is not so in your specific cases. You can ignore conda, and instead manually build / compile from source all of the dependencies that ShortStack 4 needs in your own environment. Specifically, you'll need an environment with the following:

- python >=3.10.8
- samtools >=1.16
- bowtie >=1.3.1
- viennarna 2.*
- tqdm
- numpy
- biopython
- strucvis
- shorttracks
- bedtools
- cutadapt

ShortStack itself is just a python script and you grab the script from github and execute it, so long as the dependencies above are satisfied, it will work.

cche commented 1 year ago

This is solved for me!

I think my problem was a faulty configuration of my .condarc because I had problems a long time ago with another package. Maybe this was the problem? Somehow, declaring the channels on the command line didn't do the trick for me earlier.

Anyhow, after following the bioconda setup from scratch, by removing .condarc first, it now installs. I still have to use shortstack=4.0.0 otherwise it will try to install version 3.8.5, but that is no problem.

Thanks!

somnya commented 1 year ago

Hello!

I also did what you suggested about the .condarc file

Now it is working! Thank you so much :)

MikeAxtell commented 1 year ago
MikeAxtell commented 1 year ago

As of 8adb7b4 the README contains the fixes to these apparently common conda issues. So, I am closing this issue.