Jean-Daniel Dupas
2010-Aug-02 07:43 UTC
[LLVMdev] Problem building llvm after r109996 (Add InitializeNativeTargetAsmPrinter())
Hello, After I try making a clean build and got the following error: llvm[3]: Compiling EDDisassembler.cpp for Release build In file included from /llvm/include/llvm/Target/TargetSelect.h:38, from /llvm/lib/MC/MCDisassembler/EDDisassembler.cpp:37: /llvm/stage1/include/llvm/Config/AsmPrinters.def: In function ‘void LLVMInitializeX86TargetAsmPrinter()’: /llvm/stage1/include/llvm/Config/AsmPrinters.def:27: error: redefinition of ‘void LLVMInitializeX86TargetAsmPrinter()’ /llvm/stage1/include/llvm/Config/AsmPrinters.def:27: error: ‘void LLVMInitializeX86TargetAsmPrinter()’ previously defined here make[3]: *** [/llvm/stage1/lib/MC/MCDisassembler/Release/EDDisassembler.o] Error 1 ==== config Darwin10 x86_64 (and llvm-gcc from Xcode 3.2.3). ../configure --prefix=/opt/llvm-selfhost --without-llvmgcc --without-llvmgxx --disable-bindings --disable-assertions --enable-optimized --enable-targets=x86,x86_64 CC=llvm-gcc CXX=llvm-g++ == Is somebody else having trouble with this change ? -- Jean-Daniel
Daniel Dunbar
2010-Aug-02 15:55 UTC
[LLVMdev] Problem building llvm after r109996 (Add InitializeNativeTargetAsmPrinter())
Hi Jean-Daniel, My fault, I'm sure, but I don't see the problem yet. Is it possible your version of llvm/Config/AsmPrinters.def has X86 listed twice? - Daniel On Mon, Aug 2, 2010 at 12:43 AM, Jean-Daniel Dupas <devlists at shadowlab.org> wrote:> Hello, > > After I try making a clean build and got the following error: > > llvm[3]: Compiling EDDisassembler.cpp for Release build > In file included from /llvm/include/llvm/Target/TargetSelect.h:38, > from /llvm/lib/MC/MCDisassembler/EDDisassembler.cpp:37: > /llvm/stage1/include/llvm/Config/AsmPrinters.def: In function ‘void LLVMInitializeX86TargetAsmPrinter()’: > /llvm/stage1/include/llvm/Config/AsmPrinters.def:27: error: redefinition of ‘void LLVMInitializeX86TargetAsmPrinter()’ > /llvm/stage1/include/llvm/Config/AsmPrinters.def:27: error: ‘void LLVMInitializeX86TargetAsmPrinter()’ previously defined here > make[3]: *** [/llvm/stage1/lib/MC/MCDisassembler/Release/EDDisassembler.o] Error 1 > > > ==== config > > Darwin10 x86_64 (and llvm-gcc from Xcode 3.2.3). > > ../configure --prefix=/opt/llvm-selfhost --without-llvmgcc --without-llvmgxx --disable-bindings --disable-assertions --enable-optimized --enable-targets=x86,x86_64 CC=llvm-gcc CXX=llvm-g++ > > ==> > Is somebody else having trouble with this change ? > > > -- Jean-Daniel > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Jean-Daniel Dupas
2010-Aug-02 16:16 UTC
[LLVMdev] Problem building llvm after r109996 (Add InitializeNativeTargetAsmPrinter())
The problem is with llvm/Config/Targets.def If you pass --enable-targets=x86,x86_64 in the configure invocation, the generated Targets.def file contains 2 times LLVM_TARGET(X86) as they map both to the same native target. If you don't use the '--enable-targets=' option while configuring LLVM, LLVM_TARGET(X86) is inserted only once, that's why it works. I guess that until the change introduce by r109996, all files where gracefully handling the duplicate entry. I think I can safely workaround this issue by removing either x86 or x86_64 in my configure invocation. Le 2 août 2010 à 17:55, Daniel Dunbar a écrit :> Hi Jean-Daniel, > > My fault, I'm sure, but I don't see the problem yet. > > Is it possible your version of llvm/Config/AsmPrinters.def has X86 listed twice? > > - Daniel > > On Mon, Aug 2, 2010 at 12:43 AM, Jean-Daniel Dupas > <devlists at shadowlab.org> wrote: >> Hello, >> >> After I try making a clean build and got the following error: >> >> llvm[3]: Compiling EDDisassembler.cpp for Release build >> In file included from /llvm/include/llvm/Target/TargetSelect.h:38, >> from /llvm/lib/MC/MCDisassembler/EDDisassembler.cpp:37: >> /llvm/stage1/include/llvm/Config/AsmPrinters.def: In function ‘void LLVMInitializeX86TargetAsmPrinter()’: >> /llvm/stage1/include/llvm/Config/AsmPrinters.def:27: error: redefinition of ‘void LLVMInitializeX86TargetAsmPrinter()’ >> /llvm/stage1/include/llvm/Config/AsmPrinters.def:27: error: ‘void LLVMInitializeX86TargetAsmPrinter()’ previously defined here >> make[3]: *** [/llvm/stage1/lib/MC/MCDisassembler/Release/EDDisassembler.o] Error 1 >> >> >> ==== config >> >> Darwin10 x86_64 (and llvm-gcc from Xcode 3.2.3). >> >> ../configure --prefix=/opt/llvm-selfhost --without-llvmgcc --without-llvmgxx --disable-bindings --disable-assertions --enable-optimized --enable-targets=x86,x86_64 CC=llvm-gcc CXX=llvm-g++ >> >> ==>> >> Is somebody else having trouble with this change ? >> >> >> -- Jean-Daniel >> >> >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>-- Jean-Daniel