TkinterWeb icon indicating copy to clipboard operation
TkinterWeb copied to clipboard

/32-bit/Tkhtml30.so: cannot open shared object file: No such file or directory

Open WGandy opened this issue 2 years ago • 18 comments

Trying to install on a raspberry pi zero running 'Lite' but with openbox and lightdm. This is with the latest Bullseye distribution.

I added some try - except code to find some issues and ran into this one. I see the file in the directory so it doesn't appear to be that.

/home/pi/.local/lib/python3.9/site-packages/tkinterweb/tkhtml/Linux/32-bit/Tkhtml30.so": /home/pi/.local/lib/python3.9/site-packages/tkinterweb/tkhtml/Linux/32-bit/Tkhtml30.so: cannot open shared object file: No such file or directory

It took a bit of snooping but I also found another earlier issue. I had to install libopenjp2-7. I was getting a non-descriptive import error.

WGandy avatar Nov 25 '21 21:11 WGandy

Hi,

That's quite odd. Unfortunately, 32-bit Linux hasn't been tested on very much. After installing libopenjp2-7, does this package work as expected?

Andereoo avatar Nov 26 '21 19:11 Andereoo

I'm sorry. Poor communication on my part - I should have posted 2 different issues. Here is a link to the issue related to the libopenjp2-7: https://github.com/Andereoo/TkinterWeb/issues/25

With regard to the error in the title of this issue, I have not found a solution. As stated, the Tkhtml30.so does indeed appear to exist where it's supposed to be. It seems that this is a "nested" error message (inherited?) and that the "No such file or directory" message is referencing a resource which has not been explicitly identified. We will have to investigate.

WGandy avatar Nov 27 '21 16:11 WGandy

No problem!

Could you make a Python file in your TkinterWeb directory and run the below code for me?

import os, glob

def searchdir():
    files = glob.glob("**/**", recursive=True)
    for file in files:
        path = os.path.join(".", file)
        size = os.path.getsize(path)
        print(file, end=":\n")
        print("   Size: {}".format(size))
        if path.endswith(".tcl"):
            with open(path, "r") as handle:
                content = handle.read()
                print("   Content: \n{}".format(content))
        print()

searchdir()

If you could upload the output, that would be great. It should help rule out whether or not something went wrong with the installation.

Andereoo avatar Nov 28 '21 13:11 Andereoo

Give this a try.
anderoo_results.txt

WGandy avatar Nov 29 '21 19:11 WGandy

It looks like all of the files are in the right places. I think this may be related to #25. I'll come back to this when we work out the other thread.

Andereoo avatar Feb 02 '22 12:02 Andereoo

I rebuilt the latest release of tkhtml on my raspberry pi and have gotten past this error, I have attached the files. Interesting note to add: The files work for me in /lib/Tkhtml3.0 (which is the install folder) but not in the tkinterweb folder

However I have now ran into a segfault in the built shared object, at least it's progress I guess. tkhtml_linux_32.zip

sakloui avatar Feb 15 '22 14:02 sakloui

Managed to find this github: https://github.com/olebole/tkhtml3 After building it seems to work perfectly for me so here are the files: Tkhtml3.0.zip

Again these are located in /lib/Tkhtml3.0 for me, not the tkinterweb folder so your usage may vary

sakloui avatar Feb 16 '22 13:02 sakloui

Hi!

Sorry for the late response. I'm glad that you have found a version that works. I have uploaded one of my versions (which has some modifications that TkinterWeb uses to prevent crashes). If you have a chance I would appreciate it if you could try compiling it and letting me know what happens. The source is here. Also, could you please let me know what your architecture is?

Thanks!

Andereoo avatar Feb 16 '22 13:02 Andereoo

I'll try it out right now, thanks. I'm running this on a raspberry pi 4 32-bit

sakloui avatar Feb 16 '22 13:02 sakloui

Built and runs fine, no crashes or segfaults. Thanks a lot! Let me know if I can be of any use with something else.

sakloui avatar Feb 16 '22 13:02 sakloui

That's great to know. If you have a chance, I'd appreciate it if you could help me out with a couple of things.

  1. Could you please attach the output of arch and uname -m.
  2. Seeing as you have compiled Tkhtml on your own, I'm guessing that you have Tcl/Tk installed. Try running Tcl (if I remember correctly the command should be tclsh). Then use the load command to load the default tkinterweb/tkhtml/Linux/32-bit/Tkhtml30.so file. Let me know what happens.
  3. If you could also upload the new .so file that you compiled with the code I uploaded that would be great.

Thank you very much!

Andereoo avatar Feb 18 '22 00:02 Andereoo

Can do, but it will have to be next week when I'm back in the office.

sakloui avatar Feb 18 '22 08:02 sakloui

No worries! Whenever you get a chance.

Andereoo avatar Feb 18 '22 12:02 Andereoo

arch/uname -m both give "armv7l" trying to load the original Tkhtml30.so gives: "cannot open shared object file: No such file or directory" tkinterweb_build_tkhtml.zip

sakloui avatar Feb 22 '22 09:02 sakloui

Thanks! It looks like most Linux distros support either i386 or x86-64 packages (TkinterWeb supplies both). Raspberry pi, though, instead uses the ARM architecture (it's more cost-efficient) and seems to have no support for most other Linux packages. When you run TkinterWeb, it checks the OS and finds that it is running a 32-bit OS, and so tries to load the i386 Tkhtml library, which is unsupported by P (I'm still not entirely sure why the error is No such file or directory when the file actually exists but instead is incompatible).

I'm going to add the armv7l package and look for an efficient way to get TkinterWeb to discern the difference between i386 and armv7l so that we can fix this problem.

Andereoo avatar Feb 22 '22 14:02 Andereoo

Hi! Apologies for the (very long) delay. I've added a binary for Raspberry Pi. Let me know if it works now!

Andereoo avatar Nov 12 '23 22:11 Andereoo

Hey! Thanks for the update :) Sadly the project was put on hold, so I'm no longer working on it. However I'll see if I can get a quick setup running sometime this week.

sakloui avatar Nov 13 '23 15:11 sakloui

No worries; @WGandy let me know if the update works!

Andereoo avatar Nov 14 '23 13:11 Andereoo