OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

ImportError: libtcl8.5.so: cannot open shared object file: No such file or directory

Open gbrown40 opened this issue 2 years ago • 18 comments

When trying to run files that use opendbpy, I get this error: Traceback (most recent call last): File "src/odb/test/python/08-write_lef_and_def_test.py", line 1, in <module> import opendbpy as odb File "/usr/local/lib/python3.8/dist-packages/opendbpy/__init__.py", line 1, in <module> from ._opendbpy import * ImportError: libtcl8.5.so: cannot open shared object file: No such file or directory libtcl8.5 appears to be obsolute, so I cannot install it, and installing libtcl8.6 does not fix the issue.

gbrown40 avatar Aug 22 '22 17:08 gbrown40

Did you build OR youself? If so, you must have it installed or you couldn't have linked OR in the first place.

maliberty avatar Aug 22 '22 17:08 maliberty

I have built OR successfully both by hand and with the support script.

gbrown40 avatar Aug 22 '22 18:08 gbrown40

Then your LD_LIBRARY_PATH needs to point to the location of your tcl library.

maliberty avatar Aug 22 '22 18:08 maliberty

I don't think the tcl library is installed. At least I cannot find it in /usr/local/lib or anywhere else.

gbrown40 avatar Aug 22 '22 18:08 gbrown40

You couldn't have built OR if it wasn't installed. When you run cmake do you see a line like:

-- TCL library: /usr/lib64/libtcl.so

maliberty avatar Aug 22 '22 18:08 maliberty

Found it. I added it to the path, but am still getting the same error. I think because the version of libtcl installed when building is 3.6.

gbrown40 avatar Aug 22 '22 19:08 gbrown40

The cmake line above should tell you which one is being picked up. You can also use ldd on the executable to see what it is expecting.

maliberty avatar Aug 22 '22 20:08 maliberty

When running cmake, it lists TCL library: /usr/lib/x86_64-linux-gnu/libtcl.so, but looking in /usr/lib/x86_64-linux-gn it lists libtcl.so and libtcl8.6.so. Running ldd on the executable shows "libtcl8.5.so => not found".

gbrown40 avatar Aug 22 '22 21:08 gbrown40

When it links openroad you can see the -L and -l it uses for tcl. What do you see?

maliberty avatar Aug 22 '22 21:08 maliberty

I don't see -L or -l anywhere in the build process.

gbrown40 avatar Aug 22 '22 21:08 gbrown40

Do you see a line with "-o openroad"? That is the link line, look for a mention of libtcl

maliberty avatar Aug 22 '22 22:08 maliberty

It lists /usr/lib/x86_64-linux-gnu/libtcl.so

gbrown40 avatar Aug 22 '22 23:08 gbrown40

Are you running ldd on the same binary? That's what it is linked with...

maliberty avatar Aug 22 '22 23:08 maliberty

Running ldd for the openroad executable shows libtcl8.6.so => /usr/lib/x86_64-linux-gnu/libtcl8.6.so. The issue is with opendbpy which appears to want libtcl8.5.so

gbrown40 avatar Aug 22 '22 23:08 gbrown40

What commit of OR are you using?

maliberty avatar Aug 22 '22 23:08 maliberty

/usr/local/lib/python3.8/dist-packages/opendbpy/__init__.py

@gbrown40 did you install opendbpy with pip install or similar? This looks to be getting a system version of opendbpy not the version you built from the OR source code.

vvbandeira avatar Aug 22 '22 23:08 vvbandeira

@vvbandeira I used pip to install opendbpy

gbrown40 avatar Aug 25 '22 19:08 gbrown40

@maliberty I currently have commit 49fdec96d3cefaa9e5c3b39b6dd1e33bcc7f0d24 from August 3.

gbrown40 avatar Aug 25 '22 19:08 gbrown40

Hi @gbrown40, could you try with the latest commit. We recently merged #2375 which might help your issue. Also, you probably should remove the pip version since is very old -- it has not been updated in over a year.

vvbandeira avatar Oct 17 '22 17:10 vvbandeira

Closing due to lack of activity. Please open a new issue in case the problem is still relevant and occurring with the latest commit.

vvbandeira avatar Nov 28 '22 10:11 vvbandeira