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

I get an error when calling C:/msys64/mingw64/bin/ninja.EXE #1732

Closed
AVTurovskiy opened this issue Sep 3, 2020 · 8 comments
Closed

I get an error when calling C:/msys64/mingw64/bin/ninja.EXE #1732

AVTurovskiy opened this issue Sep 3, 2020 · 8 comments

Comments

@AVTurovskiy
Copy link

Good day.

Thanks for your project.

I am trying to build it from Windows 10, but has an error when i run C:/msys64/mingw64/bin/ninja.exe command:

1@MyPC MSYS /c/Development/AndroidControl/scrcpy/scrcpy-master/x
$ C:/msys64/mingw64/bin/ninja.EXE
[1/26] Compiling C object app/a172ced@@scrcpy@exe/src_command.c.obj
FAILED: app/a172ced@@scrcpy@exe/src_command.c.obj
cc @app/a172ced@@scrcpy@exe/src_command.c.obj.rsp
cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
[2/26] Compiling C object app/a172ced@@scrcpy@exe/src_main.c.obj
FAILED: app/a172ced@@scrcpy@exe/src_main.c.obj
cc @app/a172ced@@scrcpy@exe/src_main.c.obj.rsp
cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
[3/26] Compiling C object app/a172ced@@scrcpy@exe/src_util_str_util.c.obj
FAILED: app/a172ced@@scrcpy@exe/src_util_str_util.c.obj
cc @app/a172ced@@scrcpy@exe/src_util_str_util.c.obj.rsp
cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
[4/26] Compiling C object app/a172ced@@scrcpy@exe/src_util_net.c.obj
FAILED: app/a172ced@@scrcpy@exe/src_util_net.c.obj
cc @app/a172ced@@scrcpy@exe/src_util_net.c.obj.rsp
cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
[5/26] Compiling C object app/a172ced@@scrcpy@exe/src_video_buffer.c.obj
FAILED: app/a172ced@@scrcpy@exe/src_video_buffer.c.obj
cc @app/a172ced@@scrcpy@exe/src_video_buffer.c.obj.rsp
cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
[6/26] Compiling C object app/a172ced@@scrcpy@exe/src_sys_win_command.c.obj
FAILED: app/a172ced@@scrcpy@exe/src_sys_win_command.c.obj
cc @app/a172ced@@scrcpy@exe/src_sys_win_command.c.obj.rsp
cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.

The following steps were taken:

  1. Previously installed AndroidStudio and Jdk
  2. Console MSYS2 installed
  3. Dependencies installed:
pacman -S mingw-w64-x86_64-SDL2 \
          mingw-w64-x86_64-ffmpeg
pacman -S mingw-w64-x86_64-make \
          mingw-w64-x86_64-gcc \
          mingw-w64-x86_64-pkg-config \
          mingw-w64-x86_64-meson
  1. Then the following commands are executed:
    cd c:/Development/scrcpy/scrcpy-master
    c:/msys64/mingw64/bin/meson.exe c:/Development/scrcpy/scrcpy-master/x --buildtype release --strip -Db_lto=true

folders appear in directory x:
image

and scrcpy-server appear too in server folder:
image

but, after run
cd x
and
C:/msys64/mingw64/bin/ninja.exe
here the above error appears.

in 'app' directory appears follow files:
image
in 'a172ced@@scrcpy@exe' directory appears follow files:
image

Please, tell me, what could be the problem?

@rom1v
Copy link
Collaborator

rom1v commented Sep 3, 2020

cc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.

So it does not find cc or cc1. I don't know what cc1 is.

Oh yes:

cc1 is the internal command which takes preprocessed C-language files and converts them to assembly.

Maybe try to export CC=gcc before running ninja?

@Biswa96
Copy link
Contributor

Biswa96 commented Sep 3, 2020

Use the MinGW32 or MinGW64 environment. See the prompt text, yours is MSYS.

@rom1v
Copy link
Collaborator

rom1v commented Sep 3, 2020

Thanks @Biswa96 👍 It's been a long time since I used msys/mingw on Windows :)

@AVTurovskiy
Copy link
Author

Use the MinGW32 or MinGW64 environment. See the prompt text, yours is MSYS.

Not sure if I understand. How i can to do this?

@AVTurovskiy
Copy link
Author

Maybe try to export CC=gcc before running ninja?

I try to run export CC=gcc.
Now, every few launches, I have an even stranger result
image

@Biswa96
Copy link
Contributor

Biswa96 commented Sep 3, 2020

If you have installed MSYS2 properly then there will be three icons in Start Menu. Blue one is Mingw64. Or if you want to open the MinGW64 environment in Command Prompt then run this command C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64. Replace -mingw64 with -mingw32 for MinGW32 environment i.e. i686-w64-mingw32 triplet.

I was thinking about adding the MSYS2 GitHub Actions in scrcpy and gnirehtet (and other projects if you want). This may speed up things and provide both x86_64 and i686 PE binaries. But I am not familiar with the other Java part.

@rom1v
Copy link
Collaborator

rom1v commented Sep 3, 2020

I was thinking about adding the MSYS2 GitHub Actions

ref #1709

@AVTurovskiy
Copy link
Author

If you have installed MSYS2 properly then there will be three icons in Start Menu. Blue one is Mingw64. Or if you want to open the MinGW64 environment in Command Prompt then run this command C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64. Replace -mingw64 with -mingw32 for MinGW32 environment i.e. i686-w64-mingw32 triplet.

It is realy worked! Thank you.

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