Open yolowex opened 2 months ago
The snap packages are created/maintained by third party users. It seems there is an up-to-date version here: https://snapcraft.io/scrcpy-updated
compiling from source is hard (believe me i tried)
Even with install_release.sh
? https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version
@rom1v Thank you for your fast response.
Even with
install_release.sh
? https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version
yes, after using that, it seemed that multiple dependencies had to be installed on my os, using apt, and because this was not explicitly mentioned in the installation guide I did not proceed with the instructions provided by the scrcpy installation script. just to be on the safe side and keep my os clean.
The snap packages are created/maintained by third party users. It seems there is an up-to-date version here: https://snapcraft.io/scrcpy-updated
I used this, as a guide for my installation process.
it seems that it does not mention that the package held under the scrcpy
name is deprecated. it also doesn't mention the updated version at all.
Could I have the honor of submitting a pull request to fix that?
it seemed that multiple dependencies had to be installed on my os, using apt, and because this was not explicitly mentioned in the installation guide I did not proceed with the instructions provided by the scrcpy installation script.
It is mentioned in:
First, you need to install the required packages
But ok.
Could I have the honor of submitting a pull request to fix that?
Sure :+1:
I'm a bit confused by https://snapcraft.io/scrcpy-updated though, how from this site can we find the sources of the snap?
I'm a bit confused by https://snapcraft.io/scrcpy-updated though, how from this site can we find the sources of the snap?
I'm not familiar with the snap ecosystem either, but i think installing it and checking the local app files would suffice, as snap packages are sandboxed and there aren't many options to download for the same package (for example i think cpu architecture and possibly linux distro dont matter?)
okay i tried scrcpy-updated and it doesnt work. after installation where i try to run it, it has multiple missing dependencies (dynamic libraries).
ldd /snap/scrcpy-updated/61/usr/local/bin/scrcpy
linux-vdso.so.1 (0x00007ffc405cd000)
libavformat.so.58 => not found
libavcodec.so.58 => not found
libavutil.so.56 => not found
libswresample.so.3 => not found
libSDL2-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007fe99b56f000)
libavdevice.so.58 => not found
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fe99b54d000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe99b368000)
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007fe99b257000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe99b175000)
libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007fe99b120000)
libsamplerate.so.0 => /lib/x86_64-linux-gnu/libsamplerate.so.0 (0x00007fe99afb0000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fe99ae6c000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fe99ae57000)
libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fe99ae4a000)
libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007fe99ae36000)
libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fe99ae2e000)
libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fe99ae1f000)
libXss.so.1 => /lib/x86_64-linux-gnu/libXss.so.1 (0x00007fe99ae1a000)
libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fe99ae03000)
libgbm.so.1 => /lib/x86_64-linux-gnu/libgbm.so.1 (0x00007fe99adf2000)
libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fe99aded000)
libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fe99addb000)
libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fe99adcf000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fe99ad87000)
libdecor-0.so.0 => /lib/x86_64-linux-gnu/libdecor-0.so.0 (0x00007fe99ad7c000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fe99ad38000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe99b82f000)
libpulsecommon-16.1.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-16.1.so (0x00007fe99acb1000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fe99ac58000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fe99ac2d000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fe99ac20000)
libwayland-server.so.0 => /lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007fe99ac0a000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fe99abdf000)
libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007fe99abcb000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fe99abbe000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fe99abb2000)
libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007fe99ab26000)
libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fe99ab21000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fe99aa38000)
libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007fe99aa31000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fe99aa2c000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fe99aa24000)
libFLAC.so.12 => /lib/x86_64-linux-gnu/libFLAC.so.12 (0x00007fe99a9c0000)
libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007fe99a991000)
libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007fe99a8e6000)
libopus.so.0 => /lib/x86_64-linux-gnu/libopus.so.0 (0x00007fe99a400000)
libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007fe99a8dc000)
libmpg123.so.0 => /lib/x86_64-linux-gnu/libmpg123.so.0 (0x00007fe99a87f000)
libmp3lame.so.0 => /lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007fe99a807000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fe99a7f0000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fe99a7e1000)
i tried to manually install them with apt but no help. solution to this was not provided in their snapcraft page, neither in google.
@rom1v also, this is what happens when i try to build it on my own machine:
└─$ ./install_release.sh
[scrcpy] Downloading prebuilt server...
--2024-08-13 10:44:30-- https://github.com/Genymobile/scrcpy/releases/download/v2.6.1/scrcpy-server-v2.6.1
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/111583593/4dbb38d6-abfd-40ed-884e-b0cfcfda0f47?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240813%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240813T071339Z&X-Amz-Expires=300&X-Amz-Signature=ab27c9b90f9d75796863d17dc7ba838e186f78847c93ea59431014e25e81785a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v2.6.1&response-content-type=application%2Foctet-stream [following]
--2024-08-13 10:44:31-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/111583593/4dbb38d6-abfd-40ed-884e-b0cfcfda0f47?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240813%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240813T071339Z&X-Amz-Expires=300&X-Amz-Signature=ab27c9b90f9d75796863d17dc7ba838e186f78847c93ea59431014e25e81785a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v2.6.1&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 142.54.189.106
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|142.54.189.106|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71112 (69K) [application/octet-stream]
Saving to: ‘scrcpy-server’
scrcpy-server 100%[==========================================================================================>] 69.45K 162KB/s in 0.4s
2024-08-13 10:44:33 (162 KB/s) - ‘scrcpy-server’ saved [71112/71112]
[scrcpy] Verifying prebuilt server...
scrcpy-server: OK
[scrcpy] Building client...
The Meson build system
Version: 1.5.1
Source dir: /home/pickle/forks/scrcpy
Build dir: /home/pickle/forks/scrcpy/build-auto
Build type: native build
Project name: scrcpy
Project version: 2.6.1
C compiler for the host machine: cc (gcc 13.3.0 "cc (Debian 13.3.0-3) 13.3.0")
C linker for the host machine: cc ld.bfd 2.42.90.20240720
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
Run-time dependency libavformat found: YES 60.16.100
Run-time dependency libavcodec found: YES 60.31.102
Run-time dependency libavutil found: YES 58.29.100
Run-time dependency libswresample found: YES 4.12.100
sdl2-config found: NO need ['>= 2.0.5']
Found CMake: /usr/bin/cmake (3.29.6)
Run-time dependency sdl2 found: NO (tried pkgconfig, config-tool and cmake)
app/meson.build:111:4: ERROR: Dependency "sdl2" not found, tried pkgconfig, config-tool and cmake
A full log can be found at /home/pickle/forks/scrcpy/build-auto/meson-logs/meson-log.txt
┌──(pickle㉿bizness)-[~/forks/scrcpy]
└─$ apt list | grep sdl2-config
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
┌──(pickle㉿bizness)-[~/forks/scrcpy]
└─$ apt list | grep libsdl2
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libsdl2-2.0-0/kali-rolling,now 2.30.5+dfsg-1 amd64 [installed,automatic]
libsdl2-dev/kali-rolling 2.30.5+dfsg-1 amd64
libsdl2-doc/kali-rolling 2.30.5+dfsg-1 all
libsdl2-gfx-1.0-0/kali-rolling 1.0.4+dfsg-5+b1 amd64
libsdl2-gfx-dev/kali-rolling 1.0.4+dfsg-5+b1 amd64
libsdl2-gfx-doc/kali-rolling 1.0.4+dfsg-5 all
libsdl2-image-2.0-0/kali-rolling,now 2.8.2+dfsg-1+b1 amd64 [installed,automatic]
libsdl2-image-dev/kali-rolling 2.8.2+dfsg-1+b1 amd64
libsdl2-image-tests/kali-rolling 2.8.2+dfsg-1+b1 amd64
libsdl2-mixer-2.0-0/kali-rolling,now 2.8.0+dfsg-1+b2 amd64 [installed,automatic]
libsdl2-mixer-dev/kali-rolling 2.8.0+dfsg-1+b2 amd64
libsdl2-net-2.0-0/kali-rolling 2.2.0+dfsg-2+b1 amd64
libsdl2-net-dev/kali-rolling 2.2.0+dfsg-2+b1 amd64
libsdl2-tests/kali-rolling 2.30.5+dfsg-1 amd64
libsdl2-ttf-2.0-0/kali-rolling,now 2.22.0+dfsg-1 amd64 [installed,automatic]
libsdl2-ttf-dev/kali-rolling 2.22.0+dfsg-1 amd64
as you can see libsdl2 is already installed but the script suggests that it is not
As I was right, it was a version conflict problem with my java.
by using the following command, I managed to change the java version of my system and then the problem was solved.
└─$ sudo update-alternatives --config java
[sudo] password for pickle:
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-23-openjdk-amd64/bin/java 2311 auto mode
* 1 /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1711 manual mode
2 /usr/lib/jvm/java-23-openjdk-amd64/bin/java 2311 manual mode
Press <enter> to keep the current choice[*], or type selection number:
┌──(pickle㉿bizness)-[~]
└─$
I just installed scrcpy from snap on my os. this is its version version
but the current version in development is 2.6.1! what is the reason for this?
compiling from source is hard (believe me i tried), and there are no .deb packages to simplify the installation process. apt packages are no longer maintained, and the currently provided scrcpy in snap is deprecated.
here is my neofetch in case you need it