1

I am trying to install libBigWig, as it is as dependency of WiggleTools. libBigWig requires “zlib”, “bzip2” and “libcurl”, which I have them installed already. When I try to install libBigWig with the following commands:

git clone https://github.com/dpryan79/libBigWig.git
cd libBigWig
make install

I get the following:

/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -c -o io.o io.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -c -o bwValues.o bwValues.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -c -o bwRead.o bwRead.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -c -o bwStats.o bwStats.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -c -o bwWrite.o bwWrite.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-ar -rcs libBigWig.a io.o bwValues.o bwRead.o bwStats.o bwWrite.o
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-ranlib libBigWig.a
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -fpic -c -o io.pico io.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -fpic -c -o bwValues.pico bwValues.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -fpic -c -o bwRead.pico bwRead.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -fpic -c -o bwStats.pico bwStats.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -I. -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dp456/miniconda3/envs/py37/include -DNOCURL  -fpic -c -o bwWrite.pico bwWrite.c
/home/dp456/miniconda3/envs/py37/bin/x86_64-conda-linux-gnu-cc -shared  -o libBigWig.so io.pico bwValues.pico bwRead.pico bwStats.pico bwWrite.pico  -lm -lz
/home/dp456/miniconda3/envs/py37/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [Makefile:60: libBigWig.so] Error 1

Now, I am still at the beginning of my learning curve in informatics, but as far as I can understand, it seems to be an issue with the ld linker not finding zlib. This thread here "/usr/bin/ld: cannot find -lz" suggested installing:

sudo apt-get install zlib1g-dev
sudo apt-get install libz-dev
sudo apt-get install lib32z1-dev
sudo apt-get install zlib*

but the error still persists after trying all variations. What else can I do?? I also tried to install WiggleTools with conda, but that doesn't work as well, because there are several conflicts with other packages.

This is the OS of the server that I’m using it:

Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-197-generic x86_64)
Pramio-D
  • 29
  • 2
  • 1
    Perhaps try installing zlib from your current environment (`conda install zlib`) and retry installing the bigwig package? Do you still get the same error message? – jared_mamrot Aug 01 '23 at 00:48
  • @jared_mamrot Thanks for the reply! I got a different error message when I try `conda install zlib`. It gets stuck on this "solving environment" process for hours and then spits out a list of incompatibilities. The error message is something like this: `Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source` – Pramio-D Aug 02 '23 at 00:06
  • Then I went back to google this error and some people suggested `conda config --set channel_priority flexible`, but it didn't worked, same error message. I'm also trying `conda update --all --yes`, but I'm stuck at the same solving environment message for several hours. It seems like the only solution is to create a new conda environment, activate it and install the packages there. Do you recommend something else? – Pramio-D Aug 02 '23 at 00:06
  • 1
    Do you have packages installed in your base environment? I was advised to never install packages in your base env, and to have lots of smaller envs rather than large 'multi-purpose' envs (helps to avoid 'solving' problems like you describe). One option for fixing your conda problem is to save your envs (https://shandou.medium.com/export-and-create-conda-environment-with-yml-5de619fe5a2), reinstall miniconda, specify channel priorities (https://stackoverflow.com/questions/48547046/resetting-conda-channel-priorities), recreate your envs from the saved yaml files, and create a new 'bigwig' env. – jared_mamrot Aug 02 '23 at 00:42
  • I'll try that! But if I reinstall miniconda, will I be doing that only for my user, or will other server users also be affected by that? I just don't want to mess up the whole server, as it's already fucntioning funny every now and then. – Pramio-D Aug 02 '23 at 17:02
  • Did you install miniconda yourself? It looks like it's installed in `/home/dp456/miniconda` based on your error message. If that's your account, then I would imagine other users have their own conda installations and you can delete/reinstall. If that's a shared account, don't delete it as you will lose other users envs. Is there a server admin you can discuss this with? – jared_mamrot Aug 02 '23 at 21:40
  • Well, in the end I didn't needed to reinstall my conda. I just created a new environment and did the conda instalation of wiggletools and it worked just fine, haha. Thanks for the help, @jared_mamrot! – Pramio-D Aug 02 '23 at 21:58
  • Glad you solved your problem @Pramio-D :) – jared_mamrot Aug 03 '23 at 01:01

1 Answers1

1

The easiest fix is simply create a new conda environment, activate it, and do conda install -c bioconda wiggletools

Pramio-D
  • 29
  • 2