Build failing for bin/llgo due to some type incompatibility with bindings (339938svn) .

46 views
Skip to first unread message

Anita

unread,
Aug 16, 2018, 6:04:05 PM8/16/18
to llgo-dev
Building in tree as part of current LLVM-8.0 checkout (86864df09316191d1ea5da5d644af936accdc630).

Configuration (, Modular, Host toolchain is compiler-rt based):
  • ThinLTO at -O2
  • Modular build.
  • Ninja as the target generator.
  • Target: Linux 4.15, x86_64, ELF
  • Host toolchain: Clang 8.0.Xsvn with CompilerRT.
  • Fused libc++ (statically linked against libc++abi and libunwind).
  • .
Some not-so-useful information:

--------------------------------------------------------------
LLVM/Shared Configuration:
--------------------------------------------------------------
LIBLLVM:                   8.0.4069svn
ENABLE_ASSERT:             OFF (Global)
BUILD_LLDB:                OFF
BUILD_FUZZERS:             OFF
LLVM_BINDINGS:             go;
LLVM_YAML_OBJECT_TOOLS:    OFF
LLVM_UNCOMMON_TOOLS:       OFF
LLVM_USELESS_TOOLS:        OFF
LLVM_MINIMAL_FAST_BUILD:   OFF (Disables LTO and most tools)
--------------------------------------------------------------
Clang Configuration:
--------------------------------------------------------------
CLANG_ANALYZER_AND_ARCMT:  OFF (Required by most tools)
CLANG_TOOLS_EXTRA:         OFF (Required by libclang)
CLANG_USELESS_TOOLS:       OFF (Depend on extra)
CLANG_TOOLS:               OFF
--------------------------------------------------------------
LLVM Go Configuration:
--------------------------------------------------------------
BUILD_LLGO:                ON
GOPATH:                    /usr/lib/go-1.6/bin
GOLLVM_BUILD:              OFF
GOLLVM_DISABLE_LIBGO:      ON
--------------------------------------------------------------
Roots:
--------------------------------------------------------------
SRC_ROOT:     /q/SourceCache/llvm-trunk-8.0
BUILD_ROOT:   /o/org.llvm.caches/llvm-8.0/4069
INSTALL_PATH: /usr/local/sdk/llvm-8.0.4069
SDKROOT:      /usr/local/sdk/llvm-8.0.4068
--------------------------------------------------------------

Failure:

[3282/3320] Building Go executable llgo
FAILED: bin/llgo
cd /o/org.llvm.caches/llvm-8.0/4069/tools/llgo && /o/org.llvm.caches/llvm-8.0/4069/bin/llvm-go go=/usr/lib/go-1.6/bin/go "cc=/usr/local/sdk/llvm-8.0.4068/bin/clang " "cxx=/usr/local/sdk/llvm-8.0.4068/bin/clang++ " "cppflags= -I/o/org.llvm.caches/llvm-8.0/4069/include -I/q/SourceCache/llvm-trunk-8.0/include -I/o/org.llvm.caches/llvm-8.0/4069/tools/llgo/cmd/gllgo" "ldflags=-fuse-ld=/usr/local/sdk/llvm-8.0.4068/bin/ld.lld -march=skylake -rtlib=compiler-rt -L/q/SourceCache/llvm-trunk-8.0/kristinas_sysroot/lib -L/usr/local/sdk/llvm-8.0.4068/lib -Wl,-lto-O2 -stdlib=libc++ -fuse-ld=lld -Wl,--color-diagnostics -flto=thin -Wl,--thinlto-cache-dir=/o/org.llvm.caches/llvm-8.0/4069/lto.cache -Wl,-allow-shlib-undefined" packages=llvm.org/llgo=/q/SourceCache/llvm-trunk-8.0/tools/llgo build -o /o/org.llvm.caches/llvm-8.0/4069/bin/llgo llvm.org/llgo/cmd/gllgo
/tmp/gopath407484025/src/llvm.org/llvm/bindings/go/llvm/dibuilder.go:301: cannot use C.uint(t.Encoding) (type C.uint) as type C.LLVMDWARFTypeEncoding in argument to _Cfunc_LLVMDIBuilderCreateBasicType
[3285/3320] Linking CXX executable bin/clang-8
ninja: build stopped: subcommand failed.

Anita

unread,
Aug 17, 2018, 12:19:01 AM8/17/18
to llgo-dev
Sorted it out, for some reason the C<->Go FFI thing didn't like type erasing the typedef. Was as simple as using C.LLVMDWARFTypeEncoding in place of C.unsigned. I'll do a differential thing on Phabricator some time tomorrow, but it's pretty much NFC anyway (or not, that's what review is for!).

Bigger problem to sort out is __morestack_non_split as we lack them in compiler-rt and gcc versions aren't suitable due to GPL poison. I haven't looked into it too deeply but it seems that some changes in MC frame lowering code may also be required. That I will probably investigate some other day.
Reply all
Reply to author
Forward
0 new messages