1

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

However, during 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.

0

I recommend that your delete the program folder and install a new one from the archive. Your stopped at 79% of the installation and have the error "extractor.dir / backoff_sampler", to get around it you need to re-create (your start from the end) the 'cdec' folder in a new unzipped program. (I used Ubuntu 18.04.3 LTS on hdd).

# apt-get install cmake git build-essential libboost-dev libboost-regex-dev libboost-filesystem-dev libboost-serialization-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libeigen3-dev libbz2-dev liblzma-dev flex libgtest-dev

# git clone https://github.com/redpony/cdec.git

# cd cdec

# apt-get update

# apt-get install golang-github-cenkalti-backoff-dev

# cmake .

# make -j4

# reboot

# cd cdec

# cmake .

# make -j4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.