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

Can't build for Windows in Ubuntu 22.04. #4752

Open
2 tasks done
cwahn opened this issue Mar 11, 2024 · 1 comment
Open
2 tasks done

Can't build for Windows in Ubuntu 22.04. #4752

cwahn opened this issue Mar 11, 2024 · 1 comment

Comments

@cwahn
Copy link

cwahn commented Mar 11, 2024

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

Environment

  • OS: Ubuntu 22.04 LTS
  • scrcpy version: v2.4
  • installation method: manual
  • device model: N/A
  • Android version: N/A

Describe the bug

Hey I am trying to build scrcpy for win64 client. I have follow the build instructurction, but I don't need the server but only the client. So I figured out the command below.

meson setup build-win64 --cross-file cross_win64_modified.txt --buildtype release --strip -Db_lto=true -Dprebuilt_server=/home/ubuntu/dev/c/scrcpy/scrcpy-server-v2.4

However it fails if I run

The Meson build system
Version: 0.61.2
Source dir: /home/ubuntu/dev/c/scrcpy
Build dir: /home/ubuntu/dev/c/scrcpy/build-win64
Build type: cross build
Project name: scrcpy
Project version: 2.4
C compiler for the host machine: x86_64-w64-mingw32-gcc (gcc 10.0.0 "x86_64-w64-mingw32-gcc (GCC) 10-win32 20220113")
C linker for the host machine: x86_64-w64-mingw32-gcc ld.bfd 2.38
C compiler for the build machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the build machine: cc ld.bfd 2.38
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86
Host machine cpu: x86_64
Target machine cpu family: x86
Target machine cpu: x86_64
Windows resource compiler: GNU windres (GNU Binutils) 2.38
Found Pkg-config: NO
Found CMake: NO
Run-time dependency libavformat found: NO 

app/meson.build:106:0: ERROR: Pkg-config binary for machine 1 not found. Giving up.

A full log can be found at /home/ubuntu/dev/c/scrcpy/build-win64/meson-logs/meson-log.txt

I did install it.

sudo apt install mingw-w64 mingw-w64-tools

What should I do or check? Is this even a correct command? if I omit --cross-file cross_win64_modified.txt It does configure and I can finish the build. but I can't find scrcpy.exe. What would be the correct steps to compile win64 client in Ubuntu 22.04?

@rom1v
Copy link
Collaborator

rom1v commented Mar 11, 2024

Your meson is too old.

Just revert this commit to make it work: 85a94dd

rom1v added a commit that referenced this issue May 27, 2024
PR #4752 removed the need for locks except for corner cases. Now replace
the remaining lock sections by atomics.

Refs #4572 <#4572>
rom1v added a commit that referenced this issue May 28, 2024
PR #4752 removed the need for locks except for corner cases. Now replace
the remaining lock sections by atomics.

Refs #4572 <#4572>
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

2 participants