其他分享
首页 > 其他分享> > msys2 build v8

msys2 build v8

作者:互联网

freem@DESKTOP-R102CHR MINGW64 ~/pkg/mingw-packages/mingw-w64-v8
$ makepkg -si
==> Making package: mingw-w64-v8 9.1.269.39-2 (Fri May 20 13:30:53 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating bare-clones/gn git repo...
Fetching origin
  -> Found 9.1.269.39.zip
  -> Updating bare-clones/build git repo...
Fetching origin
  -> Updating bare-clones/zlib git repo...
Fetching origin
  -> Updating bare-clones/common git repo...
Fetching origin
  -> Updating bare-clones/googletest git repo...
Fetching origin
  -> Updating bare-clones/jinja2 git repo...
Fetching origin
  -> Updating bare-clones/markupsafe git repo...
Fetching origin
  -> Updating bare-clones/clang git repo...
Fetching origin
  -> Found 0000-add-mingw-main-code-changes.patch
  -> Found 0001-add-mingw-toolchain.patch
  -> Found 0002-gn-ninja-deletes-objs-workaround.patch
  -> Found icu.gn
  -> Found zlib.gn
  -> Found v8_libbase.pc
  -> Found v8_libplatform.pc
  -> Found v8.pc
==> Validating source files with sha256sums...
    bare-clones/gn ... Skipped
    9.1.269.39.zip ... Passed
    bare-clones/build ... Skipped
    bare-clones/zlib ... Skipped
    bare-clones/common ... Skipped
    bare-clones/googletest ... Skipped
    bare-clones/jinja2 ... Skipped
    bare-clones/markupsafe ... Skipped
    bare-clones/clang ... Skipped
    0000-add-mingw-main-code-changes.patch ... Passed
    0001-add-mingw-toolchain.patch ... Passed
    0002-gn-ninja-deletes-objs-workaround.patch ... Passed
    icu.gn ... Passed
    zlib.gn ... Passed
    v8_libbase.pc ... Passed
    v8_libplatform.pc ... Passed
    v8.pc ... Passed
==> Extracting sources...
  -> Creating working copy of bare-clones/gn git repo...
Reset branch 'makepkg'
  -> Extracting 9.1.269.39.zip with bsdtar
  -> Creating working copy of bare-clones/build git repo...
Reset branch 'makepkg'
  -> Creating working copy of bare-clones/zlib git repo...
Reset branch 'makepkg'
  -> Creating working copy of bare-clones/common git repo...
Reset branch 'makepkg'
  -> Creating working copy of bare-clones/googletest git repo...
Reset branch 'makepkg'
  -> Creating working copy of bare-clones/jinja2 git repo...
Reset branch 'makepkg'
  -> Creating working copy of bare-clones/markupsafe git repo...
Reset branch 'makepkg'
  -> Creating working copy of bare-clones/clang git repo...
Reset branch 'makepkg'
==> Starting prepare()...
Preparing GN source
warning: build/gen.py has type 100644, expected 100755
Patching v8 source
patching file BUILD.gn
patching file include/v8.h
patching file include/v8config.h
patching file src/base/bits.h
patching file src/base/export-template.h
patching file src/base/platform/platform-win32.cc
patching file src/base/platform/time.cc
patching file src/base/win32-headers.h
patching file src/codegen/code-stub-assembler.h
patching file src/codegen/handler-table.cc
patching file src/common/assert-scope.h
patching file src/common/globals.h
patching file src/compiler/node-cache.h
patching file src/compiler/representation-change.cc
patching file src/compiler/type-cache.h
patching file src/heap/paged-spaces-inl.h
patching file src/heap/paged-spaces.h
patching file src/objects/feedback-vector.cc
patching file src/objects/fixed-array-inl.h
patching file src/objects/fixed-array.h
patching file src/objects/ordered-hash-table.h
patching file src/profiler/heap-snapshot-generator.cc
patching file src/snapshot/snapshot-utils.cc
patching file src/trap-handler/handler-inside-win.cc
patching file src/trap-handler/handler-inside-win.h
patching file src/trap-handler/handler-outside-win.cc
patching file src/wasm/function-body-decoder-impl.h
patching file src/wasm/wasm-external-refs.cc
patching file test/cctest/BUILD.gn
patching file test/unittests/BUILD.gn
patching file test/unittests/wasm/trap-handler-win-unittest.cc
patching file test/unittests/wasm/trap-handler-x64-unittest.cc
patching file third_party/googletest/BUILD.gn
patching file tools/BUILD.gn
patching file tools/debug_helper/BUILD.gn
patching file tools/v8windbg/BUILD.gn
patching file tools/v8windbg/base/dbgext.h
patching file tools/v8windbg/src/v8-debug-helper-interop.h
patching file tools/v8windbg/test/debug-callbacks.h
Patching build directory
Patching build directory python
/home/freem/pkg/mingw-packages/mingw-w64-v8/src/build/util/lastchange.py -o /home/freem/pkg/mingw-packages/mingw-w64-v8/src/build/util/LASTCHANGE
ERROR:root:Failed to get version info: Git command 'git log -1 --format=%H %ct --grep=^Change-Id: HEAD' in C:\msys64\home\freem\pkg\MINGW-packages\mingw-w64-v8\src\build failed: rc=128, stdout='' stderr='error: object directory /home/freem/pkg/mingw-packages/mingw-w64-v8/bare-clones/build/objects does not exist; check .git/objects/info/alternates
fatal: bad object HEAD
'
Patching build directory rm
ln Patching build directory rm
Patching zlib directory
Patching icu directory
Soft linking extra repos
==> Removing existing $pkgdir/ directory...
==> Starting build()...
error: object directory /home/freem/pkg/mingw-packages/mingw-w64-v8/bare-clones/gn/objects does not exist; check .git/objects/info/alternates
fatal: HEAD is neither a commit nor blob
Traceback (most recent call last):
  File "C:\msys64\home\freem\pkg\mingw-packages\mingw-w64-v8\src\gn\build\gen.py", line 809, in <module>
    sys.exit(main(sys.argv[1:]))
  File "C:\msys64\home\freem\pkg\mingw-packages\mingw-w64-v8\src\gn\build\gen.py", line 145, in main
    GenerateLastCommitPosition(host,
  File "C:\msys64\home\freem\pkg\mingw-packages\mingw-w64-v8\src\gn\build\gen.py", line 153, in GenerateLastCommitPosition
    describe_output = subprocess.check_output(
  File "C:/msys64/mingw64/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:/msys64/mingw64/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'describe', 'HEAD', '--match', 'initial-commit']' returned non-zero exit status 128.
==> ERROR: A failure occurred in build().
    Aborting...

git apply ${srcdir}/0001-add-mingw-toolchain.patch
出错在这两行
 python "${srcdir}"/build/util/lastchange.py -o "${srcdir}"/build/util/LASTCHANGE
 python build/gen.py --out-path=out/${CARCH} --platform=mingw

标签:...,msys2,src,patching,clones,bare,build,file,v8
来源: https://www.cnblogs.com/marklove/p/16292046.html