TkinterWeb icon indicating copy to clipboard operation
TkinterWeb copied to clipboard

Tkinterweb is not compactible with AARCH64

Open funicat1 opened this issue 2 years ago • 12 comments

Hello, I am trying to make a web browser with Tkinterweb
But, I got this error:

_tkinter.TclError: couldn't load file "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/tkinterweb/tkhtml/Linux/64-bit/Tkhtml30.so": dlopen failed: "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/tkinterweb/tkhtml/Linux/64-bit/Tkhtml30.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)

How to fix this?

funicat1 avatar Jul 05 '23 12:07 funicat1

Hi! Thanks for submitting a bug report. I'm away for the summer and don't have access to a computer, but I will defenitely look into this in September when I return. I hope this isn't too much of a nuisance.

Andereoo avatar Jul 05 '23 13:07 Andereoo

Hi @simpleuserdontwatch the fixes for #24 may have fixed this. Try upgrading TkinterWeb and let me know if it works.

Andereoo avatar Nov 20 '23 14:11 Andereoo

still not fixed. There's an another exception, if you need it, then here is it:

Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/temp_iiec_codefile.py", line 8, in <module>
    frame = HtmlFrame(root) #create HTML browser
            ^^^^^^^^^^^^^^^
  File "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/htmlwidgets.py", line 56, in __init__
    self.html = html = TkinterWeb(self, message_func, HtmlFrame)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/bindings.py", line 116, in __init__
    load_tkhtml(master, folder, force=True)
  File "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/utilities.py", line 992, in load_tkhtml
    master.tk.eval("package require Tkhtml")
_tkinter.TclError: couldn't load file "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/64-bit/libTkhtml3.0.so": dlopen failed: "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/64-bit/libTkhtml3.0.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)

funicat1 avatar Nov 21 '23 06:11 funicat1

That's weird... Can you replace the file data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/64-bit/libTkhtml3.0.so with the one from /data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/arc/libTkhtml3.0.so and let me know what happens?

Andereoo avatar Nov 21 '23 12:11 Andereoo

That's weird... Can you replace the file data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/64-bit/libTkhtml3.0.so with the one from /data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/arc/libTkhtml3.0.so and let me know what happens?

cp: can't stat '/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/arc/libTkhtml3.0.so': No such file or directory

funicat1 avatar Nov 21 '23 17:11 funicat1

It looks like you're not using the latest version of TkinterWeb. It should be version 3.23.5. Try upgrading, and let me know what happens.

Andereoo avatar Nov 21 '23 17:11 Andereoo

It looks like you're not using the latest version of TkinterWeb. It should be version 3.23.5. Try upgrading, and let me know what happens.

Its already at last version..

/storage/emulated/0 $ pip install -U tkinterweb
Requirement already satisfied: tkinterweb in /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages (3.23.5)
Requirement already satisfied: pillow in /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages (from tkinterweb) (10.1.0)

funicat1 avatar Nov 22 '23 04:11 funicat1

Oops... my bad. The file to copy is in tkinterweb/tkhtml/Linux/arm/ and not tkinterweb/tkhtml/Linux/arc.

On Tue, Nov 21, 2023, 11:59 p.m. Simpleuser @.***> wrote:

It looks like you're not using the latest version of TkinterWeb. It should be version 3.23.5. Try upgrading, and let me know what happens.

Its already at last version..

/storage/emulated/0 $ pip install -U tkinterweb Requirement already satisfied: tkinterweb in /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages (3.23.5) Requirement already satisfied: pillow in /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages (from tkinterweb) (10.1.0)

— Reply to this email directly, view it on GitHub https://github.com/Andereoo/TkinterWeb/issues/74#issuecomment-1822117450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMA4CXSHVINNLCKD4FWIG4DYFWBE5AVCNFSM6AAAAAAZ65DSNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRSGEYTONBVGA . You are receiving this because you commented.Message ID: @.***>

Andereoo avatar Nov 22 '23 12:11 Andereoo

I just did it, but it still errors with a different error:

Traceback (most recent call last):
  File "/data/user/0/ru.iiec.pydroid3/files/temp_iiec_codefile.py", line 8, in <module>
    frame = HtmlFrame(root) #create HTML browser
            ^^^^^^^^^^^^^^^
  File "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/htmlwidgets.py", line 56, in __init__
    self.html = html = TkinterWeb(self, message_func, HtmlFrame)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/bindings.py", line 116, in __init__
    load_tkhtml(master, folder, force=True)
  File "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/utilities.py", line 992, in load_tkhtml
    master.tk.eval("package require Tkhtml")
_tkinter.TclError: couldn't load file "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/64-bit/libTkhtml3.0.so": dlopen failed: "/data/data/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/tkinterweb/tkhtml/Linux/64-bit/libTkhtml3.0.so" is 32-bit instead of 64-bit

funicat1 avatar Nov 23 '23 08:11 funicat1

It looks like I need to compile the underlying HTML engine for arch64 Linux systems. It might be a while before I have the time to work this out. If you would like, you are always welcome to try compiling it yourself from https://github.com/Andereoo/TkinterWeb-Tkhtml/tree/main. The commands should be more or less as follows:

TCL=/usr
export PATH=$TCL/bin:$PATH
cd TkinterWeb-Tkhtml
tclsh src/cssprop.tcl && tclsh src/tokenlist.txt & tclsh src/mkdefaultstyle.tcl > htmldefaultstyle.c
mv *.c src && mv *.h src
mkdir build && cd build
sudo ../configure CC="gcc -static-libgcc" --with-tcl=$TCL/lib/tcl8.6 --with-tk=$TCL/lib/tk8.6 --with-tclinclude=$TCL/include/tcl8.6 --with-tkinclude=$TCL/include/tcl8.6
make

Andereoo avatar Nov 24 '23 14:11 Andereoo

It looks like I need to compile the underlying HTML engine for arch64 Linux systems. It might be a while before I have the time to work this out. If you would like, you are always welcome to try compiling it yourself from https://github.com/Andereoo/TkinterWeb-Tkhtml/tree/main. The commands should be more or less as follows:

TCL=/usr
export PATH=$TCL/bin:$PATH
cd TkinterWeb-Tkhtml
tclsh src/cssprop.tcl && tclsh src/tokenlist.txt & tclsh src/mkdefaultstyle.tcl > htmldefaultstyle.c
mv *.c src && mv *.h src
mkdir build && cd build
sudo ../configure CC="gcc -static-libgcc" --with-tcl=$TCL/lib/tcl8.6 --with-tk=$TCL/lib/tk8.6 --with-tclinclude=$TCL/include/tcl8.6 --with-tkinclude=$TCL/include/tcl8.6
make

Okay, I will try doing it.

funicat1 avatar Nov 29 '23 05:11 funicat1

Perhaps wheels for each arch could be provided in releases

Aareon avatar Dec 03 '23 17:12 Aareon