tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.74k stars 260 forks source link

Build failure #264

Closed bondhugula closed 5 years ago

bondhugula commented 5 years ago

Build fails on the trunk (c3ae3aee69e97211277e50ef68c5a5ac192da9ca).


        ^
[13/362] Building SPIRVOps.h.inc...
FAILED: projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h.inc 
cd /home/uday/llvm-project-bondhugula/build.release && /home/uday/llvm-project-bondhugula/build.release/bin/mlir-tblgen -gen-op-decls -I/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include -I/home/uday/llvm-project-bondhugula/build.release/projects/mlir/include -I /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV -I /home/uday/llvm-project-bondhugula/llvm/include /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td --write-if-changed -o projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h.inc -d projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h.inc.d
Included from /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td:33:
/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td:26:9: error: File '/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td' has already been included.
include "mlir/Dialect/SPIRV/SPIRVBase.td"
        ^
/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td:32:9: note: previously included here
include "mlir/Dialect/SPIRV/SPIRVBase.td"
        ^
Included from /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td:33:
/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td:26:9: error: Unexpected input at top level
include "mlir/Dialect/SPIRV/SPIRVBase.td"
        ^
[14/362] Building SPIRVOps.cpp.inc...
FAILED: projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.cpp.inc 
cd /home/uday/llvm-project-bondhugula/build.release && /home/uday/llvm-project-bondhugula/build.release/bin/mlir-tblgen -gen-op-defs -I/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include -I/home/uday/llvm-project-bondhugula/build.release/projects/mlir/include -I /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV -I /home/uday/llvm-project-bondhugula/llvm/include /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td --write-if-changed -o projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.cpp.inc -d projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.cpp.inc.d
Included from /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td:33:
/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td:26:9: error: File '/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td' has already been included.
include "mlir/Dialect/SPIRV/SPIRVBase.td"
        ^
/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td:32:9: note: previously included here
include "mlir/Dialect/SPIRV/SPIRVBase.td"
        ^
Included from /home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td:33:
/home/uday/llvm-project-bondhugula/llvm/projects/mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td:26:9: error: Unexpected input at top level
include "mlir/Dialect/SPIRV/SPIRVBase.td"
        ^
ninja: build stopped: subcommand failed.
``
bondhugula commented 5 years ago

The culprit commit is actually this one:

commit 71da5c29c00888cdf27256cd73e9f46fa55c8bdc
Author: River Riddle <riverriddle@google.com>
Date:   Fri Nov 22 17:51:23 2019 -0800
    NFC: Remove unnecessarily guarded tablegen includes.

    Support for including a file multiple times was added in tablegen, removing the need for these extra guards. This is because we already insert c/c++ style header guards within each of the specific .td files.

    PiperOrigin-RevId: 282076728
joker-eph commented 5 years ago

You need to git pull LLVM itself. Please re-open if you still see the failure.