Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tkinterweb is not compactible with AARCH64 #74

Open
simpleuserdontwatch opened this issue Jul 5, 2023 · 12 comments
Open

Tkinterweb is not compactible with AARCH64 #74

simpleuserdontwatch opened this issue Jul 5, 2023 · 12 comments

Comments

@simpleuserdontwatch
Copy link

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?

@Andereoo
Copy link
Owner

Andereoo commented Jul 5, 2023

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
Copy link
Owner

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

@simpleuserdontwatch
Copy link
Author

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)

@Andereoo
Copy link
Owner

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?

@simpleuserdontwatch
Copy link
Author

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

@Andereoo
Copy link
Owner

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.

@simpleuserdontwatch
Copy link
Author

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)

@Andereoo
Copy link
Owner

Andereoo commented Nov 22, 2023 via email

@simpleuserdontwatch
Copy link
Author

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

@Andereoo
Copy link
Owner

Andereoo commented Nov 24, 2023

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

@simpleuserdontwatch
Copy link
Author

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.

@Aareon
Copy link

Aareon commented Dec 3, 2023

Perhaps wheels for each arch could be provided in releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants