Page MenuHomePhabricator

wikidiff2 fails to build with GCC 8
Closed, ResolvedPublic

Description

In file included from /usr/include/c++/8/vector:64,
                 from /srv/mediawiki/php/wikidiff2/DiffEngine.h:10,
                 from /srv/mediawiki/php/wikidiff2/Wikidiff2.h:12,
                 from /srv/mediawiki/php/wikidiff2/php_wikidiff2.cpp:11:
/usr/include/c++/8/bits/stl_vector.h: In instantiation of ‘class std::vector<DiffOp<Word>, PhpAllocator<Word> >’:
/srv/mediawiki/php/wikidiff2/DiffEngine.h:108:16:   required from ‘class Diff<Word>’
/srv/mediawiki/php/wikidiff2/DiffEngine.h:425:6:   required from here
/usr/include/c++/8/bits/stl_vector.h:354:21: error: static assertion failed: std::vector must have the same value_type as its allocator
       static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In instantiation of ‘class std::vector<DiffOp<std::__cxx11::basic_string<char, std::char_traits<char>, PhpAllocator<char> > >, PhpAllocator<std::__cxx11::basic_string<char, std::char_traits<char>, PhpAllocator<char> > > >’:
/srv/mediawiki/php/wikidiff2/DiffEngine.h:108:16:   required from ‘class Diff<std::__cxx11::basic_string<char, std::char_traits<char>, PhpAllocator<char> > >’
/srv/mediawiki/php/wikidiff2/Wikidiff2.h:91:30:   required from here
/usr/include/c++/8/bits/stl_vector.h:354:21: error: static assertion failed: std::vector must have the same value_type as its allocator
In file included from /usr/include/c++/8/map:61,
                 from /srv/mediawiki/php/wikidiff2/DiffEngine.h:11,
                 from /srv/mediawiki/php/wikidiff2/Wikidiff2.h:12,
                 from /srv/mediawiki/php/wikidiff2/php_wikidiff2.cpp:11:
/usr/include/c++/8/bits/stl_map.h: In instantiation of ‘class std::map<Word, std::vector<int, PhpAllocator<int> >, std::less<Word>, PhpAllocator<std::vector<int, PhpAllocator<int> > > >’:
/srv/mediawiki/php/wikidiff2/DiffEngine.h:454:13:   required from ‘int DiffEngine<T>::diag(int, int, int, int, int, DiffEngine<T>::IntPairVector&) [with T = Word; DiffEngine<T>::IntPairVector = std::vector<std::pair<int, int>, PhpAllocator<std::pair<int, int> > >]’
/srv/mediawiki/php/wikidiff2/DiffEngine.h:607:9:   required from ‘void DiffEngine<T>::compareseq(int, int, int, int) [with T = Word]’
/srv/mediawiki/php/wikidiff2/DiffEngine.h:355:2:   required from ‘void DiffEngine<T>::diff(const ValueVector&, const ValueVector&, Diff<T>&, long long int) [with T = Word; DiffEngine<T>::ValueVector = std::vector<Word, PhpAllocator<Word> >]’
/srv/mediawiki/php/wikidiff2/DiffEngine.h:751:2:   required from ‘Diff<T>::Diff(const ValueVector&, const ValueVector&, long long int) [with T = Word; Diff<T>::ValueVector = std::vector<Word, PhpAllocator<Word> >]’
/srv/mediawiki/php/wikidiff2/DiffEngine.h:762:51:   required from here
/usr/include/c++/8/bits/stl_map.h:122:21: error: static assertion failed: std::map must have the same value_type as its allocator
       static_assert(is_same<typename _Alloc::value_type, value_type>::value,
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ g++-8 --version
g++-8 (Debian 8-20180425-1) 8.0.1 20180425 (experimental) [trunk revision 259628]

GCC8 changes: https://gcc.gnu.org/gcc-8/changes.html

Full build log is P7050, run on Debian unstable with PHP 7.2.4. Downstream report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897887

Related Objects

Event Timeline

Change 433489 had a related patch set uploaded (by Legoktm; owner: Skizzerz):
[mediawiki/php/wikidiff2@master] Fix build failures under GCC 8

https://gerrit.wikimedia.org/r/433489

Change 433489 merged by jenkins-bot:
[mediawiki/php/wikidiff2@master] Fix build failures under GCC 8

https://gerrit.wikimedia.org/r/433489

Vvjjkkii renamed this task from wikidiff2 fails to build with GCC 8 to 9zdaaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Skizzerz as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Skizzerz; removed: gerritbot, Aklapper.
CommunityTechBot renamed this task from 9zdaaaaaaa to wikidiff2 fails to build with GCC 8.Jul 2 2018, 4:33 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Skizzerz.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: gerritbot, Aklapper; removed: Skizzerz.