Could NOT find ZLIB while running cmake
0
0
Entering edit mode
4 months ago

Hlelo I'm trying to install racon on my server.

The issue is that I installed it with conda but when I run it I got an error so I decided to install it from source.

when I do that , one step is to run cmake:

cmake -DCMAKE_BUILD_TYPE=Release ..

But I have this error message:

CMake Error at
/data/laby/miniconda3/envs/racon/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230
(message):   Could NOT find ZLIB: Found unsuitable version "1.2.7",
but required is at   least "1.2.8" (**found /usr/lib64/libz.so**)
Call Stack (most recent call first):  
/data/laby/miniconda3/envs/racon/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:592
(_FPHSA_FAILURE_MESSAGE)  
/data/laby/miniconda3/envs/racon/share/cmake-3.21/Modules/FindZLIB.cmake:120
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)  
build/_deps/bioparser-src/CMakeLists.txt:22 (find_package)

it points out that it needs a higher version of zlib and it reads it on /usr/lib64/libz.so but I don't have super user permissions on my server so I want it to read it on my miniconda environment as I have installed zlib using conda: conda install zlib

So how can I tell to cmake to find the zlib file on my miniconda?

I tried configuring my LD_LIBRARY_PATH environment variable, I set it to :

/data/laby/miniconda3/envs/racon/x86_64-conda-linux-gnu/sysroot/usr/lib64

But I still got the above error message.

zlib cmake conda racon • 990 views
ADD COMMENT
1
Entering edit mode

I installed it with conda but when I run it I got an error so I decided to install it from source.

In my experience it's better to stick to one approach. Try installing with conda again and when it errors out, try resolving that error instead of changing the approach to a hybrid one (libraries from one approach, installation from a different one) from the get-go.

ADD REPLY
1
Entering edit mode
  1. LD_LIBRARY_PATH is for specifying shared library paths that will be accessed when executing your installed software. For compiling you want to use just LIBRARY_PATH - as a safe bet, always specify LD_LIBRARY_PATH and LIBRARY_PATH.
  2. I agree with Ram's suggestion of sticking with conda for managing the environment for this software in which case it would help to know what the original error was when trying to install via conda. You will want to add this new software to which ever environment you already installed zlib so make sure to activate the appropriate environment then add this software.
ADD REPLY
0
Entering edit mode

You can obtain zlib from https://www.zlib.net/ and compile it from source (Think it is ./configure --prefix <directory you have access>; make; make install). Then point the LD_LIBRARY_PATH to your zlib installation directory to make this work.

ADD REPLY

Login before adding your answer.

Traffic: 2777 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6