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

./install_release.sh found [Errno 2] No such file or directory: '/home/V01.NET/uidq3640/app/scrcpy/build-auto' #2616

Open
guaishouN opened this issue Sep 6, 2021 · 9 comments

Comments

@guaishouN
Copy link

guaishouN commented Sep 6, 2021

  • [y ] I have read the FAQ.
  • [y ] I have searched in existing issues.
uidq3640@hzh2187u:~/app/scrcpy$ ./install_release.sh
[scrcpy] Downloading prebuilt server...
--2021-09-06 15:43:26--  https://github.com/Genymobile/scrcpy/releases/download/v1.18/scrcpy-server-v1.18
Resolving github.com (github.com)... 13.250.177.223
Connecting to github.com (github.com)|13.250.177.223|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/111583593/22cd7080-d214-11eb-9b61-afe7476d6cf6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210906%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210906T074327Z&X-Amz-Expires=300&X-Amz-Signature=e142cdf6963244b258a706602486d6973c2bc6cc1e505eb8f7ca00c9e1aa56ec&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.18&response-content-type=application%2Foctet-stream [following]
--2021-09-06 15:43:27--  https://github-releases.githubusercontent.com/111583593/22cd7080-d214-11eb-9b61-afe7476d6cf6?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210906%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210906T074327Z&X-Amz-Expires=300&X-Amz-Signature=e142cdf6963244b258a706602486d6973c2bc6cc1e505eb8f7ca00c9e1aa56ec&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.18&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.111.154, 185.199.109.154, 185.199.108.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.111.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37330 (36K) [application/octet-stream]
Saving to: ‘scrcpy-server’

scrcpy-server       100%[===================>]  36.46K  --.-KB/s    in 0.02s   

2021-09-06 15:43:27 (1.69 MB/s) - ‘scrcpy-server’ saved [37330/37330]

[scrcpy] Verifying prebuilt server...
scrcpy-server: OK
[scrcpy] Building client...
Error during basic setup:

[Errno 2] No such file or directory: '/home/V01.NET/uidq3640/app/scrcpy/build-auto'
@rom1v
Copy link
Collaborator

rom1v commented Sep 6, 2021

What is the result of:

pwd
echo $USER
echo $HOME

after you execute the install_release script?

@guaishouN
Copy link
Author

What is the result of:

pwd
echo $USER
echo $HOME

after you execute the install_release script?

uidq3640@hzh2187u:~/app/scrcpy$ pwd
/home/V01.NET/uidq3640/app/scrcpy

uidq3640@hzh2187u:~/app/scrcpy$ echo $USER
uidq3640

uidq3640@hzh2187u:~/app/scrcpy$ echo $HOME
/home/V01.NET/uidq3640

yes problem happen after I execute the install_release script?

@rom1v
Copy link
Collaborator

rom1v commented Sep 8, 2021

What is the result of meson --version?

IIRC some old versions of meson expected the build directory to pre-exist. What if you create it:

diff --git a/install_release.sh b/install_release.sh
index 9158bdd4..d4e307a6 100755
--- a/install_release.sh
+++ b/install_release.sh
@@ -12,6 +12,7 @@ echo "$PREBUILT_SERVER_SHA256  scrcpy-server" | sha256sum --check
 
 echo "[scrcpy] Building client..."
 rm -rf "$BUILDDIR"
+mkdir "$BUILDDIR"
 meson "$BUILDDIR" --buildtype release --strip -Db_lto=true \
     -Dprebuilt_server=scrcpy-server
 cd "$BUILDDIR"

@guaishouN
Copy link
Author

What is the result of meson --version?

IIRC some old versions of meson expected the build directory to pre-exist. What if you create it:

diff --git a/install_release.sh b/install_release.sh
index 9158bdd4..d4e307a6 100755
--- a/install_release.sh
+++ b/install_release.sh
@@ -12,6 +12,7 @@ echo "$PREBUILT_SERVER_SHA256  scrcpy-server" | sha256sum --check
 
 echo "[scrcpy] Building client..."
 rm -rf "$BUILDDIR"
