Closed makermelissa closed 1 year ago
I tried installing from source and ran into the same issue.
Same result on using "pip install tts" on Raspberry Pi 4B and latest 64 bit Bullseye Desktop from Feb 21, 2023. No issues or errors with installing from pip. Typing tts with anything or by itself comes back with "illegal instruction"
Just to clarify when looking at your title change - There is no bug or error report when installing. It is only when you type in "tts" after the successful install Same issue with latest Ubuntu for Raspberry Pi 64 bit. It adds a couple words afterwards "Illegal instruction (core dump)"
Correct. I didn't test it, but my guess would be it may only work correctly on 32-bit. Unfortunately, I have other required packages that only work on 64-bit.
Ok. Will give 32 bit a try and confirm
Ok. Will give 32 bit a try and confirm
Working?
No. Same result
On Mon, Apr 10, 2023, 9:07 p.m. Resat @.***> wrote:
Ok. Will give 32 bit a try and confirm
Working?
β Reply to this email directly, view it on GitHub https://github.com/coqui-ai/TTS/issues/2455#issuecomment-1502658856, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2UKW5ABA2673SSR43KQA3XATKG3ANCNFSM6AAAAAAWF2JU2M . You are receiving this because you commented.Message ID: @.***>
Arrived here via Phoenix10.1. Some basic debugging shows a problem with pytorch:
marto@shemp:~/TTS $ gdb --args python /home/marto/.local/bin/tts
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...
(No debugging symbols found in python)
(gdb) r
Starting program: /usr/bin/python /home/marto/.local/bin/tts
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ff55a91c0 (LWP 1386)]
[New Thread 0x7ff4da81c0 (LWP 1387)]
[New Thread 0x7ff05a71c0 (LWP 1388)]
[New Thread 0x7feb43a1c0 (LWP 1389)]
[New Thread 0x7fe8c391c0 (LWP 1390)]
[New Thread 0x7fe64381c0 (LWP 1391)]
[Thread 0x7fe64381c0 (LWP 1391) exited]
[Thread 0x7fe8c391c0 (LWP 1390) exited]
[Thread 0x7feb43a1c0 (LWP 1389) exited]
[Thread 0x7ff05a71c0 (LWP 1388) exited]
[Thread 0x7ff4da81c0 (LWP 1387) exited]
[Thread 0x7ff55a91c0 (LWP 1386) exited]
[Detaching after fork from child process 1393]
Thread 1 "python" received signal SIGILL, Illegal instruction.
0x0000007fd71243ac in std::string::_Rep::_M_dispose(std::allocator<char> const&) [clone .part.0] ()
from /home/marto/.local/lib/python3.9/site-packages/torch/lib/../../torch.libs/libarm_compute-5d3d2ba2.so
(gdb) disassemble
Dump of assembler code for function _ZNSs4_Rep10_M_disposeERKSaIcE.part.0:
0x0000007fd7124380 <+0>: adrp x2, 0x7fd757e000
0x0000007fd7124384 <+4>: ldr x2, [x2, #1384]
0x0000007fd7124388 <+8>: cbnz x2, 0x7fd71243a4 <_ZNSs4_Rep10_M_disposeERKSaIcE.part.0+36>
0x0000007fd712438c <+12>: ldr w2, [x0, #16]
0x0000007fd7124390 <+16>: sub w3, w2, #0x1
0x0000007fd7124394 <+20>: str w3, [x0, #16]
0x0000007fd7124398 <+24>: cmp w2, #0x0
0x0000007fd712439c <+28>: b.le 0x7fd71243b4 <_ZNSs4_Rep10_M_disposeERKSaIcE.part.0+52>
0x0000007fd71243a0 <+32>: ret
0x0000007fd71243a4 <+36>: add x3, x0, #0x10
0x0000007fd71243a8 <+40>: mov w2, #0xffffffff // #-1
=> 0x0000007fd71243ac <+44>: ldaddal w2, w2, [x3]
0x0000007fd71243b0 <+48>: b 0x7fd7124398 <_ZNSs4_Rep10_M_disposeERKSaIcE.part.0+24>
0x0000007fd71243b4 <+52>: b 0x7fd6e60000 <_ZNSs4_Rep10_M_destroyERKSaIcE@plt>
End of assembler dump.
(gdb)
python -c "import torch;print(torch.__version__)"
throws the error. This issue has been patched. If I can get it to build from source on the pi I'll report back.
Nice sleuthing. I know Q-Engineering has instructions for building Pytorch on 64 bit bullesye on Pi4 but I thought a prebuilt wheel would suffice
I'll follow this thread and see where it goes.
Nice sleuthing. I know Q-Engineering has instructions for building Pytorch on 64 bit bullesye on Pi4 but I thought a prebuilt wheel would suffice
I'll follow this thread and see where it goes.
I'm not a python guy, if there's some pre-compiled version of bleed pytorch I'm happy to install and try. It's building now, but it's a slow process, I'll leave it running, hopefully it doesn't die. I won't have sufficient spare time to setup a cross compiling environment for a while.
Their github page has a wheel for PyTorch 1.13 (64 bit Bullseye - and Python 3.9) on Google Drive
If yours craps out I'll give it a shot
Instructions
$ sudo apt-get update $ sudo apt-get upgrade
install the dependencies (if not already onboard)
$ sudo apt-get install python3-pip libjpeg-dev libopenblas-dev libopenmpi-dev libomp-dev
above 58.3.0 you get version issues
$ sudo -H pip3 install setuptools==58.3.0 $ sudo -H pip3 install Cython
install gdown to download from Google drive
$ sudo -H pip3 install gdown
Bullseye OS
download the wheel
$ gdown https://drive.google.com/uc?id=1uLkZzUdx3LiJC-Sy_ofTACfHgFprumSg
install PyTorch 1.13.0
$ sudo -H pip3 install torch-1.13.0a0+git7c98e70-cp39-cp39-linux_aarch64.whl
clean up
$ rm torch-1.13.0a0+git7c98e70-cp39-cp39-linux_aarch64.whl
@mitchind that doesn't look like it has been updated since December, so this won't have been backported.
Ahh okay @MartinMcGrath - I admit I'm out of my element here Are you saying we need an older version of pytorch? Or all the dependencies have to be recompiled to match this version?
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
gets around the pytorch 'illegal instruction' problem, cloning TTS and installing from source threw some errors about dependency versions. You may need to upgrade numpy and numba packages, the TTS builds fine and a command line test produces the expected output.
diff requirements.txt requirements.orig
2c2
< numpy==1.24.3;python_version<"3.10"
---
> numpy==1.21.6;python_version<"3.10"
47a48
>
Thanks @MartinMcGrath - when you say "the TTS builds fine", you were able to use pip install tts aftewards? Or you did the git clone and build from there after torch installs?
@mitchind as above clone the repo, edited requirements, potential numpy and numba version issues, and TTS built fine without issue.
@MartinMcGrath - thanks - I'm did give this a shot Just confirmed it will work as you described - steps I took below
_1. pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.
Describe the bug
After installation via PyPI according to the instructions, when trying to run tts from the command line or importing into python, it results in "Illegal instruction". This is installed on a Raspberry Pi running the latest 64-bit Bullseye Lite. I'm wondering if it won't run on 64-bit or something.
To Reproduce
Install in on a Raspberry Pi running the latest 64-bit Bullseye Lite via PyPI according to the instructions and then try to do anything with it.
Expected behavior
It should work
Logs
No response
Environment
Additional context
No response