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

Build error #3785

Closed
2 tasks done
ghost opened this issue Mar 12, 2023 · 5 comments
Closed
2 tasks done

Build error #3785

ghost opened this issue Mar 12, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 12, 2023

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [Debian]
  • scrcpy version: [这一版本:e5aa2ce01f638ebe083c821fd204a45d9d8f317d]

Run-time dependency libavformat found: YES 58.45.100
Run-time dependency libavcodec found: YES 58.91.100
Run-time dependency libavutil found: YES 56.51.100
Run-time dependency libswresample found: YES 3.7.100
Run-time dependency sdl2 found: YES 2.0.14
Run-time dependency libavdevice found: YES 58.10.100
Run-time dependency libusb-1.0 found: YES 1.0.24
Checking for function "strdup" : YES
Checking for function "asprintf" : YES
Checking for function "vasprintf" : YES
Checking for function "nrand48" : YES
Checking for function "jrand48" : YES
Checking for function "reallocarray" : YES
Header <sys/socket.h> has symbol "SOCK_CLOEXEC" : YES
Configuring config.h using configuration
Build targets in project: 3

Found ninja-1.10.1 at /usr/bin/ninja
[61/62] Compiling C object app/scrcpy.p/src_screen.c.o
FAILED: app/scrcpy.p/src_screen.c.o
ccache cc -Iapp/scrcpy.p -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -I/usr/include/libusb-1.0 -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -D_REENTRANT -MD -MQ app/scrcpy.p/src_screen.c.o -MF app/scrcpy.p/src_screen.c.o.d -o app/scrcpy.p/src_screen.c.o -c ../app/src/screen.c
In file included from ../app/src/screen.h:6,
from ../app/src/screen.c:1:
../app/src/screen.c: In function ‘sc_screen_handle_event’:
../app/src/screen.c:821:13: error: a label can only be part of a statement and a declaration is not a statement
821 | bool ok = sc_screen_init_size(screen);
| ^~~~
ninja: build stopped: subcommand failed.

@p-linnane
Copy link

Also seen in Homebrew/homebrew-core#125433.

@JonnyTech
Copy link

Exactly the same for me too on Debian also:

$ uname -a
Linux WOPR 6.1.0-4mx-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.11-1~mx21+1 (2023-02-11) x86_64 GNU/Linux

$ ./install_release.sh
[scrcpy] Downloading prebuilt server...
--2023-03-12 09:24:44--  https://github.com/Genymobile/scrcpy/releases/download/v2.0/scrcpy-server-v2.0
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/111583593/a192090c-1129-4eff-bad6-50720aee7e29?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230312%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230312T052445Z&X-Amz-Expires=300&X-Amz-Signature=48ae59fbb230c04d794b0786c75227746276d40ba8867fde4ca8e6fd127d9b05&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v2.0&response-content-type=application%2Foctet-stream [following]
--2023-03-12 09:24:45--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/111583593/a192090c-1129-4eff-bad6-50720aee7e29?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230312%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230312T052445Z&X-Amz-Expires=300&X-Amz-Signature=48ae59fbb230c04d794b0786c75227746276d40ba8867fde4ca8e6fd127d9b05&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v2.0&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 52867 (52K) [application/octet-stream]
Saving to: ‘scrcpy-server’

scrcpy-server            100%[==================================>]  51.63K   133KB/s    in 0.4s    

2023-03-12 09:24:46 (133 KB/s) - ‘scrcpy-server’ saved [52867/52867]

[scrcpy] Verifying prebuilt server...
scrcpy-server: OK
[scrcpy] Building client...
The Meson build system
Version: 0.56.2
Source dir: /tmp/scrcpy
Build dir: /tmp/scrcpy/build-auto
Build type: native build
Project name: scrcpy
Project version: 2.0
C compiler for the host machine: cc (gcc 10.2.1 "cc (Debian 10.2.1-6) 10.2.1 20210110")
C linker for the host machine: cc ld.bfd 2.35.2
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency libavformat found: YES 58.45.100
Run-time dependency libavcodec found: YES 58.91.100
Run-time dependency libavutil found: YES 56.51.100
Run-time dependency libswresample found: YES 3.7.100
Run-time dependency sdl2 found: YES 2.0.14
Run-time dependency libavdevice found: YES 58.10.100
Run-time dependency libusb-1.0 found: YES 1.0.24
Checking for function "strdup" : YES 
Checking for function "asprintf" : YES 
Checking for function "vasprintf" : YES 
Checking for function "nrand48" : YES 
Checking for function "jrand48" : YES 
Checking for function "reallocarray" : YES 
Header <sys/socket.h> has symbol "SOCK_CLOEXEC" : YES 
Configuring config.h using configuration
Build targets in project: 3

Found ninja-1.10.1 at /usr/bin/ninja
[44/62] Compiling C object app/scrcpy.p/src_screen.c.o
FAILED: app/scrcpy.p/src_screen.c.o 
cc -Iapp/scrcpy.p -Iapp -I../app -I../app/src -I/usr/include/x86_64-linux-gnu -I/usr/include/SDL2 -I/usr/include/libusb-1.0 -flto -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -D_REENTRANT -MD -MQ app/scrcpy.p/src_screen.c.o -MF app/scrcpy.p/src_screen.c.o.d -o app/scrcpy.p/src_screen.c.o -c ../app/src/screen.c
In file included from ../app/src/screen.h:6,
                 from ../app/src/screen.c:1:
../app/src/screen.c: In function ‘sc_screen_handle_event’:
../app/src/screen.c:821:13: error: a label can only be part of a statement and a declaration is not a statement
  821 |             bool ok = sc_screen_init_size(screen);
      |             ^~~~
[49/62] Compiling C object app/scrcpy.p/src_util_str.c.o
ninja: build stopped: subcommand failed.

@ZhongRuoyu
Copy link
Contributor

This should be fixed by #3787.

@JonnyTech
Copy link

This should be fixed by #3787.

That works for me - thanks @ZhongRuoyu

@rom1v rom1v closed this as completed in 6b76967 Mar 12, 2023
@rom1v rom1v changed the title 编译失败 Build error Mar 12, 2023
@theofficialgman
Copy link

@rom1v please tag a release with this patch included
current release can not be built on most systems

theofficialgman added a commit to Botspot/pi-apps that referenced this issue Apr 19, 2023
includes patch to fix broken release of v2.0. @rom1v need to release a v2.1 with this patch included, refer to Genymobile/scrcpy#3785
theofficialgman added a commit to Botspot/pi-apps that referenced this issue Apr 19, 2023
includes patch to fix broken release of v2.0. @rom1v need to release a v2.1 with this patch included, refer to Genymobile/scrcpy#3785
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

Successfully merging a pull request may close this issue.

4 participants