+mkdir "$BUILDDIR"
 meson "$BUILDDIR" --buildtype release --strip -Db_lto=true \
     -Dprebuilt_server=scrcpy-server
 cd "$BUILDDIR"

uidq3640@hzh2187u:~/app/scrcpy$ meson --version
0.29.0

@rom1v
Copy link
Collaborator

rom1v commented Sep 8, 2021

Oh, ok, that's very (very (very)) old.

The build requires at least 0.48 anyway, so even if you bypass this problem you'll get other issues:

meson_version: '>= 0.48',

Install a newer meson via pip3 or better, upgrade your distribution.

@guaishouN
Copy link
Author

[scrcpy] Downloading prebuilt server...
--2021-09-13 16:55:28-- https://github.com/Genymobile/scrcpy/releases/download/v1.19/scrcpy-server-v1.19
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-releases.githubusercontent.com/111583593/8b84826e-3da6-472a-a490-f19e11bd4f60?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210913%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210913T085528Z&X-Amz-Expires=300&X-Amz-Signature=8363e9491bab43f04aef16ff20156d87fa782c451165df0bb49bebacc87f292f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.19&response-content-type=application%2Foctet-stream [following]
--2021-09-13 16:55:29-- https://github-releases.githubusercontent.com/111583593/8b84826e-3da6-472a-a490-f19e11bd4f60?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210913%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210913T085528Z&X-Amz-Expires=300&X-Amz-Signature=8363e9491bab43f04aef16ff20156d87fa782c451165df0bb49bebacc87f292f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.19&response-content-type=application%2Foctet-stream
Resolving github-releases.githubusercontent.com (github-releases.githubusercontent.com)... 185.199.111.154, 185.199.108.154, 185.199.110.154, ...
Connecting to github-releases.githubusercontent.com (github-releases.githubusercontent.com)|185.199.111.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37330 (36K) [application/octet-stream]
Saving to: ‘scrcpy-server’

scrcpy-server 100%[===================>] 36.46K --.-KB/s in 0.1s

2021-09-13 16:55:29 (360 KB/s) - ‘scrcpy-server’ saved [37330/37330]

[scrcpy] Verifying prebuilt server...
scrcpy-server: OK
[scrcpy] Building client...
The Meson build system
Version: 0.59.1
Source dir: /home/V01.NET/uidq3640/app/scrcpy
Build dir: /home/V01.NET/uidq3640/app/scrcpy/build-auto
Build type: native build
Project name: scrcpy
Project version: 1.19
C compiler for the host machine: ccache cc (gcc 5.4.0 "cc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609")
C linker for the host machine: cc ld.bfd 2.26.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Run-time dependency libavformat found: YES 56.40.101
Run-time dependency libavcodec found: YES 56.60.100
Run-time dependency libavutil found: YES 54.31.100
Run-time dependency sdl2 found: YES 2.0.4
Run-time dependency libavdevice found: YES 56.4.100
Checking for function "strdup" : YES
Configuring config.h using configuration
Program cp found: YES (/bin/cp)
Program scripts/run-scrcpy.sh found: YES (/home/V01.NET/uidq3640/app/scrcpy/scripts/run-scrcpy.sh)
Build targets in project: 3

