Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
106.3k stars 10.3k forks source link

Build warning with meson 0.50.1 #540

Closed npes87184 closed 5 years ago

npes87184 commented 5 years ago

server/meson.build:5: WARNING: Custom target input '.' can't be converted to File object(s). This will become a hard error in the future.

rom1v commented 5 years ago

Fixed by #553.

RaviBeagle commented 3 years ago

Hello,

Is this really fixed ? I am trying to build scrcpy on jetson nano (an ARM64 board).

meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=/home/rreddy78/scrcpy-server-v1

The Meson build system Version: 0.55.3 Source dir: /home/rreddy78/scrcpy Build dir: /home/rreddy78/scrcpy/x Build type: native build Project name: scrcpy Project version: 1.16 C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0") .. .. server/meson.build:24: WARNING: Custom target input '/home/rreddy78/scrcpy-server-v1' can't be converted to File object(s). This will become a hard error in the future. Build targets in project: 3

And I get Ninja error:

rreddy78@jetson:~/scrcpy$ ninja -Cx ninja: Entering directory `x' [20/26] Generating scrcpy-server-prebuilt with a custom command FAILED: server/scrcpy-server cp /home/rreddy78/scrcpy-server-v1 server/scrcpy-server cp: -r not specified; omitting directory '/home/rreddy78/scrcpy-server-v1' [25/26] Compiling C object app/scrcpy.p/src_sys_unix_command.c.o ninja: build stopped: subcommand failed.

For now I will also try to build the server too..

rom1v commented 3 years ago
cp: -r not specified; omitting directory '/home/rreddy78/scrcpy-server-v1'

Looks like scrcpy-server-v1 is a directory. You must pass the filepath.

RaviBeagle commented 3 years ago

Looks like scrcpy-server-v1 is a directory. You must pass the filepath.

But I am just following the instructions given:

image

rom1v commented 3 years ago

Yes, if the scrcpy-server path is /path/to/scrcpy-server (it's a file), then you must execute that.

It seems that /home/rreddy78/scrcpy-server-v1 is a directory on your computer.

RaviBeagle commented 3 years ago

Thanks. I get linking errors. I have libv4l in my system..

/usr/local/lib/libavcodec.so: undefined reference to v4l2_open' /usr/local/lib/libavcodec.so: undefined reference tov4l2_close' /usr/local/lib/libavcodec.so: undefined reference to `v4l2_ioctl'

rom1v commented 3 years ago

/usr/local/lib/libavcodec.so

Where does your ffmpeg come from?

The one from the system is at /usr/lib/x86_64-linux-gnu/libavcodec.so.

RaviBeagle commented 3 years ago

I have a custom ffmpeg from NVIDIA. And later i also built a custom one from source and installed it..

rom1v commented 3 years ago

OK, so there is probably a problem with it, in particular where it finds its dependencies.

Check ldd /usr/local/lib/libavcodec.so.

RaviBeagle commented 3 years ago

Thanks. Working now.I got a dbus crash. But this is a problem with SLD2. I have to run with sudo..

rom1v commented 3 years ago

I have to run with sudo.

:scream:

RaviBeagle commented 3 years ago

sudo scrcpy --rotation 1 -m 1920

I am running Sentio on phone and using scrcpy for mirroring..To get better resolution do i increase bitrate ?

RaviBeagle commented 3 years ago

I believe its fine now. My phone colours are so much better than my old monitor :) hat I had a doubt..

sercangoger commented 3 years ago

"server/meson.build:24: WARNING: Custom target input '/home/sercanus/scrcpy-server-v1' can't be converted to File object(s)." I want to build the code and do development. but i can't build I can't build. I'm getting angry now. why not why

rom1v commented 3 years ago

/home/sercanus/scrcpy-server-v1 Does this file exist? It should be scrcpy-server-v1.17.

sercangoger commented 3 years ago

this folder or file does not exist. I don't know exactly what to do

I went into the directory with cd /scrcpy then i ran the following command.

meson foldername --buildtype release --strip -Db_lto=true -Dprebuilt_server=/home/sercanus/scrcpy/scrcpy-server-v1

but I got an error "server/meson.build:24: WARNING: Custom target input '/home/sercanus/scrcpy-server-v1' can't be converted to File object(s)."

I don't know how to compile and run the codes. I will be glad if you help :)

rom1v commented 3 years ago

then i ran the following command.

meson foldername --buildtype release --strip -Db_lto=true -Dprebuilt_server=/home/sercanus/scrcpy/scrcpy-server-v1

That's the problem, you explicitly passed this path to the file which does not exist: -Dprebuilt_server=/home/sercanus/scrcpy/scrcpy-server-v1

sercangoger commented 3 years ago

I have created a folder named "servfolder" under the scrcpy directory and I ran the command again

meson xmn --buildtype release --strip -D b_lto=true -D prebuilt_server=/home/sercanus/Projects/scrcpy/servfolder

but I got the same error again

"server/meson.build:24: WARNING: Custom target input '/home/sercanus/Projects/scrcpy/servfolder' can't be converted to File object(s)."

rom1v commented 3 years ago

You must path the full path to the server, filename included.

Probably something like: -Dprebuilt_server=/home/sercanus/Projects/scrcpy/servfolder/scrcpy-server-v1.17

sercangoger commented 3 years ago

which server are we talking about ?

sercangoger commented 3 years ago

because there is no such thing

rom1v commented 3 years ago

https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#prebuilt-server

sercangoger commented 3 years ago

"meson xmn --buildtype release --strip -D b_lto=true -D prebuilt_server=/home/sercanus/Projects/scrcpy/copy-server/scrcpy-server-v1.17"

I have succeeded this step now. but I still don't understand how to run it

sercangoger commented 3 years ago

I downloaded the above serverv.17 file and created a folder named "copy-server" in my scrcpy folder and moved the serverv1.7 file there. then I wrote the following code

meson xmn --buildtype release --strip -D b_lto=true -D prebuilt_server=/home/username/Projects/scrcpy/newfoldercrate/scrcpy-server-v1.17"