alumae / gst-kaldi-nnet2-online

GStreamer plugin around Kaldi's online neural network decoder
Apache License 2.0
185 stars 100 forks source link

won't compile now #21

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello, can you help to resolve the error I am having

chiweic@chiweic-VirtualBox:~/gst-kaldi-nnet2-online/src$ KALDI=/home/chiweic/kaldi-trunk make g++ -msse -msse2 -Wall -I.. -pthread -DKALDI_DOUBLEPRECISION=0 -DHAVE_POSIX_MEMALIGN -Wno-sign-compare -Wno-unused-local-typedefs -Winit-self -DHAVE_EXECINFO_H=1 -rdynamic -DHAVE_CXXABI_H -DHAVE_ATLAS -I/home/chiweic/kaldi-trunk/tools/ATLAS/include -I/home/chiweic/kaldi-trunk/tools/openfst/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -fPIC -I/home/chiweic/kaldi-trunk/src -c -o gstkaldinnet2onlinedecoder.o gstkaldinnet2onlinedecoder.cc gstkaldinnet2onlinedecoder.cc: In function ‘std::string kaldi::gst_kaldinnet2onlinedecoder_full_final_result_tojson(kaldi::Gstkaldinnet2onlinedecoder, const FullFinalResult&)’: gstkaldinnet2onlinedecoder.cc:1032:61: error: ‘JSON_REAL_PRECISION’ was not declared in this scope char ret_strings = json_dumps(root, JSON_REAL_PRECISION(6)); ^ In file included from /home/chiweic/kaldi-trunk/src/base/kaldi-common.h:38:0, from /home/chiweic/kaldi-trunk/src/util/simple-options.h:27, from ././simple-options-gst.h:25, from ./gstkaldinnet2onlinedecoder.h:26, from gstkaldinnet2onlinedecoder.cc:49: /home/chiweic/kaldi-trunk/src/base/kaldi-math.h: At global scope: /home/chiweic/kaldi-trunk/src/base/kaldi-math.h:86:17: warning: ‘kaldi::kLogZeroBaseFloat’ defined but not used [-Wunused-variable] const BaseFloat kLogZeroBaseFloat = -std::numeric_limits::infinity(); ^ make: _* [gstkaldinnet2onlinedecoder.o] Error 1

alumae commented 9 years ago

You need to install the Jansson library together with its development header files (version 2.7 or later). This does this on Debian:

sudo apt-get install libjansson-dev
crazydreamer commented 8 years ago

hello, I run into same problem here, I already install libjansson-dev by " sudo apt-get install libjansson-dev" on ubuntu 14.04, my python version is 2.7.6 do you have any suggestion ?

alumae commented 8 years ago

What is the version of libjansson-dev? It has nothing to do with the python version.

geffy commented 8 years ago

Same problem, libjansson-dev 2.5-2 Ubuntu 14.04.2 LTS

alumae commented 8 years ago

You need libjansson 2.7. On 11 Oct 2015 13:34, "Mikhail Trofimov" notifications@github.com wrote:

Same problem, libjansson-dev 2.5-2

— Reply to this email directly or view it on GitHub https://github.com/alumae/gst-kaldi-nnet2-online/issues/21#issuecomment-147223522 .

ghost commented 8 years ago

try GitHub the libjansson with the correct or above version, recompile and set the folder the installation.

geffy commented 8 years ago

Yes, it helps for me. Thanks!