I download nsis-2.46-src.tar.bz2 from https://sourceforge.net/projects/nsis/files/ and I'm trying to compile makensis but get the errors like:
/usr/bin/ld: i386 architecture of input file `build/release/makensis/winchar.o' is incompatible with i386:x86-64 output
build.cpp:(.text+0x35eb): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
What is wrong? And where I can get Stubs, Plugins, Include components after compilation of makensis? Help me please.
Before compilation I have install mingw-w64, gcc, g++
Related
I encountered the following error message on a Linux machine while attempting to compile a program with the command "make":
build/chem/rdm.o: In function `RDM::get_2rdm_slow(std::vector<Det, std::allocator<Det> > const&, std::vector<double
, std::allocator<double> > const&, Integrals const&)':
rdm.cc:(.text+0x37d2): undefined reference to `Timer::checkpoint(std::__cxx11::basic_string<char, std::char_traits<
char>, std::allocator<char> > const&)'
I think the compiler I am using, gcc/6.5.0, is the wrong version, but I am not completely sure that this is the issue. Does anyone have an idea of what could be going on?
Makefile
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
I have all the .a files in usr/local/lib. Moreover I've deleted all the .so libraries from the folder to ensure that it compiles statically. I'm using this command to compile it-
g++ HttpAPICall.cpp ... main.cpp -Bstatic -L/usr/local/lib/ -lPocoUtil -lPocoXML -lcrypto -lssl \
-lPocoCrypto -lgumbo -lPocoNet -lPocoJSON -lPocoNetSSL -lPocoFoundation -luuid -std=gnu++11 -o analyzer
I'm getting the following error-
/usr/local/lib//libPocoNetSSL.a(SSLManager.o): In function `Poco::Net::SSLManager::appConfig()':
SSLManager.cpp:(.text+0x383): undefined reference to `Poco::Util::Application::_pInstance'
SSLManager.cpp:(.text+0x3b5): undefined reference to `Poco::Util::Application::_pInstance'
/usr/local/lib//libPocoNetSSL.a(SSLManager.o): In function `Poco::Net::SSLManager::initPassphraseHandler(bool)':
SSLManager.cpp:(.text+0xd58): undefined reference to `Poco::Util::AbstractConfiguration::getString(std::string const&, std::string const&) const'
SSLManager.cpp:(.text+0xdd6): undefined reference to `Poco::Util::UnknownOptionException::UnknownOptionException(std::string const&, int)'
SSLManager.cpp:(.text+0xe01): undefined reference to `Poco::Util::UnknownOptionException::~UnknownOptionException()'
SSLManager.cpp:(.text+0xe06): undefined reference to `typeinfo for Poco::Util::UnknownOptionException'
/usr/local/lib//libPocoNetSSL.a(SSLManager.o): In function `Poco::Net::SSLManager::initCertificateHandler(bool)':
SSLManager.cpp:(.text+0x15a8): undefined reference to `Poco::Util::AbstractConfiguration::getString(std::string const&, std::string const&) const'
I've read that the order or compilation matters in such case. I've tried -WL,--start-group --end-group as well. No luck with that. The same code using mac static libraries is getting compiled easily on xcode. Also, by using the dynamic libraries, the code compiles fine on linux as well. Kindly help me with static compiling on linux.
I'm beginner in ogre3D and I'm build mi first program in Ogre3D, but when I try to compile the program I get this error:
In function `main':
test.cpp:(.text+0x14): undefined reference to `std::allocator<char>::allocator()'
test.cpp:(.text+0x30): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)'
test.cpp:(.text+0x40): undefined reference to `std::allocator<char>::allocator()'
test.cpp:(.text+0x5c): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)'
test.cpp:(.text+0x6c): undefined reference to `std::allocator<char>::allocator()'
test.cpp:(.text+0x88): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&)'
And Continue the fix
I Compile the program manually:
gcc test.cpp -o test.o test
And my file test is this:
#include <Ogre.h>
using namespace Ogre;
int main()
{
Root* root= new Root();
if( !root->restoreConfig() )
{
root->showConfigDialog();
root->saveConfig();
}
return 0;
}
How to fix my problem?
I'm use Debian Wheezy.
The Version Ogre3D: 1.8
Thanks for your answers.
This is a linker error.
Use pkg-config --libs to retrieve the correct linker options
g++ -o test test.cpp -Wall $(pkg-config --cflags OGRE) $(pkg-config --libs OGRE) -lboost_system
If you have installed OGRE in a nonstandard location (say /opt/ogre), you may need to call pkg-config with the PKG_CONFIG_PATH environment variable set:
PKG_CONFIG_PATH=/opt/ogre/lib/pkgconfig pkg-config --libs OGRE
This is a linker error, but not to Ogre3d, but to the STL (Standard Template Library). The reason for this is that you are using gcc, when you should be using g++. However, I am surprised that you aren't getting linker errors to Ogre as well, and the solution to that is like Thomas suggested (though he also uses "g++" in his example).
I want to use the zeroMQ in my project
and I run the configure as below to build the libaray into my home folder
./configure --enable-static --disable-shared --prefix=/home/xx/out
then I link my project by
gcc -o myproject x.c y.c /home/xx/out/libzmq.a
but there still a lot of link error like below:
../zmq/lib/libzmq.a(libzmq_la-ip.o): In function zmq::resolve_ip_interface(sockaddr_storage*, unsigned int*, char const*)':
/home/sureone/share/zeromq-2.2.0/src/ip.cpp:221: undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/sureone/share/zeromq-2.2.0/src/ip.cpp:222: undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
../zmq/lib/libzmq.a(libzmq_la-ip.o): In function zmq::resolve_ip_hostname(sockaddr_storage*, unsigned int*, char const*)':
/home/sureone/share/zeromq-2.2.0/src/ip.cpp:314: undefined reference to std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, uns
...........
gcc -o myproject x.c y.c /home/xx/out/libzmq.a
Since ZeroMQ is (apparently) using C++, you need to use appropriate compiler driver (g++ in this case) to link it.
Try this:
gcc -c x.c y.c
g++ -o myproject x.o y.o /home/xx/out/libzmq.a