scrcpy: "zsh: illegal hardware instruction scrcpy"
relatively fresh Catalina install with fresh Homebrew and scrcpy install is throwing the following error:
bin % scrcpy
2020-03-23 11:18:15.448 scrcpy[715:16382] INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
* daemon not running; starting now at tcp:5037
* daemon started successfully
/usr/local/Cellar/scrcpy/1.12.1/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 4.5 MB/s (26202 bytes in 0.006s)
2020-03-23 11:18:16.302 scrcpy[715:16382] INFO: Initial texture: 1080x2160
zsh: illegal hardware instruction scrcpy
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 22
I just did a
brew upgrade scrcpy
to install v1.13 and it’s working!I’m trying to build the dev branch but getting this error:
same when I build the release version of the main branch:
[edit] uninstalling JDK14 and installing JDK8 in the hopes that building will work…and I’m getting further:
ugh, still erroring out in debug mode with adb push
should I get gdb running instead of lldb?
But I don’t understand why you get
ERROR: "adb push" exited unexpectedly
only while debugging.I am running Catalina on (technically) unsupported Mac. See the message about Failed to obtain Metal device? That might be the clue. Something in the toolchain you’re using is not compatible with my patched Catalina install 😦
Before debugging, it must at least work “normally”:
(without
lldb
)justs sits there not crashing:
lldb
instead ofgdb
?I got so close:
Use the
dev
branch instead ofmaster
, it will try another port automatically.OK, great, so you reproduce with your own build 👍
Now, build in debug mode and run with gdb:
In the
gdb
prompt, typer
then Enter.When it crashes, type
bt
then Enter.everytime it aborts it leaves a copy s̶c̶r̶c̶p̶y̶ adb running which I need to manually kill or else I get a could not listen error. Anyway, after doing that:
Once you
meson x …
, you must build withninja -Cx
.Then, to run, execute:
meson configure x
didn’t work butrm -rf x
did but I’m still getting:how do I know I’m using the compiled version as opposed to the brew version?
[edit] I guess because it’s running server out of …/share/… instead of …/Cellar/…?
Your
meson
command did nothing, becausex
already existed.Either use
meson configure x …
or justrm -rf x
and retry.I am in way over my head:
results in:
now I’m trying to figure out how to install JDK…
No: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#prebuilt-server
do I need to build the server? [edit] and to install Android SDK, do I need to download and install the whole Android IDE?
[edit2] this problem seems to be related to Catalina as I had run older versions of scrcpy on this same iMac when it was running High Sierra.
Anyway, I’m trying to build it and the server now.
Unless you trigger some undefined behavior 😕
If you can build it in debug and reproduce, I’m interested.
It seems the binary you’re running uses CPU instructions not supported by your CPU 😕
It should work if you build it from your computer directly: https://github.com/Genymobile/scrcpy/blob/master/BUILD.md