Merge lp://staging/~jbicha/onboard/build-with-gcc-6 into lp://staging/onboard

Proposed by Jeremy Bícha
Status: Merged
Merged at revision: 2154
Proposed branch: lp://staging/~jbicha/onboard/build-with-gcc-6
Merge into: lp://staging/onboard
Diff against target: 12 lines (+1/-1)
1 file modified
Onboard/pypredict/lm/lm_dynamic_cached.h (+1/-1)
To merge this branch: bzr merge lp://staging/~jbicha/onboard/build-with-gcc-6
Reviewer Review Type Date Requested Status
marmuta Approve
Review via email: mp+298729@code.staging.launchpad.net

Description of the change

onboard FTBFS with gcc-6. You can see a (somewhat old) build failure here:

https://launchpadlibrarian.net/233698295/buildlog_ubuntu-xenial-i386.onboard_1.1.2-0ubuntu1_BUILDING.txt.gz

Onboard/pypredict/lm/lm_dynamic_cached.h:227:29: error: 'constexpr' needed for in-class initialization of static data member 'const double _CachedDynamicModel<NGramTrieRecency<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> > >::DEFAULT_LAMBDA' of non-integral type [-fpermissive]
         static const double DEFAULT_LAMBDA = 0.3; // Jelinek-Mercer weights
                             ^~~~~~~~~~~~~~

Onboard/pypredict/lm/lm_dynamic_cached.h: In instantiation of 'const double _CachedDynamicModel<NGramTrieRecency<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> > >::DEFAULT_LAMBDA':
Onboard/pypredict/lm/lm_dynamic_cached.h:272:13: required from 'void _CachedDynamicModel<TNGRAMS>::set_recency_lambdas(const std::vector<double>&) [with TNGRAMS = NGramTrieRecency<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> >]'
Onboard/pypredict/lm/lm_python.cpp:1529:41: required from here
Onboard/pypredict/lm/lm_dynamic_cached.h:227:29: error: 'constexpr' needed for in-class initialization of static data member 'const double _CachedDynamicModel<NGramTrieRecency<TrieNode<TrieNodeKNBase<RecencyNode> >, BeforeLastNode<BeforeLastNodeKNBase<RecencyNode>, LastNode<RecencyNode> >, LastNode<RecencyNode> > >::DEFAULT_LAMBDA' of non-integral type [-fpermissive]

Debian unstable is planning to switch to GCC by default within the next month and to ship the next version of Debian without support for earlier GCC versions.

https://lists.debian.org/debian-devel-announce/2016/06/msg00007.html

You can test-build with the new gcc by adding this to debian/rules:

export CC=gcc-6
export CXX=g++-6

and add g++-6 to your Build-Depends.

Anyway, here's a patch from Arch that fixes this issue.

To post a comment you must log in.
Revision history for this message
marmuta (marmuta) wrote :

Thanks for patch and instructions. I'll merge this and then try to get rid of the warning with C++98.

review: Approve
Revision history for this message
marmuta (marmuta) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches