Closed llvmbot closed 5 years ago
Re-tested with a pristine 70826, and it worked. There must have been some junk in my working directory that didn't go away after "make clean" but still managed to ruin my builds.
Revision 70771 builds fine, so the problem should have been introduced later than that (but no later than 70826).
Could you please attach your llvm-config file then?
It appears not to be related to debug or to the compiler version. I've build for retail (using --enable-optimized when configuring) and build with GCC 4 and GCC 3.4.4, and I get link errors in both. The warnings about the dwarf version go away though, so it seems that was a red herring.
$ svn info Path: . URL: http://llvm.org/svn/llvm-project/llvm/trunk Repository Root: http://llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 70845 Node Kind: directory Schedule: normal Last Changed Author: evancheng Last Changed Rev: 70821 Last Changed Date: 2009-05-04 05:30:11 +0200 (Mon, 04 May 2009)
GCC 4
$ ./config.status --version llvm config.status 2.6svn configured by ./configure, generated by GNU Autoconf 2.60, with options "'--prefix=/opt/llvm-svn' '--enable-optimized' 'CC=gcc-4' 'CFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include' 'LDFLAGS=-L/opt/llvm-svn/lib' 'CPPFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include' 'CXX=g++-4' 'CXXFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include'"
Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it.
Attaching clean build output as 78045_optimized_gcc4.txt
GCC 3
$ ./config.status --version llvm config.status 2.6svn configured by ./configure, generated by GNU Autoconf 2.60, with options "'--prefix=/opt/llvm-svn' '--enable-optimized' 'CC=gcc' 'CFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include' 'LDFLAGS=-L/opt/llvm-svn/lib' 'CPPFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include' 'CXX=g++' 'CXXFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include'"
Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it.
Attaching clean build output as 78045_optimized_gcc3.txt
$ gcc --version gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Building for debug on a supported platform with the currently shipping version on the complier should work, or it should be listed as a known issue in the release notes. Note that you're using beta snapshot-based compiler which can be pretty buggy (this already happened with cygwin in the past) especially for gcc secondary priority platform. I verified that mingw debug build is ok, that's why I assume that nothing is broken in LLVM codebase itself.
There were already problems with linkers for COFF targets which prevented LLVM build someday (see note in "Broken compilers and tools" section).
I added an entry here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090504/077100.html
Building for debug on a supported platform with the currently shipping version on the complier should work, or it should be listed as a known issue in the release notes.
Anyway, the problem may not be the dwarf version, but undefined references. In the clean build output (see attachment 2941), the dwarf version warnings are preceeded by the following:
llvm[2]: Linking Debug executable llc
Info: resolving std::cerr by linking to imp_ZSt4cerr (auto-import)
Info: resolving std::basic_string<char, std::char_traitsForceCodegenLinking': /c/temp/llvm-svn/include/llvm/CodeGen/LinkAllCodegenComponents.h:46: undefined reference to
llvm::createBURRListDAGScheduler(llvm::SelectionDAGISel, llvm::CodeGenOpt::Level)'
/c/temp/llvm-svn/include/llvm/CodeGen/LinkAllCodegenComponents.h:47: undefined reference to `llvm::createTDRRListDAGScheduler(llvm::SelectionDAGISel, llvm::CodeGenOpt::Level)'
/c/temp/llvm-svn/include/llvm/CodeGen/LinkAllCodegenComponents.h:48: undefined reference to llvm::createTDListDAGScheduler(llvm::SelectionDAGISel*, llvm::CodeGenOpt::Level)' /c/temp/llvm-svn/include/llvm/CodeGen/LinkAllCodegenComponents.h:49: undefined reference to
llvm::createFastDAGScheduler(llvm::SelectionDAGISel, llvm::CodeGenOpt::Level)'
/c/temp/llvm-svn/include/llvm/CodeGen/LinkAllCodegenComponents.h:50: undefined reference to `llvm::createDefaultScheduler(llvm::SelectionDAGISel, llvm::CodeGenOpt::Level)'
/c/temp/llvm-svn/tools/llc/Debug/llc.o: In function main': /c/temp/llvm-svn/tools/llc/llc.cpp:258: undefined reference to
llvm::cl::opt<char, false, llvm::cl::parserbasic_parser': /c/temp/llvm-svn/include/llvm/Support/CommandLine.h:531: undefined reference to
vtable for llvm::cl::basic_parserparser': /c/temp/llvm-svn/include/llvm/Support/CommandLine.h:686: undefined reference to
vtable for llvm::cl::parserllvm::cl::opt<char, false, llvm::cl::parser<char> >::setInitialValue(char const&)' /c/temp/llvm-svn/tools/llc/Debug/llc.o: In function
~basic_parser':
/c/temp/llvm-svn/include/llvm/Support/CommandLine.h:531: undefined reference to vtable for llvm::cl::basic_parser<char>' /c/temp/llvm-svn/tools/llc/Debug/llc.o: In function
~parser':
/c/temp/llvm-svn/include/llvm/Support/CommandLine.h:686: undefined reference to vtable for llvm::cl::parser<char>' /c/temp/llvm-svn/tools/llc/Debug/llc.o: In function
~opt':
/c/temp/llvm-svn/include/llvm/Support/CommandLine.h:833: undefined reference to vtable for llvm::cl::opt<char, false, llvm::cl::parser<char> >' /c/temp/llvm-svn/tools/llc/Debug/llc.o: In function
opt<char [2], llvm::cl::desc, llvm::cl::FormattingFlags, llvm::cl::NumOccurrences, llvm::cl::initializervtable for llvm::cl::opt<char, false, llvm::cl::parser<char> >' /c/temp/llvm-svn/include/llvm/Support/CommandLine.h:912: undefined reference to
llvm::cl::opt<char, false, llvm::cl::parserllvm::AsmPrinter::AsmPrinter(llvm::raw_ostream&, llvm::TargetMachine&, llvm::TargetAsmInfo const*, llvm::CodeGenOpt::Level, bool)' /usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: Dwarf Error: found dwarf version '30', this reader only handles version 2 information. /c/temp/llvm-svn/Debug/lib/LLVMMSP430.o:MSP430AsmPrinter.cpp:(.text+0xab5): undefined reference to
llvm::DwarfWriter::RecordSourceLine(unsigned int, unsigned int, llvm::DICompileUnit)'
The GCC version I'm using is
$ g++-4 --version g++-4 (GCC) 4.3.2 20080827 (beta) 2 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and ld is
$ ld --version GNU ld (GNU Binutils) 2.18.50.20080625 Copyright 2007 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty.
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: Dwarf Error: found dwarf version '8242', this reader only handles version 2 information. /c/temp/llvm-svn/Debug/lib/LLVMXCore.o:XCoreTargetMachine.cpp:(.rdata$_ZTVN4llvm18XCoreTargetMachineE[vtable for llvm::XCoreTargetMachine]+0x4c): undefined reference to `llvm::LLVMTargetMachine::addPassesToEmitMachineCode(llvm::PassManagerBase&, llvm::MachineCodeEmitter&, llvm::CodeGenOpt::Level)' Your gcc is broken then - it generates invalid debug information. This is not an LLVM bug. Try release version instead, maybe it will work.
Extended Description
Since Wednesday or Thursday last week, builds have failed on Cygwin with error messages like the following:
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: Dwarf Error: found dwarf version '8242', this reader only handles version 2 information. /c/temp/llvm-svn/Debug/lib/LLVMXCore.o:XCoreTargetMachine.cpp:(.rdata$_ZTVN4llvm18XCoreTargetMachineE[vtable for llvm::XCoreTargetMachine]+0x4c): undefined reference to `llvm::LLVMTargetMachine::addPassesToEmitMachineCode(llvm::PassManagerBase&, llvm::MachineCodeEmitter&, llvm::CodeGenOpt::Level)'
I'm attaching the make output from building again after a failure.
I am currently running revision 70826, but have had autobuild running since around 15:00 UTC on April 30. No builds have succeeded. The last revision that I know did not have this problem was 70374. Current svn info output:
$ svn info Path: . URL: http://llvm.org/svn/llvm-project/llvm/trunk Repository Root: http://llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 70826 Node Kind: directory Schedule: normal Last Changed Author: evancheng Last Changed Rev: 70821 Last Changed Date: 2009-05-04 05:30:11 +0200 (Mon, 04 May 2009)
And config.status --version:
$ ./config.status --version llvm config.status 2.6svn configured by ./configure, generated by GNU Autoconf 2.60, with options "'--prefix=/opt/llvm-svn' 'CC=gcc-4' 'CFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include/' 'LDFLAGS=-L/opt/llvm-svn/lib/' 'CPPFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include/' 'CXX=g++-4' 'CXXFLAGS=-I/opt/llvm-svn/lib/libffi-3.0.8/include/'"
Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it.