Created attachment 433746 [details, diff] qtscript-4.8.7-gcc-6.0.patch Encounters errors due to gcc 6.x compiling with -std=gnu++14 by default, like: /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:69: error: ‘std::tr1’ has not been declared template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { }; ^~~ /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:173:74: error: expected ‘{’ before ‘has_trivial_constructor’ template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { }; ^~~~~~~~~~~~~~~~~~~~~~~ /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:68: error: ‘std::tr1’ has not been declared template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { }; ^~~ /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h:174:73: error: expected ‘{’ before ‘has_trivial_destructor’ template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { }; ^~~~~~~~~~~~~~~~~~~~~~ ... /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h:264:83: error: ‘template<class T, class U> void QTWTF::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&)’ conflicts with a previous declaration template<typename T, typename U> inline void swap(pair<T, U>& a, pair<T, U>& b) ... /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:320:137: error: cannot bind bitfield ‘existingTransition->QTJSC::Structure::m_attributesInPrevious’ to ‘unsigned int&’ add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ... /var/tmp/portage/dev-qt/qtscript-4.8.7/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:320:137: error: cannot bind bitfield ‘existingTransition->QTJSC::Structure::m_attributesInPrevious’ to ‘unsigned int&’ add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ I guess the easiest way to fix it would be to add -std=gnu++98 to CXXFLAGS. Or alternatively, we could try patching it to compile with -std=gnu++14, like the attached patch.
Created attachment 435892 [details, diff] qtscript-4.8.7-gcc6.patch There also exist other incompatibilities with gcc-6. i.e, > error: cannot bind bitfield 'existingTransition->QTJSC::Structure::m_attributesInPrevious' to 'unsigned int&' > error: call of overloaded 'swap(std::pair<std::pair<QTWTF::RefPtr<QTJSC::UStringImpl>, unsigned int>, std::pair<QTJSC::Structure*, QTJSC::Structure*> >&, std::pair<std::pair<QTWTF::RefPtr<QTJSC::UStringImpl>, unsigned int>, std::pair<QTJSC::Structure*, QTJSC::Structure*> >&)' is ambiguous This patch contains several gcc6/c++11 fix-ups backported from qtscript-5, including the issue with ‘std::tr1’ not having been declared.
I confirm adding -std=gnu++98 to CXXFLAGS fixes the build problem. I haven't tried the patches yet.
*** Bug 593850 has been marked as a duplicate of this bug. ***
*** Bug 596830 has been marked as a duplicate of this bug. ***
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5959cfdb7a736cd0ac83bfb13e6fdfb987ac0217