Cannot run CMUSphinx program - cmusphinx

I have installed CMUSphinx using this blog(Here). I did all the steps correctly. But when I executed a sample program provided in the same blog(This program). It shows me the following error
--------- ERRROR: ----------
Unable create vader.
Init failed...
I Don't know what to do. I am using Ubuntu 11.10/64bit. Is there any package I have not installed?

Most likely you didn't install the plugin correctly. Make sure that
plugin file is installed in the gstreamer folder. The plugin so file should be placed either in /usr/lib/gstreamer folder or GST_PLUGIN_PATH environment variable needs to be properly set.
gst-inspect shows the plugin. See the output of the gst-inspect to check if plugin is detected. Check GST_PLUGIN_PATH environment variable if it's not.
dynamic linker is properly configured. Check that pocketsphinx library is installed in /usr/lib or that LD_LIBRARY_PATH variable is properly set to include the folder where pocketpshinx library is installed
See the gstreamer documentation and Linux linker documentation for more details.

Related

QtCreator cannot find the emscripten compiler

I followed this guide and installed emscripten using emsdk and activated it.Then I configured my $PATH as instructed by the emsdk itself and also sourced emsdk-master/emsdk_env.sh.Now I can access both emcc and em++ in the terminal.The file ~/.emscripten is also present(this is the file that QtCreator will fetch to find the path of compilers for WASM).
The WebAssembly kit for Qt also has been installed by the Qt Maintenance Tool.
Now in the Kit configuration in the QtCreator I get this(QtCreator is opened via terminal after sourcing emsdk_env.sh):
It cannot determine the path of compilers by itself.
In the Compilers tab I manually added a compiler as follows:
But I get this error in the Kits tab after that:
What does that mean? What did I skip? Does anybody ever have the experience of doing this?
Also changing the compiler from em++ to wasm-32-wasi-clang++ or clang++ doesn't change anything.
By the way if I use that kit I get:
Error while parsing file whatever.pro. Giving up.
Project ERROR: Cannot run target compiler 'em++'. Output:
===================
===================
Maybe you forgot to setup the environment?
And please don't tell me that this question is the duplicate of this because it isn't(mine has more details) and there's no useful answer for that after 9 months at this time.
Any help is much appreciated.
Make sure you run:
emsdk install
and
emsdk activate
within emsdk folder, not from a relative path.
You have to setup the emsdk inside QtCreator => Preferences => Devices => WebAssembly. Afterwards the compiler should be auto-detected by Qt Creator.
I had the same problem and the solution was, that python was not correctly recognized.
In my case the symbolic link /usr/bin/python was not set
ln -sf /usr/bin/python3 /usr/bin/python
Afterwards the emsripten Toolchain is recognized automatically in QtCreator.

Run script using Qt Creator like environment

I try to run a deployment script using KDE Neon. I have started the script manually from bash and I got an error qmake would be not found.
When trying to run qmake directly from the bash I get the following error:
$ qmake -v
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
That bin folder is almost empty and contains no qmake. In the path /usr/lib/x86_64-linux-gnu/qt5/bin/ a full Qt installation can be found but no qmake as well. /usr/bin/qmake obviously is a link that is pointing to the missing /usr/lib/x86_64-linux-gnu/qt4/bin/qmake.
qmake works fine when using Qt Creator. The binary used by Qt Creator is /home/<user>/Qt/5.10.0/gcc_64/bin/qmake.
Obviously the /usr/... Qt installations aren't complete. First I thought about how to complete the installations and how to switch from Qt4 to Qt5. However Qt Creator obviously is able to use its own /home/... located Qt environment anyway and I would like to use it too when running a script outside Qt Creator.
Is there a way I can start scripts from bash using the same Qt environment as Qt Creator (without modifying the OS configuration)?
QtCreator itself only modifies the environemt, i.e. it sets
export PATH="/home/<user>/Qt/5.10.0/gcc_64/bin:$PATH"
export QTDIR="/home/<user>/Qt/5.10.0/gcc_64"
This can be verified by checking the "Build Environment" section in the "Projects" tab. When checking the environment for the run configuration there is one more that is needed for the compiled applications to find the correct .so files (The build env. is used to run build tools. The run env. is used to run the compiled application).
export LD_LIBRARY_PATH="/home/<user>/Qt/5.10.0/gcc_64/lib:$LD_LIBRARY_PATH"
So in order to easily use qmake/... from the command line, just create a script that sets these (and possibly others you defined for your build in QtCreator) and source it before compiling and it should work.
source ~/qt-home-init.sh
qmake ...

How to include additional directories when configuring makefiles

