Skip to content

Instantly share code, notes, and snippets.

@prabowomurti
Created May 29, 2020 09:25
Show Gist options
  • Save prabowomurti/0ac5c0afc3bb3a778436717839b9ccf8 to your computer and use it in GitHub Desktop.
Save prabowomurti/0ac5c0afc3bb3a778436717839b9ccf8 to your computer and use it in GitHub Desktop.
Build scrcpy on MacOSX Catalina without Homebrew
$ git clone https://github.com/Genymobile/scrcpy
$ cd scrcpy
$ sudo port install ninja meson libsdl2 ffmpeg
laylamajnun:scrcpy sangprabo$ meson x --buildtype release --strip -Db_lto=true
The Meson build system
Version: 0.53.2
Source dir: /Users/sangprabo/Applications/scrcpy
Build dir: /Users/sangprabo/Applications/scrcpy/x
Build type: native build
Project name: scrcpy
Project version: 1.14
C compiler for the host machine: cc (clang 11.0.0 "Apple clang version 11.0.0 (clang-1100.0.33.17)")
C linker for the host machine: cc ld64 530
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /opt/local/bin/pkg-config (0.29.2)
Run-time dependency libavformat found: YES 58.29.100
Run-time dependency libavcodec found: YES 58.54.100
Run-time dependency libavutil found: YES 56.31.100
Run-time dependency sdl2 found: YES 2.0.10
Configuring config.h using configuration
Program ./scripts/build-wrapper.sh found: YES (/Users/sangprabo/Applications/scrcpy/server/./scripts/build-wrapper.sh)
Build targets in project: 3
Found ninja-1.10.0 at /opt/local/bin/ninja
laylamajnun:scrcpy sangprabo$ ninja -Cx
ninja: Entering directory `x'
[12/26] Compiling C object 'app/a172ced@@scrcpy@exe/src_server.c.o'.
../app/src/server.c:204:24: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
port, port + 1);
~~~~~~^~~~~~~~~
../app/src/util/log.h:16:61: note: expanded from macro 'LOGW'
#define LOGW(...) SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__)
^~~~~~~~~~~
1 warning generated.
> Task :server:compileReleaseJavaWithJavac
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 2m 57s
25 actionable tasks: 25 executed
[17/26] Compiling C object 'app/a172ced@@scrcpy@exe/src_sys_unix_command.c.o'.
../app/src/sys/unix/command.c:31:12: warning: implicit declaration of function 'strdup' is invalid in C99 [-Wimplicit-function-declaration]
path = strdup(path);
^
../app/src/sys/unix/command.c:31:10: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
path = strdup(path);
^ ~~~~~~~~~~~~
../app/src/sys/unix/command.c:38:22: warning: implicit declaration of function 'strtok_r' is invalid in C99 [-Wimplicit-function-declaration]
for (char *dir = strtok_r(path, ":", &saveptr); dir;
^
../app/src/sys/unix/command.c:38:16: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
for (char *dir = strtok_r(path, ":", &saveptr); dir;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../app/src/sys/unix/command.c:39:17: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
dir = strtok_r(NULL, ":", &saveptr)) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
[19/26] Compiling C object 'app/a172ced@@scrcpy@exe/src_main.c.o'.
../app/src/main.c:45:20: warning: implicit conversion from enumeration type 'enum sc_log_level' to different enumeration type 'SDL_LogPriority' [-Wenum-conversion]
return SC_LOG_LEVEL_INFO;
~~~~~~ ^~~~~~~~~~~~~~~~~
1 warning generated.
[25/26] Linking target app/scrcpy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment