Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] frama-clang build error

  • Subject: [Frama-c-discuss] frama-clang build error
  • From: Bruno.EZVAN at (Ezvan Bruno)
  • Date: Thu, 18 Aug 2016 12:43:55 +0000


This problem arises when linking object files or libraries that don't share the same ABI. Since GCC 5.1, there are breaking changes in std::string and std::list in the new libstdc++ and they require ABI change. The [abi:cxx1] tag is added in the symbol to keep track of the required ABI. In our case, you built framaCIRGEN with the new ABI (clang::DeclarationName::getAsString[abi:cxx11]) while our clang library provides only the old ABI symbol (clang::DeclarationName::getAsString).

To resolve the issue, you have two or three solutions:
+ Build clang with our compiler or install a clang binary package built with gcc >= 5.1 to have clang with the new ABI.
+ Build frama-clang with the old ABI using the -D _GLIBCXX_USE_CXX11_ABI=0 compilation option
+ I am not sure about this one: use clang < 3.9 to build frama-clang. It should build but I am not sure the binary will work!

Source :


From: Frama-c-discuss [mailto:frama-c-discuss-bounces at] On Behalf Of ???
Sent: jeudi 18 août 2016 05:33
To: frama-c-discuss at
Subject: [+SPAM+]: [Frama-c-discuss] frama-clang build error

When I built frama-clang, there were errors during linking

make[1]: Entering directory '/home/talos/Downloads/frama-clang'
Linking      bin/framaCIRGen
./Clang_utils.o: In function `Clang_utils::makeQualifiedName(clang::NamedDecl const&, bool) const':
/home/talos/Downloads/frama-clang/Clang_utils.cpp:782: undefined reference to `clang::DeclarationName::getAsString[abi:cxx11]() const'
./Clang_utils.o: In function `Clang_utils::retrieveTypeOfField(clang::Type const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, _term_offset*&, _logic_type*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, clang::ASTContext const*, clang::Sema*, clang::SourceLocation const&, RTTITable const&) const':
/home/talos/Downloads/frama-clang/Clang_utils.cpp:2296: undefined reference to `clang::DeclarationName::getAsString[abi:cxx11]() const'
./Clang_utils.o: In function `clang::QualType::getAsString[abi:cxx11](clang::SplitQualType)':
/usr/local/include/clang/AST/Type.h:905: undefined reference to `clang::QualType::getAsString[abi:cxx11](clang::Type const*, clang::Qualifiers)'
./Clang_utils.o: In function `clang::NamedDecl::getNameAsString[abi:cxx11]() const':
/usr/local/include/clang/AST/Decl.h:184: undefined reference to `clang::DeclarationName::getAsString[abi:cxx11]() const'
./Clang_utils.o: In function `Clang_utils::loc_as_string[abi:cxx11](clang::SourceLocation const&) const':
/home/talos/Downloads/frama-clang/Clang_utils.h:723: undefined reference to `clang::SourceLocation::printToString[abi:cxx11](clang::SourceManager const&) const'
./ClangVisitor.o: In function `FramacVisitor::parseFunctionContractComment(AnnotationComment&, _option*&, clang::FunctionDecl const*)':
/home/talos/Downloads/frama-clang/ClangVisitor.cpp:5681: undefined reference to `clang::DeclarationNameInfo::getAsString[abi:cxx11]() const'
/home/talos/Downloads/frama-clang/ClangVisitor.cpp:5690: undefined reference to `clang::DeclarationNameInfo::getAsString[abi:cxx11]() const'
./ClangVisitor.o: In function `FramacVisitor::insertConstructorPreambleIn(clang::CXXConstructorDecl const&, _list*&, bool*)':
/home/talos/Downloads/frama-clang/ClangVisitor.cpp:6286: undefined reference to `clang::DeclarationName::getAsString[abi:cxx11]() const'
./ClangVisitor.o: In function `FramacVisitor::localLexicalVisitNamespaceDecl(clang::NamespaceDecl*)':
/home/talos/Downloads/frama-clang/ClangVisitor.cpp:7409: undefined reference to `clang::NamedDecl::getQualifiedNameAsString[abi:cxx11]() const'
./ClangVisitor.o: In function `FramacVisitor::VisitNamespaceDecl(clang::NamespaceDecl*)':
/home/talos/Downloads/frama-clang/ClangVisitor.cpp:7459: undefined reference to `clang::NamedDecl::getQualifiedNameAsString[abi:cxx11]() const'
./ClangVisitor.o: In function `FramacVisitor::VisitTypedefNameDecl(clang::TypedefNameDecl*)':
/home/talos/Downloads/frama-clang/ClangVisitor.cpp:8605: undefined reference to `clang::NamedDecl::getQualifiedNameAsString[abi:cxx11]() const'
collect2: error: ld returned 1 exit status
Makefile.clang:75: recipe for target 'bin/framaCIRGen' failed
make[1]: *** [bin/framaCIRGen] Error 1
make[1]: Leaving directory '/home/talos/Downloads/frama-clang'
Makefile:81: recipe for target 'all' failed
make: *** [all] Error 2

This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <>