How to install flite for epitran on Windows - c++

I'm trying to use python's package epitran https://pypi.org/project/epitran/0.10/ on windows which returns the IPA representation of words. For english, as the website says, I need to install flite from here http://tts.speech.cs.cmu.edu/awb/flite-2.0.5-current.tar.bz2.
After some research on the web I have gotten to download the file and trying installing it using cygwin.
I also changed both instances of cp -pd to cp -pR as epitran's website and this Error installing flite on Mac OSX suggested.
So far I've executed the following lines in my cygwin terminal.
$ tar xjf flite-2.0.5-current.tar.bz2
$ cd flite-2.0.5-current
But when I execute this:
$ ./configure && make
I get the following error
gcc -I. -DCST_AUDIO_NONE -I../../include -g -O2 -Wall -c auclient.c -o ../../build/x86_64-cygwin/obj/src/audio/auclient.o
In file included from auclient.c:46:0:
../../include/cst_file.h: In function 'c99_vsnprintf':
../../include/cst_file.h:108:20: warning: implicit declaration of function '_vsnprintf_s' [-Wimplicit-function-declaration]
count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
^~~~~~~~~~~~
../../include/cst_file.h:108:44: error: '_TRUNCATE' undeclared (first use in this function)
count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
^~~~~~~~~
../../include/cst_file.h:108:44: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [../../config/common_make_rules:105: ../../build/x86_64-cygwin/obj/src/audio/auclient.o] Error 1
make[1]: *** [../config/common_make_rules:133: ../build/x86_64-cygwin/obj/src/.make_build_dirs] Error 2
make: *** [config/common_make_rules:133: build/x86_64-cygwin/obj//.make_build_dirs] Error 2
I basically have no idea what I'm doing and what the error might be since I have 0 experience with C++ or Linux so I'd be really grateful if someone gave me some help

Related

Build failure of OpenMPI due to _noalias when using mpicxx

I tried to install lammps on my department machine with a newer version of 11Aug17. However, mpicxx gives error to the following lines:
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/home/shixx597/codes/kim-api-v1.7.3/lib/kim-api-v1/include -c ../pair_list.cpp
../pair_list.cpp(88): error: expected a ";"
const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0];
^
../pair_list.cpp(89): error: "restrict" has already been declared in the current scope
dbl3_t * _noalias const f = (dbl3_t *) atom->f[0];
^
../pair_list.cpp(89): error: expected a ";"
dbl3_t * _noalias const f = (dbl3_t *) atom->f[0];
^
../pair_list.cpp(114): error: identifier "x" is undefined
const double dx = x[i].x - x[j].x;
^
../pair_list.cpp(160): error: identifier "f" is undefined
f[i].x += dx*fpair;
^
../pair_list.cpp(166): error: identifier "f" is undefined
f[j].x -= dx*fpair;
^
compilation aborted for ../pair_list.cpp (code 2)
make[1]: *** [pair_list.o] Error 2
make[1]: Leaving directory `/home/shixx597/codes/lammps-11Aug17/src/Obj_mpi'
make: *** [mpi] Error 2
My colleagues told me that it is the problem of openmpi. So I tried to install a new openmpi for me. However, I get the following error told me that automake is not installed like this:
cd . && /bin/sh /home/shixx597/codes/openmpi-3.0.0/config/missing automake-1.15 --foreign
/home/shixx597/codes/openmpi-3.0.0/config/missing: line 81: automake-1.15: command not found
WARNING: 'automake-1.15' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [Makefile.in] Error 1
When I tried to install automake-1.15, I get the following error:
CDPATH="${ZSH_VERSION+.}:" && cd . && "/home/shixx597/codes/automake-1.15/t/wrap/aclocal-1.15"
Can't locate /home/shixx597/codes/automake-1.15/bin/aclocal in #INC (#INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /home/shixx597/codes/automake-1.15/t/wrap/aclocal-1.15 line 29.
make: *** [aclocal.m4] Error 2
I do not have any sudo privilege to do anything on this weird department machine.
Even I tried to finish installing lammps on the departmental machine, I am wondering if I could finish the run of a large bonded force field model.
Actually, this a fairly well-known issue, and there are three solutions.
Use GCC rather than an Intel compiler (possibly not desirable).
Use the -restrict flag while compiling (I'm assuming by appending it when running make, like make CXX_FLAGS=-restrict
Just remove those two files from the build.
If you really want to try, you could also try to remove the _noalias keyword using sed or awk from the two offending files: pair_list.h and pair_list.cpp, or just define _noalias to be an empty keyword, as suggested by jww in the comments.

gRPC installation fails at "make"

I am following the Built From Source instructions to install grpc
$ git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc
success
$ cd grpc
success
$ git submodule update --init
success
$ make
fails after building a few source files
third_party/boringssl/crypto/rand/urandom.c:62:2: error: #error "system call number for getrandom is not the expected value"
#error "system call number for getrandom is not the expected value"
^
In file included from /usr/include/x86_64-linux-gnu/sys/syscall.h:31:0,
from third_party/boringssl/crypto/rand/urandom.c:32:
third_party/boringssl/crypto/rand/urandom.c: In function ‘init_once’:
third_party/boringssl/crypto/rand/urandom.c:128:15: error: ‘__NR_getrandom’ undeclared (first use in this function)
syscall(SYS_getrandom, &dummy, sizeof(dummy), GRND_NONBLOCK);
^
third_party/boringssl/crypto/rand/urandom.c:128:15: note: each undeclared identifier is reported only once for each function it appears in
third_party/boringssl/crypto/rand/urandom.c: In function ‘fill_with_entropy’:
third_party/boringssl/crypto/rand/urandom.c:258:21: error: ‘__NR_getrandom’ undeclared (first use in this function)
r = syscall(SYS_getrandom, out, len, 0 /* no flags */);
^
Makefile:2564: recipe for target '/home/usrnm/grpc/objs/opt/third_party/boringssl/crypto/rand/urandom.o' failed
make: *** [/home/usrnm/grpc/objs/opt/third_party/boringssl/crypto/rand/urandom.o] Error 1
OS: Linux 4.4.0-0 SMP Debian 4.4.16-1
GCC version: gcc (Debian 4.9.2-10) 4.9.2
I couldn't find any open issues or any help about this error on the internet.
You might have better luck without the embedded BoringSSL. Try building with:
EMBED_OPENSSL=false make
If you get errors about missing packages, make sure you have libssl-dev installed.
The problem seems to happen while compiling boringssl . We use the version given by $ git submodule, which at the time of this writing is be2ee342d3781ddb954f91f8a7e660c6f59e87e5 third_party/boringssl (version_for_cocoapods_7.0-526-gbe2ee342). Are you able to compile boringssl on its own?

Cannot convert ‘bool’ to ‘gzFile {aka gzFile_s*}’

I am new to Linux environments, and trying to install a bioinformatics package (vcftools - https://vcftools.github.io/examples.html). For some reason I can compile without a problem in a Cygwin environment, other colleagues have installed the package without a glitch, but i get an error (per below) if I try to compile in an Ubuntu environment in a VirtualBox on the same computer. I get the following error. Does anyone have a suggestion on how to resolve this error?
$make install
output
Installing VCF tools
make[1]: Entering directory '/home/wde/selt/selectionTools/vcftools_0.1.11/cpp'
g++ -c -O2 -D_FILE_OFFSET_BITS=64 vcftools.cpp -o vcftools.o
g++ -MM -O2 -D_FILE_OFFSET_BITS=64 vcftools.cpp > vcftools.d
g++ -c -O2 -D_FILE_OFFSET_BITS=64 bcf_file.cpp -o bcf_file.o
g++ -MM -O2 -D_FILE_OFFSET_BITS=64 bcf_file.cpp > bcf_file.d
g++ -c -O2 -D_FILE_OFFSET_BITS=64 vcf_file.cpp -o vcf_file.o
vcf_file.cpp: In constructor ‘vcf_file::vcf_file()’:
**vcf_file.cpp:25:13: **error: cannot convert ‘bool’** to ‘gzFile {aka gzFile_s*}’ in assignment**
gzvcf_in = false;
^~~~~
Makefile:53: recipe for target 'vcf_file.o' failed
make[1]: *** [vcf_file.o] Error 1
make[1]: Leaving directory '/home/wde/selt/selectionTools/vcftools_0.1.11/cpp'
/bin/sh: 2: cd: can't cd to perl
Makefile:24: recipe for target 'install' failed
make: *** [install] Error 2
error with make
Basically what the makefile does is automating the calls to the compiler.
Thus, the output from the makefile is similar to usual compile errors you get, compiling a source file from within the command line.
The important line from the error log above is:
vcf_file.cpp: In constructor ‘vcf_file::vcf_file()’:
**vcf_file.cpp:25:13: **error: cannot convert ‘bool’** to ‘gzFile {aka gzFile_s*}’ in assignment**
gzvcf_in = false;
gzvcf_in is of type pointer to gzFile_s. Assigning a bool variable to a pointer type won't compile.
Thus, the error message. Replace, inside the vcf_file.cpp, false with the pointer literal std::nullptr or the macro NULL and re-run the makefile.
Btw. I checked the vcf_file.cpp file in the github repo from vcf. They do not contain the line leading to the above error. May you have an outdated / modified version, introducing the compiler error.

Error compiling Poco sources for cygwin

i downloaded poco-1.6-all for windows and im trying to build it for cygwin, im getting this error after performing a make install i need some help because i don't know how to solve this NTDDI_VERSION error:
$ make install
make -C /cygdrive/c/poco-1.6.0-all/Foundation
make[1]: Entering directory '/cygdrive/c/poco-1.6.0-all/Foundation'
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/release_static
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_static
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/release_shared
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared
** Compiling src/ArchiveStrategy.cpp (debug, shared)
g++ -Iinclude -I/cygdrive/c/poco-1.6.0-all/CppUnit/include -I/cygdrive/c/poco-1.6.0-all/CppUnit/WinTestRunner/include -I/cygdrive/c/poco-1.6.0-all/Foundation/include -I/cygdrive/c/poco-1.6.0-all/XML/include -I/cygdrive/c/poco-1.6.0-all/JSON/include -I/cygdrive/c/poco-1.6.0-all/Util/include -I/cygdrive/c/poco-1.6.0-all/Net/include -I/cygdrive/c/poco-1.6.0-all/Crypto/include -I/cygdrive/c/poco-1.6.0-all/NetSSL_OpenSSL/include -I/cygdrive/c/poco-1.6.0-all/Data/include -I/cygdrive/c/poco-1.6.0-all/Data/SQLite/include -I/cygdrive/c/poco-1.6.0-all/Data/ODBC/include -I/cygdrive/c/poco-1.6.0-all/Data/MySQL/include -I/cygdrive/c/poco-1.6.0-all/MongoDB/include -I/cygdrive/c/poco-1.6.0-all/Zip/include -I/cygdrive/c/poco-1.6.0-all/PageCompiler/include -I/cygdrive/c/poco-1.6.0-all/PageCompiler/File2Page/include -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY -DPOCO_BUILD_HOST=PB00YCT7 -D_XOPEN_SOURCE=500 -g -D_DEBUG -c src/ArchiveStrategy.cpp -o /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o
In file included from c:\mingw\include\_mingw.h:35:0,
from c:\mingw\include\windows.h:28,
from include/Poco/UnWindows.h:90,
from include/Poco/Platform_WIN32.h:24,
from include/Poco/Foundation.h:102,
from include/Poco/ArchiveStrategy.h:23,
from src/ArchiveStrategy.cpp:17:
c:\mingw\include\sdkddkver.h:137:8: error: #error The _WIN32_WINNT value does not match NTDDI_VERSION
# error The _WIN32_WINNT value does not match NTDDI_VERSION
^
In file included from include/Poco/ArchiveStrategy.h:23:0,
from src/ArchiveStrategy.cpp:17:
include/Poco/Foundation.h:122:4: error: #error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
#error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
^
/cygdrive/c/poco-1.6.0-all/build/rules/compile:53: recipe for target '/cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o' failed
make[1]: *** [/cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o] Error 1
make[1]: Leaving directory '/cygdrive/c/poco-1.6.0-all/Foundation'
Makefile:69: recipe for target 'Foundation-libexec' failed
make: *** [Foundation-libexec] Error 2
Here is also the line i use to compile de code:
$ ./configure --config=CYGWIN --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQ --prefix=./_INSTALL
$ make clean
$ make -j4 -nodemos
$ make install
Any help with this error will be apreciated, thanks.
It's due to the MinGW has the c:\mingw\include\sdkddkver.h outdated in comparison to your Windows OS version. Take a look to this page:
Using the Windows Headers
And check that some #define's are not into the mentioned file. I just used Windows 8.1 and received the same error.
A solution could be to use an updated version from MinGW like MinGW-w64 or any Visual Studio version

Building gold linker with MinGW on Windows, FLEX/bison 'YYSTYPE' was not declared in this scope

I'm trying to build the gold linker included with GNU binutils using mingw. The steps I have taken-
Install mingw with all packages using the installer.
Install the windows version of FLEX to the default location using the windows installer.
Run ./configure in the gold linker directory from the mingw shell which seems to work fine
Run make, this is where I'm getting some errors.
I've included the complete output of ./configure and make in a pastebin here:
http://pastebin.com/1XLkZVVm
But the important part is this:
make[2]: Entering directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
g++ -DHAVE_CONFIG_H -I. -I. -I./../include -I./../elfcpp -DLOCALEDIR="\"/usr/lo
cal/share/locale\"" -DBINDIR="\"/usr/local/bin\"" -DTOOLBINDIR="\"/usr/local//bi
n\"" -DTOOLLIBDIR="\"/usr/local//lib\"" -W -Wall -Wno-format -Werror -D_LAR
GEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=expression.o -MT expression.
o -MD -MP -MF .deps/expression.Tpo -c -o expression.o expression.cc
In file included from expression.cc:33:0:
script-c.h:221:7: エラー: 'yylex' initialized and declared 'extern' [-Werror]
script-c.h:221:7: エラー: 'YYSTYPE' was not declared in this scope
script-c.h:221:15: エラー: expected primary-expression before ',' token
script-c.h:221:17: エラー: expected primary-expression before 'void'
script-c.h:221:30: エラー: expression list treated as compound expression in ini
tializer [-fpermissive]
cc1plus.exe: all warnings being treated as errors
make[2]: *** [expression.o] Error 1
make[2]: Leaving directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
make: *** [all] Error 2
I've looked in the script-c.h file and it has this function:
/* Called by the bison parser skeleton to return the next token. */
extern int
yylex(YYSTYPE*, void* closure);
However YYSTYPE is not defined anywhere that I can find.
I'm new to using mingw and msys so I may have missed some steps somewhere. Any help getting this to build would be really appreciated.
As this question had lain unanswered for some months, I looked into the problem.
I downloaded binutils-2.25 (latest at this date) and tried to follow your actions.
I discovered that if you only build gold without the rest of binutils it does not build. If you perform a ./configure and make at the top level it builds the gold fine. If you then cd gold and do the ./configure and make (albeit unnecessarily) then it works fine also.
I did find that when it failed on gold alone it got further than your build did.
My attention was also drawn to your phrase FLEX to the default location. The instructions with FLEX make it clear that you should not rely on the default location (which may be /Program Files/ or similar) but must use path that does not contain any spaces. If you had not noticed this, then that is your fault.
As the latest builds, you can get gold working by ensuring you have installed flex (and bison) properly in non-space paths, then downloading 2.25 and building the whole of binutils rather than gold alone.
I hope this analysis is useful for someone who comes later and finds similar issues.