You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux reid-ubuntu-14 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
swift-4.0-branch
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, Linux
Assignee
None
Priority
Medium
md5: fed3d772fa0e5ed6760984e5c6ee5840
Issue Description:
The swift-4.0-branch is not able to be built using GCC 4.8 Compilation fails on clang/lib/APINotes/APINotesWriter.cpp, it appears to choke on some C++ template voodoo not supported in GCC 4.8.
Here is a snippet of the error
[ 21%] Updating Attributes.gen...
[ 21%] Updating Intrinsics.gen...
[ 21%] Built target intrinsics_gen
[ 21%] Building CXX object tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/Builtins.cpp.o
In file included from /home/rhochstedler/apple-swift-llvm/tools/clang/lib/APINotes/APINotesReader.cpp:17:0:
/home/rhochstedler/apple-swift-llvm/tools/clang/lib/APINotes/APINotesFormat.h:239:2: warning: extra ';' [-Wpedantic]
};
^
/home/rhochstedler/apple-swift-llvm/tools/clang/lib/APINotes/APINotesFormat.h:251:2: warning: extra ';' [-Wpedantic]
};
^
[ 21%] Building CXX object tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/CharInfo.cpp.o
[ 21%] Building CXX object tools/clang/lib/Lex/CMakeFiles/clangLex.dir/HeaderSearch.cpp.o
/home/rhochstedler/apple-swift-llvm/tools/clang/lib/APINotes/APINotesWriter.cpp: In instantiation of 'std::pair<unsigned int, unsigned int> {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::EmitKeyDataLength(llvm::raw_ostream&, {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::key_type_ref, {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::data_type_ref) [with Derived = {anonymous}::ObjCContextInfoTableInfo; KeyType = unsigned int; UnversionedDataType = clang::api_notes::ObjCContextInfo; {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::key_type_ref = unsigned int; {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::data_type_ref = const llvm::SmallVector<std::pair<clang::VersionTuple, clang::api_notes::ObjCContextInfo>, 1u>&; {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::data_type = llvm::SmallVector<std::pair<clang::VersionTuple, clang::api_notes::ObjCContextInfo>, 1u>]':
/home/rhochstedler/apple-swift-llvm/include/llvm/Support/OnDiskHashTable.h:188:59: required from 'llvm::OnDiskChainedHashTableGenerator<Info>::offset_type llvm::OnDiskChainedHashTableGenerator<Info>::Emit(llvm::raw_ostream&, Info&) [with Info = {anonymous}::ObjCContextInfoTableInfo; llvm::OnDiskChainedHashTableGenerator<Info>::offset_type = unsigned int]'
/home/rhochstedler/apple-swift-llvm/include/llvm/Support/OnDiskHashTable.h:144:29: required from 'llvm::OnDiskChainedHashTableGenerator<Info>::offset_type llvm::OnDiskChainedHashTableGenerator<Info>::Emit(llvm::raw_ostream&) [with Info = {anonymous}::ObjCContextInfoTableInfo; llvm::OnDiskChainedHashTableGenerator<Info>::offset_type = unsigned int]'
/home/rhochstedler/apple-swift-llvm/tools/clang/lib/APINotes/APINotesWriter.cpp:673:46: required from here
/home/rhochstedler/apple-swift-llvm/tools/clang/lib/APINotes/APINotesWriter.cpp:546:8: error: no matching function for call to 'getVersionedInfoSize(const data_type&, {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::EmitKeyDataLength(llvm::raw_ostream&, {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::key_type_ref, {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::data_type_ref) [with Derived = {anonymous}::ObjCContextInfoTableInfo; KeyType = unsigned int; UnversionedDataType = clang::api_notes::ObjCContextInfo; {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::key_type_ref = unsigned int; {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::data_type_ref = const llvm::SmallVector<std::pair<clang::VersionTuple, clang::api_notes::ObjCContextInfo>, 1u>&; {anonymous}::VersionedTableInfo<Derived, KeyType, UnversionedDataType>::data_type = llvm::SmallVector<std::pair<clang::VersionTuple, clang::api_notes::ObjCContextInfo>, 1u>]::__lambda2)'
});
^
The text was updated successfully, but these errors were encountered:
Further debugging points to an issue with the lambda functions when using gcc 4.8 that I have not been able to pinpoint.
Stubbing out the lambda functions in VersionedTableInfo::EmitKeyDataLength() and VersionedTableInfo::EmitData() allows the build to complete successfully, but obviously the functionality is not correct in this case.
Alternatively, defining EmitKeyDataLength() and EmitData() in the classes that derive from VersionedTableInfo allows the build to complete successfully. This would allow the functionality to be correct, but defeats the purpose of deriving from VersionedTableInfo.
Any other thoughts on why the lambda function is causing build failures?
Environment
Linux reid-ubuntu-14 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
gcc (Ubuntu 4.8.5-4ubuntu2) 4.8.5
swift-4.0-branch
Additional Detail from JIRA
md5: fed3d772fa0e5ed6760984e5c6ee5840
Issue Description:
The
swift-4.0-branch
is not able to be built using GCC 4.8 Compilation fails onclang/lib/APINotes/APINotesWriter.cpp
, it appears to choke on some C++ template voodoo not supported in GCC 4.8.Here is a snippet of the error
The text was updated successfully, but these errors were encountered: