[llvm-dev] darwin bootstrap failure

Jack Howarth via llvm-dev llvm-dev at lists.llvm.org
Sat Oct 14 09:36:39 PDT 2017


On Sat, Oct 14, 2017 at 11:38 AM, Don Hinton <hintonda at gmail.com> wrote:

> Sorry, LLVM_FORCE_ENABLE_DUMP is the variable, which is used along with
> LLVM_ENABLE_ASSERTIONS to set LLVM_ENABLE_DUMP.
>
> Again, I'm working on a fix, but could you also provide your cmake
> command?  Looks like we aren't handling your use case correctly.
>
> thanks..
> don
>

% grep -R LLVM_FORCE_ENABLE_DUMP *
CMakeCache.txt:LLVM_FORCE_ENABLE_DUMP:BOOL=OFF
CMakeCache.txt.orig:LLVM_FORCE_ENABLE_DUMP:BOOL=OFF
include/llvm/Config/llvm-config.h:/* Defined in debug builds and release
builds if LLVM_FORCE_ENABLE_DUMP

is what I see from a cmake options of...

-DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DCOMPILER_RT_ENABLE_IOS:BOOL=OFF
-DLLVM_ENABLE_FFI=ON -DFFI_INCLUDE_DIR=/sw/include
-DFFI_LIBRARY_DIR=/sw/lib -DLLVM_LIT_ARGS:STRING=-v
-DPYTHON_EXECUTABLE:FILEPATH=/sw/bin/python2.7
-DLIBOMP_OSX_ARCHITECTURES=x86_64;i386 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF
-DCMAKE_OSX_SYSROOT:STRING=/ -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=
-DLLVM_TARGETS_TO_BUILD=X86;PowerPC;ARM
-DCMAKE_INSTALL_PREFIX:PATH=/sw/opt/llvm-6.0
-DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_FLAGS=-fno-common
-DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=ON -DCMAKE_CXX_FLAGS=-fno-common
-DCMAKE_SHARED_LINKER_FLAGS= -L/sw/lib -DCMAKE_MODULE_LINKER_FLAGS=
-L/sw/lib -DCMAKE_EXE_LINKER_FLAGS= -L/sw/lib


> On Sat, Oct 14, 2017 at 8:32 AM, Jack Howarth <
> howarth.mailing.lists at gmail.com> wrote:
>
>>
>>
>> On Sat, Oct 14, 2017 at 11:25 AM, Don Hinton <hintonda at gmail.com> wrote:
>>
>>> Hi Jack:
>>>
>>> Yes, I was just looking at that.  Seems like TableGen wasn't done along
>>> with the rest of llvm.  I'll work up a complete patch shortly.
>>>
>>> Btw, I'm curious how this happened.  Do you have a stale CMakeCache.txt
>>> by any chance?  You might check the value for LLVM_ENABLE_DUMP and see if
>>> it's consistent.
>>>
>>> Again, I'll gen up a complete patch shortly -- sorry for delay, had to
>>> walk my dog first...
>>>
>>> thanks...
>>> don
>>>
>>
>> There are no instances of LLVM_ENABLE_DUMP being emitted during the
>> stage1 build (which is where the failure occurs). Greping for LLVM_ENABLE_DUMP
>> in  the stage1 build directory only shows...
>>
>> % grep -R LLVM_ENABLE_DUMP *
>>
>> include/llvm/Config/llvm-config.h:/* #undef LLVM_ENABLE_DUMP */
>>
>> Binary file utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/SubtargetEmitter.cpp.o
>> matches
>>
>>    Jack
>> ps A more general grep for DUMP in CMakeCacne.txt shows...
>>
>> % grep DUMP CMakeCache.txt
>> CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
>> LLVM_FORCE_ENABLE_DUMP:BOOL=OFF
>> LLVM_TOOL_LLVM_CXXDUMP_BUILD:BOOL=ON
>> LLVM_TOOL_LLVM_DWARFDUMP_BUILD:BOOL=ON
>> LLVM_TOOL_LLVM_OBJDUMP_BUILD:BOOL=ON
>> //ADVANCED property for variable: CMAKE_OBJDUMP
>> CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
>> //ADVANCED property for variable: LLVM_TOOL_LLVM_CXXDUMP_BUILD
>> LLVM_TOOL_LLVM_CXXDUMP_BUILD-ADVANCED:INTERNAL=1
>> //ADVANCED property for variable: LLVM_TOOL_LLVM_DWARFDUMP_BUILD
>> LLVM_TOOL_LLVM_DWARFDUMP_BUILD-ADVANCED:INTERNAL=1
>> //ADVANCED property for variable: LLVM_TOOL_LLVM_OBJDUMP_BUILD
>> LLVM_TOOL_LLVM_OBJDUMP_BUILD-ADVANCED:INTERNAL=1
>>
>>
>>> On Sat, Oct 14, 2017 at 8:06 AM, Jack Howarth <
>>> howarth.mailing.lists at gmail.com> wrote:
>>>
>>>>
>>>>
>>>> On Sat, Oct 14, 2017 at 10:25 AM, Don Hinton <hintonda at gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Jack:
>>>>>
>>>>> Looks like I missed this one in my recent change.
>>>>>
>>>>> Please let me know if this solves your problem:
>>>>>
>>>>> $ git diff
>>>>> diff --git a/utils/TableGen/InfoByHwMode.cpp
>>>>> b/utils/TableGen/InfoByHwMode.cpp
>>>>> index 7e1e1864356..8d3636432aa 100644
>>>>> --- a/utils/TableGen/InfoByHwMode.cpp
>>>>> +++ b/utils/TableGen/InfoByHwMode.cpp
>>>>> @@ -98,14 +98,16 @@ void ValueTypeByHwMode::writeToStream(raw_ostream
>>>>> &OS) const {
>>>>>    OS << '}';
>>>>>  }
>>>>>
>>>>> +#ifdef LLVM_ENABLE_DUMP
>>>>>  LLVM_DUMP_METHOD
>>>>>  void ValueTypeByHwMode::dump() const {
>>>>>    dbgs() << *this << '\n';
>>>>>  }
>>>>> +#endif
>>>>>
>>>>>  ValueTypeByHwMode llvm::getValueTypeByHwMode(Record *Rec,
>>>>>                                               const CodeGenHwModes
>>>>> &CGH) {
>>>>> -#ifndef NDEBUG
>>>>> +#ifdef LLVM_ENABLE_DUMP
>>>>>    if (!Rec->isSubClassOf("ValueType"))
>>>>>      Rec->dump();
>>>>>  #endif
>>>>>
>>>>>
>>>>> thanks...
>>>>> don
>>>>>
>>>>>
>>>> The patch seems to be incomplete as it moves the failure to...
>>>>
>>>> [  6%] Linking CXX executable ../../bin/llvm-tblgen
>>>> cd /sw/src/fink.build/llvm60-6.0.0-1/build/stage1/utils/TableGen &&
>>>> /sw/bin/cmake -E cmake_link_script CMakeFiles/llvm-tblgen.dir/link.txt
>>>> --verbose=1
>>>> /sw/src/fink.build/llvm60-6.0.0-1/opt-bin/ccclang++  -fno-common -fPIC
>>>> -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new
>>>> -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
>>>> -Wmissing-field-initializers -pedantic -Wno-long-long
>>>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor
>>>> -Wstring-conversion -O3 -Wl,-search_paths_first
>>>> -Wl,-headerpad_max_install_names  -L/sw/lib  -Wl,-dead_strip
>>>> CMakeFiles/obj.llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/AsmWriterEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/AsmWriterInst.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/Attributes.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CallingConvEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeEmitterGen.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenHwModes.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenInstruction.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenMapTable.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenRegisters.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenSchedule.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenTarget.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherGen.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcher.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/DisassemblerEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/FastISelEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/FixedLenDecoderEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/GlobalISelEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/InfoByHwMode.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/InstrInfoEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/IntrinsicEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/OptParserEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/RegisterBankEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/RegisterInfoEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/SearchableTableEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/SubtargetEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/SubtargetFeatureInfo.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/TableGen.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/Types.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/X86DisassemblerTables.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/X86EVEX2VEXTablesEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o
>>>> CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o  -o
>>>> ../../bin/llvm-tblgen -Wl,-rpath, at loader_path/../lib
>>>> ../../lib/libLLVMSupport.a ../../lib/libLLVMTableGen.a
>>>> ../../lib/libLLVMSupport.a -lcurses -lz -lm ../../lib/libLLVMDemangle.a
>>>> Undefined symbols for architecture x86_64:
>>>>   "llvm::SubtargetFeatureInfo::dump() const", referenced from:
>>>>       (anonymous namespace)::AsmMatcherInfo::buildInfo() in
>>>> AsmMatcherEmitter.cpp.o
>>>>   "(anonymous namespace)::MatchableInfo::dump() const", referenced
>>>> from:
>>>>       (anonymous namespace)::AsmMatcherEmitter::run(llvm::raw_ostream&)
>>>> in AsmMatcherEmitter.cpp.o
>>>> ld: symbol(s) not found for architecture x86_64
>>>> clang: error: linker command failed with exit code 1 (use -v to see
>>>> invocation)
>>>> make[2]: *** [bin/llvm-tblgen] Error 1
>>>> make[1]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
>>>> make: *** [all] Error 2
>>>>
>>>>         Jack
>>>>
>>>>
>>>>>
>>>>> On Sat, Oct 14, 2017 at 6:06 AM, Jack Howarth via llvm-dev <
>>>>> llvm-dev at lists.llvm.org> wrote:
>>>>>
>>>>>> Is anyone else seeing this bootstrap failure on current svn trunk?
>>>>>>
>>>>>> [  6%] Linking CXX executable ../../bin/llvm-tblgen
>>>>>> cd /sw/src/fink.build/llvm60-6.0.0-1/build/stage1/utils/TableGen &&
>>>>>> /sw/bin/cmake -E cmake_link_script CMakeFiles/llvm-tblgen.dir/link.txt
>>>>>> --verbose=1
>>>>>> /sw/src/fink.build/llvm60-6.0.0-1/opt-bin/ccclang++  -fno-common
>>>>>> -fPIC -fvisibility-inlines-hidden -Werror=date-time
>>>>>> -Werror=unguarded-availability-new -std=c++11 -Wall -W
>>>>>> -Wno-unused-parameter -Wwrite-strings -Wcast-qual
>>>>>> -Wmissing-field-initializers -pedantic -Wno-long-long
>>>>>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor
>>>>>> -Wstring-conversion -O3 -Wl,-search_paths_first
>>>>>> -Wl,-headerpad_max_install_names  -L/sw/lib  -Wl,-dead_strip
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/AsmMatcherEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/AsmWriterEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/AsmWriterInst.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/Attributes.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CallingConvEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeEmitterGen.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenHwModes.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenInstruction.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenMapTable.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenRegisters.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenSchedule.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CodeGenTarget.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherGen.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DAGISelMatcher.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/DisassemblerEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/FastISelEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/FixedLenDecoderEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/GlobalISelEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/InfoByHwMode.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/InstrInfoEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/IntrinsicEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/OptParserEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/RegisterBankEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/RegisterInfoEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/SearchableTableEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/SubtargetEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/SubtargetFeatureInfo.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/TableGen.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/Types.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/X86DisassemblerTables.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/X86EVEX2VEXTablesEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o
>>>>>> CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o  -o
>>>>>> ../../bin/llvm-tblgen -Wl,-rpath, at loader_path/../lib
>>>>>> ../../lib/libLLVMSupport.a ../../lib/libLLVMTableGen.a
>>>>>> ../../lib/libLLVMSupport.a -lcurses -lz -lm ../../lib/libLLVMDemangle.a
>>>>>> Undefined symbols for architecture x86_64:
>>>>>>   "llvm::Record::dump() const", referenced from:
>>>>>>       llvm::getValueTypeByHwMode(llvm::Record*, llvm::CodeGenHwModes
>>>>>> const&) in InfoByHwMode.cpp.o
>>>>>>   "llvm::SubtargetFeatureInfo::dump() const", referenced from:
>>>>>>       (anonymous namespace)::AsmMatcherInfo::buildInfo() in
>>>>>> AsmMatcherEmitter.cpp.o
>>>>>>   "(anonymous namespace)::MatchableInfo::dump() const", referenced
>>>>>> from:
>>>>>>       (anonymous namespace)::AsmMatcherEmitter::run(llvm::raw_ostream&)
>>>>>> in AsmMatcherEmitter.cpp.o
>>>>>> ld: symbol(s) not found for architecture x86_64
>>>>>> clang: error: linker command failed with exit code 1 (use -v to see
>>>>>> invocation)
>>>>>> make[2]: *** [bin/llvm-tblgen] Error 1
>>>>>> make[1]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
>>>>>> make: *** [all] Error 2
>>>>>>
>>>>>> This is on x86_64-apple-darwin16 with Xcode 9.0.
>>>>>>          Jack
>>>>>>
>>>>>> _______________________________________________
>>>>>> LLVM Developers mailing list
>>>>>> llvm-dev at lists.llvm.org
>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171014/7a1e7f61/attachment-0001.html>


More information about the llvm-dev mailing list