I'm trying to compile geany-plugins-1.28. The debugger plugin (the only one I need) gives the error:
debug.c:53:21: fatal error: vte/vte.h: No such file or directory
#include <vte/vte.h>
Clearly it needs to know where this file is located to compile. I found the vte.h file in the src directory of the main program geany-1.28. When running
sudo ./configure cflags=-I/home/pi/Desktop/geany-1.28/src
I get the same error about the missing header later trying to compile the debugger plugin.
I ran
./configure --help
to get all the flag options. The output is here
How do I get this to configure correctly so that it compiles. I need to compile the debugger version 1.28 myself because apt only installs 1.24 which I think has a bug because it crashes when I run my code with the error:
close failed in file object destructor:
sys.execpthook is missing
lost sys.stderr
CFLAGS is case-sensitive environment variable, so you should set it before running configure, not try to pass it as a command line argument. This variant:
$ export CFLAGS=-I/home/pi/Desktop/geany-1.28/src
$ ./configure
leaves CFLAGS set for current shell until you leave it. While this:
$ CFLAGS=-I/home/pi/Desktop/geany-1.28/src ./configure
sets variable only for current command, i.e. configure.
Some other issues:
You do not need sudo to configure and make. It is also unnecessary for make install if you set PREFIX to a path you have privileges to write to.
Does plugin's build system also builds all it's dependencies? If not, you may face linker errors a bit later.
Update:
I have tried to build debugger plugin and got rid of your error. It seems that vte.h coming with Geany is it's intrinsic, while the plugin requires full-featured file from the library. So I just installed vte and vte-devel from repos. Nevertheless, I got some other unrelated errors coming from Glib. I will not continue my attempts to build all this right now. Hope my effort will be helpful at least a little.
As in this answer stated, vte.h is not the file you are looking for. Install libvte(-dev) package on your system and rerun configure.
Just for the record: vte.h on Geany is a dummy to allow Geany to kind of dynamical enable vte or disable it depending on vte is installed on the system or not.

What's the proper way to build a multi-arch Debian package?

Every time I try to build bluez I get the error:
dh_install: libbluetooth3 missing files (usr/lib/*/libbluetooth.so.3), aborting
Looking in my own path I see that the currently installed version of the library is located at:
/usr/lib/x86_64-linux-gnu/libbluetooth.so.3
But the build script (fakeroot debian/rules binary) keeps putting the output into usr/lib/libbluetooth.so.3.
To specify the correct folder you need to declare the environment variable DEB_HOST_MULTIARCH and use the binary-arch target (though binary may suffice as documentation suggests binary calls both binary-arch and binary-indep):
DEB_HOST_MULTIARCH=x86_64-linux-gnu debian/rules binary-arch
The value was chosen based off of the current install path of libbluetooth.so.3 (/usr/lib/x86_64-linux-gnu/libbluetooth.so.3) and could possibly change if the Debian distribution you're running places 64bit binaries elsewhere.

Cannot run Code::Blocks: libwx_gtk2u-2.8.so.0 not found

I am trying to install Code::Blocks 10.05 from (non-SVN) sources (codeblocks-10.05-src.tar.bz2). My OS is Ubuntu 11.04. I needed to download and install wxWidgets first (I now have wxGTK-2.8.12), which seemed to work. I compiled it according to these instructions:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
Then I configured C::B with
./configure --with-wx-config=/opt/wx/2.8/bin/wx-config
and ran
export LDFLAGS="-Wl,-R /opt/wx/2.8/lib"
make
sudo -i
make install
When trying to run C::B, I get the following error:
codeblocks: error while loading shared libraries: libwx_gtk2u-2.8.so.0: cannot open shared object file: No such file or directory
The same question was asked here: error while loading shared libraries, but the suggested solution (namely adding the wxWidgets config to the options passed to configure) didn't work for me.
The output of wx-config --prefix is /opt/wx/2.8,
The output of wx-config --libs is -L/opt/wx/2.8/lib -pthread -lwx_gtk2u-2.8,
and that of which wx-config is /opt/wx/2.8/bin/wx-config.
I looked for the library and found /opt/wx/lib/libwx_gtk2u-2.8.so.0 to be a link to libwx_gtk2u-2.8.so.0.8.0 in the same folder.
What might be wrong here?
The problem is that the program cannot find the WX widgets libraries at run time. You will need to set your LD_LIBRARY_PATH variable to include the location of wxWidgets like this:
LD_LIBRARY_PATH=/opt/wx/2.8/lib ./codeblocks
The reason why its failing is because you compiled codeblocks against wxWidgets found in /opt/ and not the one installed in /usr/; the program doesn't know to look in /opt for the wx libraries.
Probably the easiest way to get code::blocks up and running on Ubuntu is to just install it via the Synaptic Package Manager. Just type in codeblocks into 'Quick search'. Find codeblocks on the list and just right-click to mark for install. Any dependencies and missing libraries needed will automatically be handled and installed by Synaptic as necessary.
If you're interested in trying the C::B nightly builds on Ubuntu then you'll want to checkout Jens' unofficial debian-repository here.
You can visit Why do I have to define LD_LIBRARY_PATH with an export every time I run my application? for a more generic case. For a particular case like yours you can follow the below given steps
If you had installed wxGTK then you would see the file in /usr/local/lib. You would get this error when the the above path is not as part of the makefile. I received this error while starting wxFormBuilder after building from source on CentOS. There are 2 approaches.
Approach 1: Putting the path in .bashrc
gedit /home/{your-username}/.bashrc
Then after the line # User specific aliases and functions paste the following
export $LD_LIBRARY_PATH=/usr/local/lib.
This would work for fine but for the current login, but for other users like root you might have to do the same in the respective .bashrc files.
Approach 2: Creating your own conf files
cd /etc/ld.so.conf.d
gedit wxformbuilder.conf
Give the path /usr/local/lib and save the file.
ldconfig (To update the library path).

Resources