Compiling gearman on Amazon Linux - gearman

I am trying to install gearman in the following way
sudo yum -y install libevent-devel gcc-c++ boost-devel libuuid-devel gperf mysql-devel
wget https://launchpad.net/gearmand/1.2/1.1.12/+download/gearmand-1.1.12.tar.gz
tar -xvzf gearmand-1.1.12.tar.gz
cd gearmand-1.1.12
./configure --with-mysql
It works well upto this point. Now I do
make
and I get the following errors
CXX libgearman/libgearman_libgearman_la-check.lo
In file included from /usr/include/c++/4.8.3/bits/move.h:57:0,
from /usr/include/c++/4.8.3/bits/stl_pair.h:59,
from /usr/include/c++/4.8.3/utility:70,
from /usr/include/c++/4.8.3/algorithm:60,
from libgearman/check.cc:44:
/usr/include/c++/4.8.3/type_traits:399:12: error: redefinition of 'struct std::is_function<_Res(_ArgTypes ...)>'
struct is_function<_Res(_ArgTypes...) volatile>
^
/usr/include/c++/4.8.3/type_traits:383:12: error: previous definition of 'struct std::is_function<_Res(_ArgTypes ...)>'
struct is_function<_Res(_ArgTypes...)>
^
/usr/include/c++/4.8.3/type_traits:403:12: error: redefinition of 'struct std::is_function<_Res(_ArgTypes ..., ...)>'
struct is_function<_Res(_ArgTypes......) volatile>
^
/usr/include/c++/4.8.3/functional:1862:5: error: redefinition of 'template<class _Member, class _Class> std::_Mem_fn<_Tp _Class::*> std::__callable_functor(_Member _Class::* const&)'
__callable_functor(_Member _Class::* const volatile &__p)
^
/usr/include/c++/4.8.3/functional:1852:5: error: 'template<class _Member, class _Class> std::_Mem_fn<_Tp _Class::*> std::__callable_functor(_Member _Class::* const&)' previously declared here
__callable_functor(_Member _Class::* const &__p)
^
make[1]: *** [libgearman/libgearman_libgearman_la-check.lo] Error 1
make[1]: Leaving directory `/usr/var/tmp/gearmand-1.1.12'
make: *** [all] Error 2
Which libraries am I missing?

I just needed to update repositories
sudo yum -y update
Just in case, someone needs to install gearman along with the web ui and gearman manager, I prepared a set of scripts https://github.com/koustubh25/gearmanBuildScript

Related

glibc 2.14 install error selinux.c: error: libaudit.h no such file or directory

Trying to install glibc 2.14 following this solution.
but I'm getting this error and I'm not sure how to fix it and can't find much online
selinux.c:37:23: error: libaudit.h: No such file or directory
selinux.c: In function ‘log_callback’:
selinux.c:138: warning: implicit declaration of function ‘audit_log_user_avc_message’
selinux.c:138: error: ‘AUDIT_USER_AVC’ undeclared (first use in this function)
selinux.c:138: error: (Each undeclared identifier is reported only once
selinux.c:138: error: for each function it appears in.)
selinux.c: In function ‘audit_init’:
selinux.c:152: warning: implicit declaration of function ‘audit_open’
make[2]: *** [/home/me/glibc_install/glibc-2.14/build/nscd/selinux.o] Error 1
make[2]: Leaving directory `/local/home/me/glibc_install/glibc-2.14/nscd'
make[1]: *** [nscd/others] Error 2
make[1]: Leaving directory `/local/home/me/glibc_install/glibc-2.14'
make: *** [all] Error 2
Append --without-selinux to your configure command or install the -dev packages of SELinux and libaudit for your distribution.
You should probably install a newer version of glibc, though. Installing old versions on a new system is dangerous.

Kaldi toolkit Installation Error on Ubuntu 16.04

Hi I am trying to install Kaldi toolkit for speech recognition on Ubuntu 16.04. I have followed instructions in INSTALL file.
(1) go to tools/ and follow INSTALL instructions there.
Followed procedure in INSTALL file in tools and got following output,
$ extras/check_dependencies.sh
../tools/extras/check_dependencies.sh: all OK.
and executed make without any errors. Here are last few lines in case if you want to take a look
$ make
rm -f openfst
ln -s openfst-1.6.1 openfst
Warning: IRSTLM is not installed by default anymore. If you need IRSTLM
Warning: use the script extras/install_irstlm.sh
All done OK.
Now I moved on to next step
(2) go to src/ and follow INSTALL instructions there.
in src folder, executed configure with following output
$ ./configure
Configuring ...
Backing up kaldi.mk to kaldi.mk.bak ...
Checking compiler g++-4.9 ...
Checking OpenFst library in /home/xxx/Downloads/kaldi/tools/openfst ...
Doing OS specific configurations ...
On Linux: Checking for linear algebra header files ...
Using ATLAS as the linear algebra library.
Successfully configured for Debian/Ubuntu Linux [dynamic libraries] with ATLASLIBS =/usr/lib/libatlas.so.3 /usr/lib/libf77blas.so.3 /usr/lib/libcblas.so.3 /usr/lib/liblapack_atlas.so.3
CUDA will not be used! If you have already installed cuda drivers
and cuda toolkit, try using --cudatk-dir=... option. Note: this is
only relevant for neural net experiments
Info: configuring Kaldi not to link with Speex (don't worry, it's only needed if you
intend to use 'compress-uncompress-speex', which is very unlikely)
SUCCESS
To compile: make clean -j; make depend -j; make -j
... or e.g. -j 10, instead of -j, to use a specified number of CPUs
debug mode enabled...
+ exit 0
$ make depend also executed without any errors. But when I execute make, I get following error (I'm not copying everything because it is very long, if anyone wants I can post full output)
$ make
make[2]: Entering directory '/home/srinivas/Downloads/kaldi/src/online2'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/srinivas/Downloads/kaldi/src/online2'
make -C bin
make[2]: Entering directory '/home/srinivas/Downloads/kaldi/src/bin'
g++-4.9 -Wl,-rpath=/home/srinivas/Downloads/kaldi/tools/openfst/lib -rdynamic align-equal.o ../decoder/kaldi-decoder.a ../lat/kaldi-lat.a ../lm/kaldi-lm.a ../fstext/kaldi-fstext.a ../hmm/kaldi-hmm.a ../transform/kaldi-transform.a ../gmm/kaldi-gmm.a ../tree/kaldi-tree.a ../util/kaldi-util.a ../thread/kaldi-thread.a ../matrix/kaldi-matrix.a ../base/kaldi-base.a /home/srinivas/Downloads/kaldi/tools/openfst/lib/libfst.so /usr/lib/libatlas.so.3 /usr/lib/libf77blas.so.3 /usr/lib/libcblas.so.3 /usr/lib/liblapack_atlas.so.3 -lm -lpthread -ldl -o align-equal
align-equal.o: In function `fst::internal::FstImpl<fst::ArcTpl<fst::TropicalWeightTpl<float> > >::WriteFstHeader(fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > > const&, std::ostream&, fst::FstWriteOptions const&, int, std::string const&, unsigned long, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745: undefined reference to `fst::FstHeader::Write(std::ostream&, std::string const&) const'
../decoder/kaldi-decoder.a(training-graph-compiler.o): In function `fst::internal::FstImpl<fst::ReverseArc<fst::ArcTpl<fst::TropicalWeightTpl<float> > > >::WriteFstHeader(fst::Fst<fst::ReverseArc<fst::ArcTpl<fst::TropicalWeightTpl<float> > > > const&, std::ostream&, fst::FstWriteOptions const&, int, std::string const&, unsigned long, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745: undefined reference to `fst::FstHeader::Write(std::ostream&, std::string const&) const'
../decoder/kaldi-decoder.a(training-graph-compiler.o): In function `fst::internal::FstImpl<fst::ArcTpl<fst::LogWeightTpl<float> > >::WriteFstHeader(fst::Fst<fst::ArcTpl<fst::LogWeightTpl<float> > > const&, std::ostream&, fst::FstWriteOptions const&, int, std::string const&, unsigned long, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:745: undefined reference to `fst::FstHeader::Write(std::ostream&, std::string const&) const'
../fstext/kaldi-fstext.a(kaldi-fst-io.o): In function `fst::ReadFstKaldi(std::string)':
/home/srinivas/Downloads/kaldi/src/fstext/kaldi-fst-io.cc:34: undefined reference to `fst::FstHeader::Read(std::istream&, std::string const&, bool)'
/home/srinivas/Downloads/kaldi/src/fstext/kaldi-fst-io.cc:37: undefined reference to `fst::FstReadOptions::FstReadOptions(std::string const&, fst::FstHeader const*, fst::SymbolTable const*, fst::SymbolTable const*)'
../fstext/kaldi-fstext.a(kaldi-fst-io.o): In function `fst::internal::FstImpl<fst::ArcTpl<fst::TropicalWeightTpl<float> > >::ReadHeader(std::istream&, fst::FstReadOptions const&, int, fst::FstHeader*)':
/home/srinivas/Downloads/kaldi/tools/openfst/include/fst/fst.h:796: undefined reference to `fst::FstHeader::Read(std::istream&, std::string const&, bool)'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'align-equal' failed
make[2]: *** [align-equal] Error 1
make[2]: Leaving directory '/home/srinivas/Downloads/kaldi/src/bin'
Makefile:142: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/srinivas/Downloads/kaldi/src'
Makefile:35: recipe for target 'all' failed
make: *** [all] Error 2
I've even manually searched for libraries and they are present in the location ../tools/openfst. I even tried system wide installation of openfst, but nothing worked. Any help would be appriciated. Thanks!
Srinivas
I am also using ubuntu 16.04 LTS and I would suggest you to take a look into this website and follow step by step procedure. I think it will solve your problem.
http://jrmeyer.github.io/kaldi/2016/01/26/Installing-Kaldi.html
I solved it using g++-5. Ubuntu 16.04 by default uses g++-5 for pre-installed packages and when I try to compile Kaldi with g++-4.9 and link with Ubuntu packages that used g++-5, linker caused undefined references. I was facing similar issue with other libraries as well
To solve any such errors, I've always followed these steps:
use g++-4.8 to compile kaldi source.
add shared flag to your configure command e.g. CXX=g++-4.8 ./configure --shared
before making in src directory also make the dependencies as well e.g. sudo make depend CXX=g++-4.8
use root privileges while making and also add g++-4.8 directive to your command as well e.g. sudo make CXX=g++-4.8
after that compile the online extensions using sudo make ext CXX=g++-4.8
hopefully this will solve your problems.
You can indeed use g++-5 to compile kaldi. It will not support cuda then, as ubuntu 16.04 ships with cuda 7.5 which is incomptatible with gcc 5.
To build with support of CUDA from ubuntu 16.04 :
sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit libcupti-dev g++-4.8
cd tools; make CXX=g++-4.8
cd src; CXX=g++-4.8 ./configure --shared && make-j8

Error during make install of opensips cachedb_redis on RedHat

I am facing error while make install of opensips.
please help me resolve this. I already installed Redis and freeradius.
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius'
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius'
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius'
Compiling aaa_radius.c
Compiling rad.c
Linking aaa_radius.so
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/aaa_radius'
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis'
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis'
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis'
Compiling cachedb_redis.c
In file included from cachedb_redis.c:41:
cachedb_redis_dbase.h:29:29: error: hiredis/hiredis.h: No such file or directory
In file included from cachedb_redis.c:41:
cachedb_redis_dbase.h:38: error: expected specifier-qualifier-list before ‘redisContext’
make[1]: *** [cachedb_redis.o] Error 1
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/cachedb_redis'
make: *** [modules] Error 2
I am 100% confident redis development packages can be found in the epel repository (/etc/yum.repos.d/epel.repo):
yum install hiredis-devel.x86_64
Now, if you really want to install Red Hat-only packages, you should try to enable as many repositories as you can from /etc/yum.repos.d/redhat.repo until you hopefully find a good one!
The issue was resolved by installing hiredis-devel.x86_64.
but now i am having this error.
make[1]: Entering directory `/usr/local/src/opensips-1.9.0-tls/modules/json'
Compiling array_del.c
array_del.c:29:23: error: json/json.h: No such file or directory
array_del.c:30:38: error: json/json_object_private.h: No such file or directory
array_del.c:32: warning: ‘struct array_list’ declared inside parameter list
array_del.c:32: warning: its scope is only this definition or declaration, which is probably not what you want
array_del.c: In function ‘array_list_del_idx’:
array_del.c:36: error: dereferencing pointer to incomplete type
array_del.c:40: error: dereferencing pointer to incomplete type
array_del.c:40: error: dereferencing pointer to incomplete type
array_del.c:41: error: dereferencing pointer to incomplete type
array_del.c:43: error: dereferencing pointer to incomplete type
array_del.c:44: error: dereferencing pointer to incomplete type
array_del.c:44: error: dereferencing pointer to incomplete type
array_del.c: At top level:
array_del.c:47: warning: ‘struct json_object’ declared inside parameter list
array_del.c: In function ‘json_object_array_del’:
array_del.c:49: error: dereferencing pointer to incomplete type
make[1]: *** [array_del.o] Error 1
make[1]: Leaving directory `/usr/local/src/opensips-1.9.0-tls/modules/json'
make: *** [modules] Error 2

Debian install TP-LINK TL-WN723N Wireless usb

i'm downloading rtl8188eu-master file from github for install this driver on debian. after extract it and run make command in get this error.
make ARCH=i386 CROSS_COMPILE= -C /lib/modules/3.11-2-486/build M=/home/tux-world/Desktop/Home/rtl8188eu-master modules
make[1]: Entering directory `/usr/src/linux-headers-3.11-2-486'
CC [M] /home/tux-world/Desktop/Home/rtl8188eu-master/core/rtw_cmd.o
In file included from /home/tux-world/Desktop/Home/rtl8188eu-master/core/rtw_cmd.c:23:0:
/home/tux-world/Desktop/Home/rtl8188eu-master/include/osdep_service.h: In function ‘thread_enter’:
/home/tux-world/Desktop/Home/rtl8188eu-master/include/osdep_service.h:1406:2: error: implicit declaration of function ‘daemonize’ [-Werror=implicit-function-declaration]
daemonize("%s", name);
^
cc1: some warnings being treated as errors
make[4]: *** [/home/tux-world/Desktop/Home/rtl8188eu-master/core/rtw_cmd.o] Error 1
make[3]: *** [_module_/home/tux-world/Desktop/Home/rtl8188eu-master] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.11-2-486'
make: *** [modules] Error 2
linux-headers-3.11-2-486 and build-essential packages are installed and i do not have problem for those.
Although this has little to do with programming, I will answer this in case somebody comes here with a similar issue.
I had no trouble compiling the driver with these commands (make sure you have the headers installed):
wget https://codeload.github.com/lwfinger/rtl8188eu/zip/master
unzip master
cd rtl8188eu-master
sudo make
sudo make install

Installing FAAC on linux, getting errors

I am trying to install FAAC on linux. I'm getting errors.
I use this to install.
cd /usr/src
wget http://sourceforge.net/projects/faac/files/faac-src/faac-1.28/faac-1.28.tar.bz2/download
tar -xvjf faac-1.28.tar.bz2
cd faac-1.28
./configure
make
make install
Once I try to make it, I get the error
mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
/usr/include/string.h:369: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
make[3]: *** [3gp.o] Error 1
make[3]: Leaving directory `/usr/src/faac-1.28/common/mp4v2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/faac-1.28/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/faac-1.28'
make: *** [all] Error 2
I read up online and it was saying it was interfearing with something, and I had to locate a file and edit it.
How do i fix this installation so it install properly.
Remove line 126 containing strcasestr from mpeg4ip.h found in the common/mp4v2 folder, as a temporary workaround. It seems it does not properly exclude its own prototype when it is already included by means of glibc's strcasestr (#define _GNU_SOURCE 1).
BTW: Isn't ffmpeg on the way to have its own AAC code such that faac/faad is no longer needed as a dependency...
Ubuntu 12.04 - kernel 3.5x to 3.8.0-32-generic
Step 1:
apt-get -y remove gstreamer0.10-plugins-bad
apt-get -y install libfaad-dev libfaac-dev faac faad
Step 2:
cd /var/tmp
wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.23.tar.gz
tar xvfz gst-plugins-bad-0.10.23.tar.gz
cd gst-plugins-bad-0.10.23/
./autogen.sh
./configure
configure: *** Plug-ins with dependencies that will be built:
decklink
dvb
faac
faad
fbdevsink
gsettings
linsys
shm
vcdsrc
vp8
make
Making all in faac
make[3]: Entering directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faac'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faac'
Making all in faad
make[3]: Entering directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faad'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faad'
Making all in gsettings
make install
Step 3: verify
gst-inspect-0.10 faac | grep Version
Version: 0.10.21
gst-inspect-0.10 faad | grep Version
  Version: 0.10.23
EDIT: deb packages
http://labkom.stikom.edu/ubuntu/pool/universe/g/gst-plugins-bad0.10/

Resources