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

Kali Linux - Install Fail #42

Closed
BSuperfly opened this issue Mar 11, 2018 · 7 comments
Closed

Kali Linux - Install Fail #42

BSuperfly opened this issue Mar 11, 2018 · 7 comments
Labels

Comments

@BSuperfly
Copy link

BSuperfly commented Mar 11, 2018

Here is what I get on Ninja Install, on 4.14.0-kali3-amd64 #1 SMP Debian 4.14.17-1kali1 (2018-02-16) x86_64 GNU/Linux.

root@xxxx~/scrcpy/x# ninja install
[1/2] Generating scrcpy-server with a custom command.
(not invoking gradle, since we are root)
[1/2] Installing files.
Installing app/scrcpy to /usr/local/bin/scrcpy
Stripping target 'app/scrcpy'
Installing server/scrcpy-server.jar to /usr/local/share/scrcpy/scrcpy-server.jar
Traceback (most recent call last):
  File "/usr/bin/meson", line 37, in <module>
    sys.exit(main())
  File "/usr/bin/meson", line 34, in main
    return mesonmain.run(sys.argv[1:], launcher)
  File "/usr/share/meson/mesonbuild/mesonmain.py", line 323, in run
    sys.exit(run_script_command(args[1:]))
  File "/usr/share/meson/mesonbuild/mesonmain.py", line 279, in run_script_command
    return cmdfunc(cmdargs)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 375, in run
    do_install(datafilename)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 190, in do_install
    install_targets(d)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 314, in install_targets
    raise RuntimeError('File {!r} could not be found'.format(fname))
RuntimeError: File 'server/scrcpy-server.jar' could not be found
FAILED: meson-install 
/usr/bin/python3 /usr/bin/meson --internal install /root/scrcpy/x/meson-private/install.dat
ninja: build stopped: subcommand failed.
@rom1v rom1v added the build label Mar 11, 2018
@rom1v
Copy link
Collaborator

rom1v commented Mar 11, 2018

File 'server/scrcpy-server.jar' could not be found

What is the full command you executed initialy (the one with meson x)?

@BSuperfly
Copy link
Author

BSuperfly commented Mar 11, 2018

meson x --buildtype release --strip -Db_lto=true

I also tried pulling your prebuilt server jar into: ~/scrcpy/x and using:

meson x --buildtype release --strip -Db_lto=true
-Dprebuilt_server=~/scrcpy/x/scrcpy-server.jar

I'm going to run an update, remove all and try again. I'll post the full log

@BSuperfly
Copy link
Author

BSuperfly commented Mar 11, 2018

root@superfly:~# uname -a
Linux superfly 4.14.0-kali3-amd64 #1 SMP Debian 4.14.17-1kali1 (2018-02-16) x86_64 GNU/Linux
root@superfly:~# apt install ffmpeg libsdl2-2.0.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsdl2-2.0-0' for regex 'libsdl2-2.0.0'
ffmpeg is already the newest version (7:3.4.2-1+b1).
libsdl2-2.0-0 is already the newest version (2.0.8+dfsg1-1).
The following packages were automatically installed and are no longer required:
  gnome-themes-standard libpoppler68 libqgis-analysis2.14.22
  libqgis-core2.14.22 libqgis-gui2.14.22 libqgis-networkanalysis2.14.22
  libqgis-server2.14.22 libqgispython2.14.22 libradare2-2.3 vino
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@superfly:~# apt install make gcc openjdk-8-jdk pkg-config meson zip \
                  libavcodec-dev libavformat-dev libavutil-dev \
                  libsdl2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:7.2.0-1d1).
libavcodec-dev is already the newest version (7:3.4.2-1+b1).
libavformat-dev is already the newest version (7:3.4.2-1+b1).
libavutil-dev is already the newest version (7:3.4.2-1+b1).
libsdl2-dev is already the newest version (2.0.8+dfsg1-1).
make is already the newest version (4.1-9.1).
meson is already the newest version (0.44.1-1).
openjdk-8-jdk is already the newest version (8u151-b12-1).
pkg-config is already the newest version (0.29-4+b1).
zip is already the newest version (3.0-11+b1).
The following packages were automatically installed and are no longer required:
  gnome-themes-standard libpoppler68 libqgis-analysis2.14.22
  libqgis-core2.14.22 libqgis-gui2.14.22 libqgis-networkanalysis2.14.22
  libqgis-server2.14.22 libqgispython2.14.22 libradare2-2.3 vino
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@superfly:~# export PATH="$JAVA_HOME/bin:$PATH"
root@superfly:~# export ANDROID_HOME=~/android/sdk
root@superfly:~# git clone https://github.com/Genymobile/scrcpy.git
Cloning into 'scrcpy'...
remote: Counting objects: 1648, done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 1648 (delta 183), reused 199 (delta 154), pack-reused 1380
Receiving objects: 100% (1648/1648), 416.41 KiB | 3.25 MiB/s, done.
Resolving deltas: 100% (912/912), done.
root@superfly:~# cd scrcpy
root@superfly:~/scrcpy# wget https://github.com/Genymobile/scrcpy/releases/download/v1.0/scrcpy-server-v1.0.jar
--2018-03-11 15:46:14--  https://github.com/Genymobile/scrcpy/releases/download/v1.0/scrcpy-server-v1.0.jar
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/111583593/6b4bb77a-22c4-11e8-9a5b-a38b57dfce19?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180311%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180311T204614Z&X-Amz-Expires=300&X-Amz-Signature=9003fc0fc4630a3d498c0e481fd9b2005584ad5432f42009c77c397d933cfc0c&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.0.jar&response-content-type=application%2Foctet-stream [following]
--2018-03-11 15:46:14--  https://github-production-release-asset-2e65be.s3.amazonaws.com/111583593/6b4bb77a-22c4-11e8-9a5b-a38b57dfce19?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180311%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180311T204614Z&X-Amz-Expires=300&X-Amz-Signature=9003fc0fc4630a3d498c0e481fd9b2005584ad5432f42009c77c397d933cfc0c&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.0.jar&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.162.107
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.162.107|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19038 (19K) [application/octet-stream]
Saving to: ‘scrcpy-server-v1.0.jar’

