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

[x264] build failure #13603

Closed
fawdlstty opened this issue Sep 18, 2020 · 7 comments
Closed

[x264] build failure #13603

fawdlstty opened this issue Sep 18, 2020 · 7 comments
Labels
category:port-bug The issue is with a library, which is something the port should already support category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly

Comments

@fawdlstty
Copy link
Contributor

Host Environment

  • OS: Win10 1909 (18363.900)
  • Compiler: vs2019 community 16.7.2

To Reproduce
Steps to reproduce the behavior:
vcpkg install x264:x86-windows-static x264:x64-windows-static

Failure logs

C:\Users\fawdlstty>vcpkg install x264:x86-windows-static x264:x64-windows-static
Computing installation plan...
The following packages will be built and installed:
    x264[core]:x64-windows-static
    x264[core]:x86-windows-static
Detecting compiler hash for triplet x64-windows-static...
Detecting compiler hash for triplet x86-windows-static...
Starting package 1/2: x264:x64-windows-static
Building package x264[core]:x64-windows-static...
Could not locate cached archive: C:\Users\fawdlstty\AppData\Local\vcpkg/archives\2a\2a00d5aacbc6712bbb7a77ba71f56a065e02e59a.zip
-- Using cached D:/gitee/vcpkg/downloads/mirror-x264-303c484ec828ed0d8bfe743500e70314d026c3bd.tar.gz
-- Cleaning sources at D:/gitee/vcpkg/buildtrees/x264/src/14d026c3bd-bca2ebf740.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/gitee/vcpkg/downloads/mirror-x264-303c484ec828ed0d8bfe743500e70314d026c3bd.tar.gz
-- Applying patch uwp-cflags.patch
-- Using source at D:/gitee/vcpkg/buildtrees/x264/src/14d026c3bd-bca2ebf740.clean
-- Using msys root at D:/gitee/vcpkg/downloads/tools/msys2/77f3fd5f29257d6b
-- Configuring x64-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:85 (message):
    Command failed: D:/gitee/vcpkg/downloads/tools/msys2/77f3fd5f29257d6b/usr/bin/bash.exe --noprofile --norc --debug -c "V=1 CPP='cl.exe -nologo -E' CC='cl.exe -nologo' CXX='cl.exe -nologo' AR='lib.exe -verbose' LD='link.exe -verbose' RANLIB=':' CCAS=':' STRIP=':' NM='dumpbin.exe -symbols -headers' DLLTOOL='link.exe -verbose -dll' ./../src/14d026c3bd-bca2ebf740.clean/configure  --build=x86_64-pc-mingw32 --host=x86_64-pc-mingw32 --enable-strip --disable-lavf --disable-swscale --disable-avs --disable-ffms --disable-gpac --disable-lsmash --disable-asm --enable-debug --disable-silent-rules --verbose --disable-shared --enable-static --prefix=/D/gitee/vcpkg/installed/x64-windows-static/debug"
    Working Directory: D:/gitee/vcpkg/buildtrees/x264/x64-windows-static-dbg
    Error code: 1
    See logs for more information:
      D:\gitee\vcpkg\buildtrees\x264\config-x64-windows-static-dbg-out.log
      D:\gitee\vcpkg\buildtrees\x264\config-x64-windows-static-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_make.cmake:540 (vcpkg_execute_required_process)
  ports/x264/portfile.cmake:28 (vcpkg_configure_make)
  scripts/ports.cmake:79 (include)


Error: Building package x264:x64-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: x264:x64-windows-static
  Vcpkg version: 2020.06.15-nohash

Additionally, attach any relevant sections from the log files above.

C:\Users\fawdlstty>

D:\gitee\vcpkg\buildtrees\x264\config-x64-windows-static-dbg-out.log:

Unknown option --build=x86_64-pc-mingw32, ignored
Unknown option --disable-silent-rules, ignored
Unknown option --verbose, ignored
Unknown option --disable-shared, ignored
Unknown system , edit the configure

D:\gitee\vcpkg\buildtrees\x264\config-x64-windows-static-dbg-err.log:

./../src/14d026c3bd-bca2ebf740.clean/configure: line 327: rm: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 328: rm: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 344: dirname: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 341: dirname: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 345: grep: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 554: /config.sub: No such file or directory
./../src/14d026c3bd-bca2ebf740.clean/configure: line 565: basename: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 148: rm: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 167: cat: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 171: cat: command not found
./../src/14d026c3bd-bca2ebf740.clean/configure: line 1: rm: command not found

Additional context
I try to remove downloads\tools\msys2 directory and rebuild, still failed.

@bogdanlytvynovskyi
Copy link

bogdanlytvynovskyi commented Sep 18, 2020

It seems that bash env recreated by pieces is not proper env

@bogdanlytvynovskyi
Copy link

A bit of digging shows that just launching bash does not add proper directory to path

@bogdanlytvynovskyi
Copy link

Apparently the culprit is this line in vcpkg_configure_make.cmake:

string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/share/automake-1.16;${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}")

Cmake is case sensitive in replace, so if your env is like mine, then your path contains C:\Windows\system32 instead of C:\Windows\System32, and replace does nothing. This results in bash not having it's internal tools in path

@bogdanlytvynovskyi
Copy link

And while above mentioned helps, install step will still fail with some cryptic error messages

@bogdanlytvynovskyi
Copy link

Judging by changes to msys consumption summon for help: @Neumann-A

@Neumann-A
Copy link
Contributor

a) this is a duplicate of another issue
b) there is already a PR fixing it.

@NancyLi1013 NancyLi1013 added category:port-bug The issue is with a library, which is something the port should already support category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly labels Sep 21, 2020
@NancyLi1013
Copy link
Contributor

Thanks for posting this issue.
It's duplicated to #13327. It will be fixed by PR #13450.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support category:tool-update The issue is with build tool or build script, which requires update or should be executed correctly
Projects
None yet
Development

No branches or pull requests

4 participants