New issue
Advanced search Search tips

Issue 872542 link

Starred by 1 user

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

v8 build library error

Reported by tai...@gmail.com, Aug 9

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce the problem:
1. Download the V8 source code by following the git instructions.

2. Create a build configuration using the helper script: tools/dev/v8gen.py x64.release

3. Edit the default build configuration by running gn args out.gn/x64.release. Add these lines to your configuration:
```
is_component_build = false
v8_static_library = true
use_custom_libcxx = false
use_custom_libcxx_for_host = false
```

4. Build via `ninja -C out.gn/x64.release` on a Windows 10 x64 to generate the binaries.

5. Error

6. Though it raise a error, it still have generated all the lib I need.
   But use in VS2017 shows that
```
1>C:\v8\v8\out.gn\x64.release\obj\v8_base.lib : fatal error LNK1127: library is corrupt
```
same problem: 
https://bugs.chromium.org/p/chromium/issues/detail?id=485148

What is the expected behavior?
5. build pass
6. build pass

What went wrong?
c:\v8\v8>ninja -C out.gn\x64.release
ninja: Entering directory `out.gn\x64.release'
[3/13] LINK cctest.exe cctest.exe.pdb
FAILED: cctest.exe cctest.exe.pdb
ninja -t msvc -e environment.x64 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /OUT:./cctest.exe /PDB:./cctest.exe.pdb @./cctest.exe.rsp
lld-link.exe: error: <root>: undefined symbol: mainCRTStartup

Did this work before? N/A 

Chrome version: 67.0.3396.62  Channel: dev
OS Version: 10.0
Flash Version: 

I tried do like this step by step in a new folder: https://medium.com/dailyjs/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4
still same problem.
 
Labels: Needs-Milestone
try to checkout 7.0.174, still same problem: 


c:\v8\v8>git checkout 7.0.174
Checking out files: 100% (4556/4556), done.
Previous HEAD position was 4d61cf35f1 Version 6.3.292.49
HEAD is now at cbcf8cb156 Version 7.0.174

c:\v8\v8>cd ..

c:\v8>gclient sync
Syncing projects: 100% (24/24), done.

________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-luci -d v8/tools/luci-go/win64' in 'c:\v8'
0> Downloading v8/tools/luci-go/win64\isolate.exe...
Downloading 1 files took 14.506000 second(s)
Hook 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-luci -d v8/tools/luci-go/win64' took 14.62 secs
Running hooks:  37% (11/29) gn_win
________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-gn -s v8/buildtools/win/gn.exe.sha1' in 'c:\v8'
0> Downloading v8/buildtools/win/gn.exe...
Downloading 1 files took 10.189000 second(s)
Hook 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-gn -s v8/buildtools/win/gn.exe.sha1' took 10.29 secs
Running hooks:  48% (14/29) wasm_spec_tests
________ running 'download_from_google_storage --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s v8/test/wasm-spec-tests/tests.tar.gz.sha1' in 'c:\v8'
0> Downloading v8/test/wasm-spec-tests/tests.tar.gz...
0> Removed v8/test/wasm-spec-tests/tests...
0> Extracting 72 entries from v8/test/wasm-spec-tests/tests.tar.gz to v8/test/wasm-spec-tests/tests
Downloading 1 files took 8.754000 second(s)
Running hooks:  86% (25/29) clang
________ running 'C:\v8\depot_tools\win_tools-2_7_6_bin\python\bin\python.exe v8/tools/clang/scripts/update.py' in 'c:\v8'
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Win/clang-338452-1.tgz .......... Done.
Copying C:\Program Files (x86)/Microsoft Visual Studio/2017/Community\DIA SDK\bin\amd64\msdia140.dll to c:\v8\v8\third_party\llvm-build\Release+Asserts\bin
Hook ''C:\v8\depot_tools\win_tools-2_7_6_bin\python\bin\python.exe' v8/tools/clang/scripts/update.py' took 56.07 secs
Running hooks: 100% (29/29), done.

WARNING: 'v8/testing/gtest' has been moved from DEPS to a higher level checkout. The git folder containing all the local branches has been saved to c:\v8\old_v8_testing_gtest.git.
If you don't care about its state you can safely remove that folder to free up space.

WARNING: 'v8/testing/gmock' has been moved from DEPS to a higher level checkout. The git folder containing all the local branches has been saved to c:\v8\old_v8_testing_gmock.git.
If you don't care about its state you can safely remove that folder to free up space.
c:\v8>cd v8

c:\v8\v8>python tools/dev/v8gen.py x64.release
c:\v8\v8>echo v8_static_library = true >> out.gn\x64.release\args.gn

c:\v8\v8>echo is_component_build = false >> out.gn\x64.release\args.gn

c:\v8\v8>ninja -C out.gn/x64.release
ninja: Entering directory `out.gn/x64.release'
[1/1] Regenerating ninja files
WARNING at build arg file (use "gn args <out_dir>" to edit):1:38: Build argument has no effect.
android_unstripped_runtime_outputs = false
                                     ^----
The variable "android_unstripped_runtime_outputs" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

To view all possible args, run "gn args --list <out_dir>"

The build continued as if that argument was unspecified.

[1566/1580] LINK cctest.exe cctest.exe.pdb
FAILED: cctest.exe cctest.exe.pdb
ninja -t msvc -e environment.x64 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /OUT:./cctest.exe /PDB:./cctest.exe.pdb @./cctest.exe.rsp
lld-link.exe: error: <root>: undefined symbol: mainCRTStartup
[1568/1580] LINK v8_shell.exe v8_shell.exe.pdb
ninja: build stopped: subcommand failed.


----------------------------------------------

the v8_base.lib was generated, same problem: 
1>C:\v8\v8\out.gn\x64.release\obj\v8_base.lib : fatal error LNK1127: library is corrupt
Components: -Blink Build
Labels: Triaged-ET TE-NeedsTriageHelp
Thanks for filing the issue!

As the issue is related to Build, which is out of scope for TE to triage it, hence adding TE-NeedsTriageHelp and requesting someone from  Dev team have a look at this issue.

Thanks!

Sign in to add a comment