I am trying to build cdec on Ubuntu 18.04.1 LTS (running in VirtualBox on Windows 10). Please note that I am not at all an experienced Linux power-user.
I executed the commands given in the aforementioned cdec repo:
cmake . make -j4 make test ./tests/run-system-tests.pl
make I got an error to which I couldn't find the trace. Disabling multithreads and setting VERBOSE (
make VERBOSE=1), I got the following trace:
[ 79%] Building CXX object extractor/CMakeFiles/extractor.dir/backoff_sampler.cc.o cd /tmp/cdec/build/extractor && /usr/bin/c++ -DHAVE_CONFIG_H -DKENLM_MAX_ORDER=6 -I/tmp/cdec -I/tmp/cdec/build -I/usr/include/eigen3 -I/tmp/cdec/extractor/../utils -I/tmp/cdec/extractor -I/tmp/cdec/extractor/features -Wall -std=c++11 -O3 -g -fopenmp -o CMakeFiles/extractor.dir/backoff_sampler.cc.o -c /tmp/cdec/extractor/backoff_sampler.cc /tmp/cdec/extractor/backoff_sampler.cc: In member function ‘virtual extractor::PhraseLocation extractor::BackoffSampler::Sample(const extractor::PhraseLocation&, const std::unordered_set<int>&) const’: /tmp/cdec/extractor/backoff_sampler.cc:24:18: error: ‘round’ was not declared in this scope int sample = round(i); ^~~~~ /tmp/cdec/extractor/backoff_sampler.cc:24:18: note: suggested alternative: ‘rand’ int sample = round(i); ^~~~~ rand extractor/CMakeFiles/extractor.dir/build.make:86: recipe for target 'extractor/CMakeFiles/extractor.dir/backoff_sampler.cc.o' failed
I am not at all a C++ developer, but I would assume that the source code was written for a compiler that has a native
round() function (or something like that?), but that on my set-up this is not the case.
I am not sure which information could be useful, so here's a guess:
- Ubuntu 18.04.1 LTS
- gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
- GNU Make 4.1
I will probably have to do changes in the source code I assume, but I don't know what to change to or replace by what. Any indicators are welcome.
Note: bug was reported to the developer.