scrcpy-server-v1.0. 100%[===================>]  18.59K  --.-KB/s    in 0.06s   

2018-03-11 15:46:15 (300 KB/s) - ‘scrcpy-server-v1.0.jar’ saved [19038/19038]

root@superfly:~/scrcpy# meson x --buildtype release --strip -Db_lto=true
The Meson build system
Version: 0.44.1
Source dir: /root/scrcpy
Build dir: /root/scrcpy/x
Build type: native build
Project name: scrcpy
Native C compiler: cc (gcc 7.3.0)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29)
Native dependency libavformat found: YES 57.83.100
Native dependency libavcodec found: YES 57.107.100
Native dependency libavutil found: YES 55.78.100
Native dependency sdl2 found: YES 2.0.8
Configuring config.h using configuration
Program ./scripts/build-wrapper.sh found: YES (/root/scrcpy/server/./scripts/build-wrapper.sh)
Build targets in project: 6
Found ninja-1.8.2 at /usr/bin/ninja
root@superfly:~/scrcpy# cd x
root@superfly:~/scrcpy/x# ninja
[17/30] Generating scrcpy-server with a custom command.
(not invoking gradle, since we are root)
[30/30] Linking target app/scrcpy.
root@superfly:~/scrcpy/x# ninja install
[1/2] Generating scrcpy-server with a custom command.
(not invoking gradle, since we are root)
[1/2] Installing files.
Installing app/scrcpy to /usr/local/bin/scrcpy
Stripping target 'app/scrcpy'
Installing server/scrcpy-server.jar to /usr/local/share/scrcpy/scrcpy-server.jar
Traceback (most recent call last):
  File "/usr/bin/meson", line 37, in <module>
    sys.exit(main())
  File "/usr/bin/meson", line 34, in main
    return mesonmain.run(sys.argv[1:], launcher)
  File "/usr/share/meson/mesonbuild/mesonmain.py", line 323, in run
    sys.exit(run_script_command(args[1:]))
  File "/usr/share/meson/mesonbuild/mesonmain.py", line 279, in run_script_command
    return cmdfunc(cmdargs)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 375, in run
    do_install(datafilename)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 190, in do_install
    install_targets(d)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 314, in install_targets
    raise RuntimeError('File {!r} could not be found'.format(fname))
RuntimeError: File 'server/scrcpy-server.jar' could not be found
FAILED: meson-install 
/usr/bin/python3 /usr/bin/meson --internal install /root/scrcpy/x/meson-private/install.dat
ninja: build stopped: subcommand failed.
root@superfly:~/scrcpy/x# cd ..
root@superfly:~# rm -irf x
root@superfly:~/scrcpy# meson x --buildtype release --strip -Db_lto=true \
>     -Dprebuilt_server=~/scrcpy/scrcpy-server.jar
The Meson build system
Version: 0.44.1
Source dir: /root/scrcpy
Build dir: /root/scrcpy/x
Build type: native build
Project name: scrcpy
Native C compiler: cc (gcc 7.3.0)
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29)
Native dependency libavformat found: YES 57.83.100
Native dependency libavcodec found: YES 57.107.100
Native dependency libavutil found: YES 55.78.100
Native dependency sdl2 found: YES 2.0.8
Configuring config.h using configuration
Build targets in project: 6
Found ninja-1.8.2 at /usr/bin/ninja
root@superfly:~/scrcpy# cd x
root@superfly:~/scrcpy/x# ninja
ninja: error: '../server/~/scrcpy/scrcpy-server.jar', needed by 'server/scrcpy-server.jar', missing and no known rule to make it

@rom1v
Copy link
Collaborator

rom1v commented Mar 11, 2018

OK, I get it.

First, if you want to use the prebuilt server, you need to configure like this:

meson x --buildtype release --strip -Db_lto=true \
    -Dprebuilt_server=/path/to/scrcpy-server.jar

If you do not, then it will compile the server… Except if you are root.

You should not compile as root!

@BSuperfly
Copy link
Author

Duh! SU when I was installing my dependencies and forgot! Working now. You are a scholar and gentlemen, sir. Thanks for the great code. FYI, I posted it on XDA and gave full credits to you. And, you picked up a few articles on tech sites I read. Nice work!

And, I've ran on Win 8.1 and is working well. The prebuilt zip was very useful. Only minor hiccup is it will occasionally throw an input error that can be ignored.

@BSuperfly
Copy link
Author

Work out a few of the kinks on the Windows version, and you could/should monetize this! No client side application install is a major draw. :o)

@rom1v
Copy link
Collaborator

rom1v commented Mar 11, 2018

You are a scholar and gentlemen, sir. Thanks for the great code.

😊

FYI, I posted it on XDA

Thank you 👍

and gave full credits to you

Please also give credits to Genymobile, they are the owner of the project, and they made it possible 😉

you could/should monetize this

  1. As an employee, I was paid for developing this app.
  2. For the company, selling licenses for such an app would probably be negligible.
  3. Being open source is one of the most important benefits 😉

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

No branches or pull requests

2 participants