[Debian-med-packaging] C++ help needed for contrafold

Andreas Tille andreas at an3as.eu
Thu Sep 15 07:31:20 UTC 2016


Hi,

I intend to work down the list of software that is supported by
python-cogent but not in Debian - at least for the software that
is free and upstream is supportive.  Most of the software is a
bit aged but from our popcon values this is no reason to ignore
it since there is astonishing high usage also for software with
no updates for years.

My first candidate is contrafold which I injected into Git[1].
The build quite soon ends in:

g++ -O3 -DNDEBUG -W -pipe -Wundef -Winline --param large-function-growth=100000 -Wall  -c Contrafold.cpp
In file included from LBFGS.hpp:52:0,
                 from InnerOptimizationWrapper.hpp:12,
                 from OptimizationWrapper.hpp:12,
                 from Contrafold.cpp:16:
LBFGS.ipp: In instantiation of 'Real LBFGS<Real>::Minimize(std::vector<_Tp>&) [with Real = double]':
OptimizationWrapper.ipp:260:9:   required from 'void OptimizationWrapper<RealT>::LearnHyperparameters(std::vector<int>, std::vector<_Tp>&) [with RealT = double]'
Contrafold.cpp:451:9:   required from 'void RunTrainingMode(const Options&, const std::vector<FileDescription>&) [with RealT = double]'
Contrafold.cpp:68:54:   required from here
LBFGS.ipp:110:33: error: 'DoLineSearch' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
         Real step = DoLineSearch(x[k%2], f[k%2], g[k%2], d,
                     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  x[(k+1)%2], f[(k+1)%2], g[(k+1)%2],
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  Real(0), std::min(Real(10), MAX_STEP_NORM / std::max(Real(1), Norm(d))));
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LBFGS.ipp:110:33: note: declarations in dependent base 'LineSearch<double>' are not found by unqualified lookup
LBFGS.ipp:110:33: note: use 'this->DoLineSearch' instead
In file included from InferenceEngine.hpp:299:0,
                 from ComputationEngine.hpp:17,
                 from ComputationWrapper.hpp:13,
                 from Contrafold.cpp:12:
InferenceEngine.ipp: In instantiation of 'void InferenceEngine<RealT>::ComputeViterbi() [with RealT = float]':
ComputationEngine.ipp:93:5:   required from 'void ComputationEngine<RealT>::CheckParsability(std::vector<_Tp>&, const NonSharedInfo&) [with RealT = float]'
ComputationEngine.ipp:45:29:   required from 'void ComputationEngine<RealT>::DoComputation(std::vector<_Tp>&, const SharedInfo<RealT>&, const NonSharedInfo&) [with RealT = float]'
Contrafold.cpp:553:1:   required from here
InferenceEngine.ipp:2426:78: warning: address requested for 'k', which is declared 'register' [-Wextra]
InferenceEngine.ipp:117:85:
 #define UPDATE_MAX(bs,bt,s,t) { RealT work(s); if ((work)>(bs)) { (bs)=(work); (bt)=(t); } }
                                                                                     ~~~
InferenceEngine.ipp:2426:78:
                 UPDATE_MAX(FM2v, FM2t, FM1v[offset[i]+k] + FMv[offset[k]+j], k);
...............................................................................
InferenceEngine.ipp:117:86: note: in definition of macro 'UPDATE_MAX'
 #define UPDATE_MAX(bs,bt,s,t) { RealT work(s); if ((work)>(bs)) { (bs)=(work); (bt)=(t); } }
                                                                                      ^
InferenceEngine.ipp: In instantiation of 'void InferenceEngine<RealT>::ComputeViterbi() [with RealT = double]':
ComputationEngine.ipp:93:5:   required from 'void ComputationEngine<RealT>::CheckParsability(std::vector<_Tp>&, const NonSharedInfo&) [with RealT = double]'
ComputationEngine.ipp:45:29:   required from 'void ComputationEngine<RealT>::DoComputation(std::vector<_Tp>&, const SharedInfo<RealT>&, const NonSharedInfo&) [with RealT = double]'
Contrafold.cpp:553:1:   required from here
InferenceEngine.ipp:2426:78: warning: address requested for 'k', which is declared 'register' [-Wextra]
InferenceEngine.ipp:117:85:
 #define UPDATE_MAX(bs,bt,s,t) { RealT work(s); if ((work)>(bs)) { (bs)=(work); (bt)=(t); } }
                                                                                     ~~~
InferenceEngine.ipp:2426:78:
                 UPDATE_MAX(FM2v, FM2t, FM1v[offset[i]+k] + FMv[offset[k]+j], k);


So if anybody has some spare cycles some patches would be welcome.

Kind regards

     Andreas.


[1] https://anonscm.debian.org/git/debian-med/contrafold.git

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list