Sid Manning
2012-Sep-27 21:16 UTC
[LLVMdev] LLVM build fails using gcc-4.7.0 and -std=c++11 flags
I just updated my llvm sources (revision 164794.) and I see the error, "overriding non-deleted function" when building with gcc 4.7.0 and passing -std=c++11. /usr2/sidneym/llvm/tools/install/bin/c++ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++11 -fPIC -fvisibility-inlines-hidden -I/local/scratch/llvm-tmp/build/lib/VMCore -I/local/scratch/llvm-tmp/llvm/lib/VMCore -I/local/scratch/llvm-tmp/build/include -I/local/scratch/llvm-tmp/llvm/include -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-exceptions -o CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o -c /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp In file included from /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp:27:0: /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:38:3: error: deleted function 'virtual llvm::Operator::~Operator()' In file included from /local/scratch/llvm-tmp/llvm/include/llvm/Constant.h:17:0, from /local/scratch/llvm-tmp/llvm/include/llvm/Constants.h:24, from /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp:22: /local/scratch/llvm-tmp/llvm/include/llvm/User.h:62:3: error: overriding non-deleted function 'virtual llvm::User::~User()' make[2]: *** [lib/VMCore/CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o] Error 1 make[2]: Leaving directory `/local/scratch/llvm-tmp/build' make[1]: *** [lib/VMCore/CMakeFiles/LLVMCore.dir/all] Error 2 make[1]: Leaving directory `/local/scratch/llvm-tmp/build' -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Craig Topper
2012-Sep-28 07:19 UTC
[LLVMdev] LLVM build fails using gcc-4.7.0 and -std=c++11 flags
I've fixed this specific error in r164813. Please let me know if there are more behind it. On Thu, Sep 27, 2012 at 2:16 PM, Sid Manning <sidneym at codeaurora.org> wrote:> > I just updated my llvm sources (revision 164794.) and I see the error, > "overriding non-deleted function" when building with gcc 4.7.0 and passing > -std=c++11. > > /usr2/sidneym/llvm/tools/**install/bin/c++ -D_GNU_SOURCE -D_DEBUG > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -std=c++11 -fPIC -fvisibility-inlines-hidden -I/local/scratch/llvm-tmp/**build/lib/VMCore > -I/local/scratch/llvm-tmp/**llvm/lib/VMCore -I/local/scratch/llvm-tmp/**build/include > -I/local/scratch/llvm-tmp/**llvm/include -Wall -W > -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long > -fno-exceptions -o CMakeFiles/LLVMCore.dir/**AsmWriter.cpp.o -c > /local/scratch/llvm-tmp/llvm/**lib/VMCore/AsmWriter.cpp > In file included from /local/scratch/llvm-tmp/llvm/** > lib/VMCore/AsmWriter.cpp:27:0: > /local/scratch/llvm-tmp/llvm/**include/llvm/Operator.h:38:3: error: > deleted function 'virtual llvm::Operator::~Operator()' > In file included from /local/scratch/llvm-tmp/llvm/** > include/llvm/Constant.h:17:0, > from /local/scratch/llvm-tmp/llvm/** > include/llvm/Constants.h:24, > from /local/scratch/llvm-tmp/llvm/** > lib/VMCore/AsmWriter.cpp:22: > /local/scratch/llvm-tmp/llvm/**include/llvm/User.h:62:3: error: > overriding non-deleted function 'virtual llvm::User::~User()' > make[2]: *** [lib/VMCore/CMakeFiles/**LLVMCore.dir/AsmWriter.cpp.o] Error > 1 > make[2]: Leaving directory `/local/scratch/llvm-tmp/**build' > make[1]: *** [lib/VMCore/CMakeFiles/**LLVMCore.dir/all] Error 2 > make[1]: Leaving directory `/local/scratch/llvm-tmp/**build' > > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >-- ~Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120928/61f607e0/attachment.html>
Sid Manning
2012-Sep-28 14:28 UTC
[LLVMdev] LLVM build fails using gcc-4.7.0 and -std=c++11 flags
On 09/28/12 02:19, Craig Topper wrote:> I've fixed this specific error in r164813. Please let me know if there > are more behind it. >I pulled this version, 164813 and the latest which is 164821 and I see essentially same error, the line number changed from 38 to 40. The problem seems to stem from the addition of LLVM_DELETED_FUNCTION. I reverted back to a version that doesn't have this the build proceeds without issue. While this probably isn't the correct fix, I removed all instances of LLVM_DELETED_FUNCTION from Operator.h and this allowed the build to complete. I don't know if it is the redundant use of delete or a problem with gcc-4.7.0 Here are the specifics from a build using the unmodified revision, r164813: cd /local/scratch/llvm-tmp/build/lib/VMCore && /usr2/sidneym/llvm/tools/install/bin/c++ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++11 -fPIC -fvisibility-inlines-hidden -I/local/scratch/llvm-tmp/build/lib/VMCore -I/local/scratch/llvm-tmp/llvm/lib/VMCore -I/local/scratch/llvm-tmp/build/include -I/local/scratch/llvm-tmp/llvm/include -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-exceptions -o CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o -c /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp In file included from /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp:27:0: /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:82:3: error: deleted function 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:136:3: error: deleted function 'virtual llvm::PossiblyExactOperator::~PossiblyExactOperator()' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:173:3: error: deleted function 'virtual llvm::FPMathOperator::~FPMathOperator()' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h: In instantiation of 'class llvm::ConcreteOperator<llvm::Operator, 29u>': /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:251:67: required from here /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:196:3: error: deleted function 'llvm::ConcreteOperator<SuperClass, Opc>::~ConcreteOperator() [with SuperClass = llvm::Operator; unsigned int Opc = 29u]' /local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()' make[2]: *** [lib/VMCore/CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o] Error 1 make[2]: Leaving directory `/local/scratch/llvm-tmp/build' make[1]: *** [lib/VMCore/CMakeFiles/LLVMCore.dir/all] Error 2 make[1]: Leaving directory `/local/scratch/llvm-tmp/build' make: *** [all] Error 2 sidneym at sidneym-ubuntu:..llvm-tmp/build> svnversion ../llvm 164813 sidneym at sidneym-ubuntu:..llvm-tmp/build> gcc --version gcc (GCC) 4.7.0 Copyright (C) 2012 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.> On Thu, Sep 27, 2012 at 2:16 PM, Sid Manning <sidneym at codeaurora.org > <mailto:sidneym at codeaurora.org>> wrote: > > > I just updated my llvm sources (revision 164794.) and I see the > error, "overriding non-deleted function" when building with gcc > 4.7.0 and passing -std=c++11. > > /usr2/sidneym/llvm/tools/__install/bin/c++ -D_GNU_SOURCE -D_DEBUG > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS > -D__STDC_LIMIT_MACROS -std=c++11 -fPIC -fvisibility-inlines-hidden > -I/local/scratch/llvm-tmp/__build/lib/VMCore > -I/local/scratch/llvm-tmp/__llvm/lib/VMCore > -I/local/scratch/llvm-tmp/__build/include > -I/local/scratch/llvm-tmp/__llvm/include -Wall -W > -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long > -fno-exceptions -o CMakeFiles/LLVMCore.dir/__AsmWriter.cpp.o -c > /local/scratch/llvm-tmp/llvm/__lib/VMCore/AsmWriter.cpp > In file included from > /local/scratch/llvm-tmp/llvm/__lib/VMCore/AsmWriter.cpp:27:0: > /local/scratch/llvm-tmp/llvm/__include/llvm/Operator.h:38:3: error: > deleted function 'virtual llvm::Operator::~Operator()' > In file included from > /local/scratch/llvm-tmp/llvm/__include/llvm/Constant.h:17:0, > from > /local/scratch/llvm-tmp/llvm/__include/llvm/Constants.h:24, > from > /local/scratch/llvm-tmp/llvm/__lib/VMCore/AsmWriter.cpp:22: > /local/scratch/llvm-tmp/llvm/__include/llvm/User.h:62:3: error: > overriding non-deleted function 'virtual llvm::User::~User()' > make[2]: *** [lib/VMCore/CMakeFiles/__LLVMCore.dir/AsmWriter.cpp.o] > Error 1 > make[2]: Leaving directory `/local/scratch/llvm-tmp/__build' > make[1]: *** [lib/VMCore/CMakeFiles/__LLVMCore.dir/all] Error 2 > make[1]: Leaving directory `/local/scratch/llvm-tmp/__build' > > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, > hosted by The Linux Foundation > _________________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/__mailman/listinfo/llvmdev > <http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> > > > > > -- > ~Craig-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation