New issue
Advanced search Search tips

Issue 885008 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 884427
Owner: ----
Closed: Sep 18
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Clang assert during build: Layout && "Unable to find record layout information for type"

Reported by bradgraf...@gmail.com, Sep 18

Issue description

I'm getting a Clang assert identical to the one noted in  Issue 884427 , however I'm using the pinned, pre-built version while trying to build trunk of Chromium. Here's a snippet of the assert and stackdump:

    Assertion failed: Layout && "Unable to find record layout information for type", file C:\b\rr\tmpqtnxqp\w\src\third_party\llvm\tools\clang\lib\CodeGen\CodeGenTypes.cpp, line 770
    LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe

    LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe

    LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB.  Make sure the file exists and is readable.  Calling loadDataForExe

    #0 0x00007ff794752cf6 (R:\Temp\chromium-src\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x1a92cf6)
    #1 0x00007ff796767bdb (R:\Temp\chromium-src\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x3aa7bdb)
    #2 0x00007ff79675f234 (R:\Temp\chromium-src\chromium\src\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe+0x3a9f234)


My args.gn are:

    is_component_build = true
    symbol_level = 2
    enable_nacl = false
    target_cpu = "x86"
    remove_webcore_debug_symbols = true

With these set of args, the failure always happens while compiling third_party/blink/renderer/modules/modules_initializer.cc .

I have tried sync'ing and even gen'ing a fresh output directory to no avail. Thanks to some troubleshooting from thakis@ via IRC, I did confirm that I appear to be using the pinned, known-good version of clang:

    R:\Temp\chromium-src\chromium\src>"third_party\llvm-build\Release+Asserts\bin\clang-cl.exe" --version
    clang version 8.0.0 (trunk 340925)
    Target: x86_64-pc-windows-msvc
    Thread model: posix
    InstalledDir: R:\Temp\chromium-src\chromium\src\third_party\llvm-build\Release+Asserts\bin

I'm building via `autoninja -C out\dbg chrome`. My PC is running Windows 10 Pro, version 1607, with an i7-6700K CPU and 16 GB of RAM. I've attached logs showing the full build error, a dump of my environment variables, and the .sh file referenced from the "clang-cl: note: diagnostic msg:" error.
 
error.log
20.5 KB View Download
environ.log
2.2 KB View Download
modules_initializer-4da006.sh
19.7 KB View Download
Stumbled upon  Issue 605570  that referenced this error message. It was determined that precompiled headers were the culprit, and a temporary workaround was to disable their usage. On a long shot, I tried it... looks like they were indeed at fault again.

Modifying build/config/pch.gni to add "&& !is_clang" to "enable_precompiled_headers" has allowed me to build.
Mergedinto: 884427
Status: Duplicate (was: Unconfirmed)
Thanks for filing this! See other bug comment 4; I didn't make that connection yesterday.

Sign in to add a comment