Found ninja-1.10.2.git at /usr/bin/ninja
[3/33] Compiling C object app/scrcpy.p/src_compat.c.o
In file included from ../app/src/compat.c:3:0:
app/config.h:14:0: warning: "HAVE_STRDUP" redefined
#define HAVE_STRDUP
^
In file included from /usr/include/SDL2/SDL_stdinc.h:31:0,
from /usr/include/SDL2/SDL_version.h:31,
from ../app/src/compat.h:12,
from ../app/src/compat.c:1:
/usr/include/SDL2/SDL_config.h:109:0: note: this is the location of the previous definition
#define HAVE_STRDUP 1
^
[11/33] Compiling C object app/scrcpy.p/src_decoder.c.o
../app/src/decoder.c: In function ‘decoder_push’:
../app/src/decoder.c:102:15: warning: implicit declaration of function ‘avcodec_send_packet’ [-Wimplicit-function-declaration]
int ret = avcodec_send_packet(decoder->codec_ctx, packet);
^
../app/src/decoder.c:107:11: warning: implicit declaration of function ‘avcodec_receive_frame’ [-Wimplicit-function-declaration]
ret = avcodec_receive_frame(decoder->codec_ctx, decoder->frame);
^
[15/33] Compiling C object app/scrcpy.p/src_recorder.c.o
FAILED: app/scrcpy.p/src_recorder.c.o
ccache cc -Iapp/scrcpy.p -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -flto=4 -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -D_REENTRANT -MD -MQ app/scrcpy.p/src_recorder.c.o -MF app/scrcpy.p/src_recorder.c.o.d -o app/scrcpy.p/src_recorder.c.o -c ../app/src/recorder.c
../app/src/recorder.c: In function ‘record_packet_new’:
../app/src/recorder.c:38:19: warning: implicit declaration of function ‘av_packet_alloc’ [-Wimplicit-function-declaration]
rec->packet = av_packet_alloc();
^
../app/src/recorder.c:38:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
rec->packet = av_packet_alloc();
^
../app/src/recorder.c:45:9: warning: implicit declaration of function ‘av_packet_free’ [-Wimplicit-function-declaration]
av_packet_free(&rec->packet);
^
../app/src/recorder.c: In function ‘recorder_write_header’:
../app/src/recorder.c:89:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->extradata = extradata;
^
../app/src/recorder.c:90:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->extradata_size = packet->size;
^
../app/src/recorder.c: In function ‘recorder_open’:
../app/src/recorder.c:273:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
^
../app/src/recorder.c:274:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->codec_id = input_codec->id;
^
../app/src/recorder.c:275:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->format = AV_PIX_FMT_YUV420P;
^
../app/src/recorder.c:276:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->width = recorder->declared_frame_size.width;
^
../app/src/recorder.c:277:12: error: ‘AVStream {aka struct AVStream}’ has no member named ‘codecpar’
ostream->codecpar->height = recorder->declared_frame_size.height;
^
[20/33] Compiling C object app/scrcpy.p/src_screen.c.o
ninja: build stopped: subcommand failed.

@rom1v
Copy link
Collaborator

rom1v commented Sep 13, 2021

Could you try with these changes:

diff --git a/app/src/decoder.c b/app/src/decoder.c
index aa5018b3..7c67e836 100644
--- a/app/src/decoder.c
+++ b/app/src/decoder.c
@@ -1,5 +1,6 @@
 #include "decoder.h"
 
+#include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 
 #include "events.h"
diff --git a/app/src/recorder.c b/app/src/recorder.c
index c98b6b8c..3b5fe070 100644
--- a/app/src/recorder.c
+++ b/app/src/recorder.c
@@ -1,6 +1,8 @@
 #include "recorder.h"
 
 #include <assert.h>
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
 #include <libavutil/time.h>
 
 #include "util/log.h"

(Which distribution do you use?)

rom1v added a commit that referenced this issue Sep 22, 2021
rom1v added a commit that referenced this issue Oct 21, 2021
@jahentao
Copy link

jahentao commented Nov 6, 2021

I have the same problem on Ubuntu 16.04, is it related to the ffmpeg lib version?

root@GPUCOMPILER2:~/Downloads/scrcpy# ffmpeg
ffmpeg version 2.8.17-0ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Hyper fast Audio and Video encoder

@rom1v
Copy link
Collaborator

rom1v commented Nov 6, 2021

16.04 is too old. You could try to upgrade meson at least, but I'm not sure this will be sufficient.

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