Hello.
After updating gcc from 4.7.3 to 4.7.4 on our illumos distribution
(OpenIndiana Hipster) I can't longer compile clang.
Compilation fails with
llvm[5]: Compiling CIndexCodeCompletion.cpp for Release+Asserts build (PIC)
llvm[5]: Linking Release+Asserts executable clang-check (without symbols)
Undefined first referenced
symbol in file
vtable for clang::tooling::FrontendActionFactory*
clang::tooling::newFrontendActionFactory<clang_check::ClangCheckActionFactory>(clang_check::ClangCheckActionFactory*,
clang::tooling::SourceFileCallbacks*)::FrontendActionFactoryAdapter::ConsumerFactoryAdaptor
/export/home/alp/srcs/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check/Release+Asserts/ClangCheck.o
ld: fatal: symbol referencing errors. No output written to
/export/home/alp/srcs/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check
collect2: error: ld returned 1 exit status
make[5]: ***
[/export/home/alp/srcs/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check]
Error 1
make[5]: Leaving directory
`/export/home/alp/srcs/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check'
make[4]: *** [clang-check/.makeall] Error 2
Tried to compile it with -O0, results are the same:
/usr/gcc/4.7/bin/g++
-I/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/include
-I/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check
-I/export/home/alp/srcs/tests/oi-userland/components/clang/llvm-3.3.src/include
-I/export/home/alp/srcs/tests/oi-userland/components/clang/llvm-3.3.src/tools/clang/tools/clang-check
-D_DEBUG -include llvm/Support/Solaris.h -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/export/home/alp/srcs/tests/oi-userland/components/clang/llvm-3.3.src/tools/clang/tools/clang-check/../../include
-I/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check/../../include
-O3 -fomit-frame-pointer -fvisibility-inlines-hidden -fno-exceptions
-fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing
-m32 -m32 -Wl,-R -Wl,'$ORIGIN/../lib' -Wl,-R
-Wl,/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/Release+Asserts/bin
-L/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/Release+Asserts/lib
-L/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/Release+Asserts/lib
-m32 -m32 -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter
-Wwrite-strings -Wno-maybe-uninitialized
-Wno-missing-field-initializers -o
/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check
/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check/Release+Asserts/ClangCheck.o
-lclangFrontend -lclangSerialization -lclangDriver -lclangTooling
-lclangParse -lclangSema -lclangAnalysis -lclangRewriteFrontend
-lclangRewriteCore -lclangEdit -lclangAST -lclangLex -lclangBasic \
-lLLVMBitReader -lLLVMAsmParser -lLLVMSystemZCodeGen
-lLLVMSystemZAsmParser -lLLVMSystemZDesc -lLLVMSystemZInfo
-lLLVMSystemZAsmPrinter -lLLVMHexagonCodeGen -lLLVMHexagonAsmPrinter
-lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc
-lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMBlazeDisassembler
-lLLVMMBlazeCodeGen -lLLVMMBlazeDesc -lLLVMMBlazeAsmPrinter
-lLLVMMBlazeAsmParser -lLLVMMBlazeInfo -lLLVMCppBackendCodeGen
-lLLVMCppBackendInfo -lLLVMMSP430CodeGen -lLLVMMSP430Desc
-lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMXCoreDisassembler
-lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter
-lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser
-lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMARMDisassembler
-lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo
-lLLVMARMAsmPrinter -lLLVMAArch64Disassembler -lLLVMAArch64CodeGen
-lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info
-lLLVMAArch64AsmPrinter -lLLVMAArch64Utils -lLLVMPowerPCCodeGen
-lLLVMPowerPCDesc -lLLVMPowerPCAsmPrinter -lLLVMPowerPCAsmParser
-lLLVMPowerPCInfo -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo
-lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen
-lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen
-lLLVMObjCARCOpts -lLLVMScalarOpts -lLLVMInstCombine
-lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMX86Desc
-lLLVMX86Info -lLLVMTarget -lLLVMX86AsmPrinter -lLLVMMC -lLLVMObject
-lLLVMX86Utils -lLLVMCore -lLLVMSupport -lz -lpthread -lmalloc -lm
Undefined first referenced
symbol in file
vtable for clang::tooling::FrontendActionFactory*
clang::tooling::newFrontendActionFactory<clang_check::ClangCheckActionFactory>(clang_check::ClangCheckActionFactory*,
clang::tooling::EndOfSourceFileCallback*)::FrontendActionFactoryAdapter::ConsumerFactoryAdaptor
/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check/Release+Asserts/ClangCheck.o
ld: fatal: symbol referencing errors. No output written to
/export/home/alp/srcs/tests/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check
Undefined first referenced
symbol in file
Can someone help me to debug this issue?
--
Best regards,
Alexander Pyhalov,
system administrator of Computer Center of Southern Federal University