FS#77016 - [python-pytorch-opt-cuda] Missing libtiff dependency breaks PyTorch

Attached to Project: Community Packages
Opened by bruce (brucethemoose) - Thursday, 05 January 2023, 19:17 GMT
Last edited by Toolybird (Toolybird) - Thursday, 05 January 2023, 22:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The latest build of PyTorch won't function at all due to a missing libtiff library:

>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/torch/__init__.py", line 218, in <module>
from torch._C import * # noqa: F403
ImportError: libtiff.so.5: cannot open shared object file: No such file or directory
>>>


Checking the libtorch binary:

❯ ldd /usr/lib/libtorch.so | grep tiff
libtiff.so.5 => not found
libtiff.so.6 => /usr/lib/libtiff.so.6 (0x00007fa9ad135000)


And libtiff:

❯ pacman -Fl libtiff | grep libtiff.so
libtiff usr/lib/libtiff.so
libtiff usr/lib/libtiff.so.6
libtiff usr/lib/libtiff.so.6.0.0


Oddly enough, libtiff is not a listed requirement for pytorch even though it is built against it.
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 05 January 2023, 22:27 GMT
Reason for closing:  Works for me
Comment by Doug Newgard (Scimmia) - Thursday, 05 January 2023, 20:25 GMT
ldd isn't telling you what you think it is. Use lddtree.
Comment by bruce (brucethemoose) - Thursday, 05 January 2023, 22:06 GMT
Some more info:

More info: this may or may not affect the regular pytorch packages (which dont require Nvidia graphics to test)

repro steps:

- install python-pytorch-opt-cuda
- enter "python" into a terminal
- enter "import torch" and the error will occur.


Pytorch worked fine a few days ago, but I'm not sure if the pytorch build or the recent libtiff update is the breaking point.
Comment by bruce (brucethemoose) - Thursday, 05 January 2023, 22:14 GMT
@Doug Newgard

❯ lddtree /usr/lib/libtorch.so | grep tiff
libtiff.so.6 => /usr/lib/libtiff.so.6

I have attached the full output.
Comment by bruce (brucethemoose) - Thursday, 05 January 2023, 22:17 GMT
Also, I don't really understand that output. I don't see the `libtiff.so.5` requirement that pytorch seems to want with regular lld.
Comment by Doug Newgard (Scimmia) - Thursday, 05 January 2023, 22:18 GMT
The grep makes it useless.

From the attached file, the only thing pulling in libtiff is /usr/lib/libcairo-gobject.so.2, which is already linked to the correct version.

What you're seeing is almost certainly a partial update error.
Comment by bruce (brucethemoose) - Thursday, 05 January 2023, 22:21 GMT
Oh, issue appears to be fixed now. Closing...

Loading...