czimaginginstitute / MotionCor3

Anisotropic correction of beam induced sample motion for cryo-electron microscopy and tomography
BSD 3-Clause "New" or "Revised" License
41 stars 2 forks source link

libtiff.so.6 links persistently, although it's not on my system #7

Closed walidabualafia closed 7 months ago

walidabualafia commented 8 months ago

Hi,

I've been trying to get MotionCor3 working for the past hour, but seems like something in the makefile is not working. I am using makefile11.

Whenever I run the compilation step, it succeeds. It compiles all the necessary files, then echoes that MotionCor3 has been generated.

Now when I try to run ./MotionCor3, I get this error back:

./MotionCor3: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory

Weirdly, when I run ls /usr/lib64 | grep tiff, I see the following:

libtiff.so
libtiff.so.5
libtiff.so.5.3.0
libtiffxx.so
libtiffxx.so.5
libtiffxx.so.5.3.0

I tried specifying the path to my libtiff install manually, but it failed and threw lots and lots of compiler errors.

I'm certain I do not have libtiff.so.6 installed anywhere in my system. I manually listed and checked each path in my LD_LIBRARY_PATH. Do you know where the compiler is picking up this version of libtiff?

A quick search shows that the required version ships with Arch Linux/OpenSUSE distributions. I'm compiling on RHEL8.

Any help would be appreciated. :)

Thanks, Walid

szhengczii commented 8 months ago

@walidabualafia, when I run ldd on MotionCor3 executable, this is what I got: libtiff.so.6 => /home/shawn.zheng/miniconda3/lib/libtiff.so.6 (0x00007ff131667000)

This is the line in my .bashrc file: export LD_LIBRARY_PATH="$HOME/miniconda3/lib:$LD_LIBRARY_PATH"

walidabualafia commented 8 months ago

Hi Shawn,

Thanks for your response. I was able to get past this error by obtaining libtiff from Conda.

However, I am now running into this new error: ./MotionCor3: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory

Please note that I tried compiling with CUDA 11.0, CUDA 11.2, and CUDA 11.4 and got the same error each time. Which version of CUDA did you use?

Thanks for your help! Walid

szhengczii commented 8 months ago

Hi Walid,

Have you added the path to LD_LIBRARY_PATH?

Best, Shawn

On Mon, Nov 6, 2023 at 8:18 AM Walid Abu Al-Afia @.***> wrote:

Hi Shawn,

Thanks for your response. I was able to get past this error by obtaining libtiff from Conda.

However, I am now running into this new error: ./MotionCor3: error while loading shared libraries: libcuda.so.1: cannot open shared object file: No such file or directory

Please note that I tried compiling with CUDA 11.0, CUDA 11.2, and CUDA 11.4 and got the same error each time. Which version of CUDA did you use?

Thanks for your help! Walid

— Reply to this email directly, view it on GitHub https://github.com/czimaginginstitute/MotionCor3/issues/7#issuecomment-1795333344, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBUDUPYS6OCVGEUKD3JGKUDYDEEW5AVCNFSM6AAAAAA6YK3CCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGMZTGMZUGQ . You are receiving this because you commented.Message ID: @.***>

walidabualafia commented 8 months ago

Yeah, it is in my LD_LIBRARY_PATH. When I check my $CUDA_HOME/lib directory, I don't have the libcuda.so.1 file. The closest thing I have is libcudart.so. I checked all versions of CUDA, never really had a problem running them with any other app. Maybe I can try to install the same CUDA version you're running. What your output for nvcc --version?

Thanks for the support, Shawn. Walid

szhengczii commented 8 months ago

@walidabualafia: what do you see when you run "ldd MotionCor3"? what does libcuda.so.1 point to? This is what I have. libcuda.so.1 => /lib64/libcuda.so.1 (0x00007f3c71eb1000)

Below is the output of "nvcc --version". nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0

walidabualafia commented 8 months ago

@szhengczii: thanks again. My output for ldd MotionCor3 shows libcuda.so.1 => /path/to/cuda/install/lib64/libcuda.so.1 (0x0000155553647000)

My nvcc --version is 11.4. Any idea how I can get MotionCor3 running?

szhengczii commented 8 months ago

@walidabualafia: I guess you may have multiple cuda versions installed. I am guessing that you compiled with cuda 11.4 but do not have cuda 11.4 library added to LD_LIBRARY_PATH. What do you see when you run "echo $LD_LIBRARY_PATH"?

walidabualafia commented 7 months ago

@szhengczii: The only Cuda in my path is 11.4, as you can see below:

/cm/local/apps/cuda/libs/current/lib64:/cm/shared/apps/cuda11.4/toolkit/11.4.2/targets/x86_64-linux/lib:/other/apps/in/my/LD_LIBRARY_PATH

I also compiled the bin with this version of Cuda.

When I ran ldd again, I noticed that I am getting:

 libtiff.so.6 => not found

I am running on RHEL8. The version installed on my system is libtiff.so.5. Do you know where I can install this exact version of the library? I think that would be great help. I looked online, but could not find many resources to point me. I compiled AreTomo2 on the same system and it runs fine.

Thanks! :)

walidabualafia commented 7 months ago

Ok, I was able to get it working by installing an older libtiff from Conda. Thanks for the help! :)