gRPC installation fails at "make" - c++

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?

Related

How to install flite for epitran on Windows

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

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.

Build Tensorflow iOS with env_time.cc:19:10: fatal error: 'windows.h' file not found

I tried to build Tensorflow iOS on El Capitan and got into many errors. I have followed the changes in https://github.com/tensorflow/tensorflow/pull/3382/files and https://github.com/tensorflow/tensorflow/pull/2936/files#r67559693 until I get to this error when running tensorflow/contrib/makefile/build_all_ios.sh:
gcc --std=c++11 -I. -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/downloads/ -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/downloads/eigen -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/downloads/gemmlowp -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/host_obj/ -I/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/protobuf-host/include -I/usr/local/include -c tensorflow/core/platform/windows/env_time.cc -o /Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/host_obj/tensorflow/core/platform/windows/env_time.o
tensorflow/core/platform/windows/env_time.cc:19:10: fatal error: 'windows.h' file not
found
#include <windows.h>
^
1 error generated.
make: *** [/Users/myusername/tfv1/tensorflow/tensorflow/contrib/makefile/gen/host_obj/tensorflow/core/platform/windows/env_time.o] Error 1
+ '[' 2 -ne 0 ']'
+ echo 'armv7 compilation failed.'
armv7 compilation failed.
+ exit 1
Does anyone know how to get pass that? I am assuming it's trying to build for Windows on Mac.
I simply solved the problem by deleting everything and started from scratch with these:
brew install bazel
brew install automake
brew install autoconf
brew uninstall libtool && brew install libtool
git clone https://github.com/tensorflow/tensorflow
tensorflow/contrib/makefile/download_dependencies.sh
tensorflow/contrib/makefile/build_all_ios.sh

luarocks 'gcc-plugin.h' build error

I am trying to use torch together with the hdf5 package. I am trying to install it via luarocks install hdf5 but during the build phase I get an error regarding the gcc-plugin header. (gcc relies on clang backend). The complete error message is:
luarocks install --local hdf5
Installing https://luarocks.org/hdf5-2.0.0-1.src.rock...
Using https://luarocks.org/hdf5-2.0.0-1.src.rock... switching to 'build' mode
Warning: variable CFLAGS was not passed in build_variables
gcclua-config.h:1:10: fatal error: 'gcc-plugin.h' file not found
#include "gcc-plugin.h"
^
1 error generated.
env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -c -o gcclua.o -Iplugin/include -fPIC -O2 -Wall -Wformat-security -I/usr/local/Cellar/lua/5.2.4_3/include gcclua.c
gcclua.c:7:10: fatal error: 'gcc-plugin.h' file not found
#include "gcc-plugin.h"
^
1 error generated.
make[2]: *** [gcclua.o] Error 1
make[1]: *** [gcc] Error 2
make: *** [gcc-lua] Error 2
Just to give more information, I am relying on
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
xcrun: error: couldn't stat toolchain: '/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.11.xctoolchain' (errno=No such file or directory)
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Does anybody has maybe a hint how to fix this issue?
Every help is greatly appreciated!!!
In addition to gcc, you need the headers, which on Linux you can get with sudo apt-get install gcc-4.8-plugin-dev. If you're on a different OS or version of gcc, just substitute the appropriate package manager / gcc version number.
gcc-plugin.h is a part of GCC, so I think you'll really need to install gcc to get that. Clang provides a gcc-compatible front-end script but that merely presents a command-line driver with compatible flags.
You should be able to install GCC using Homebrew: https://apple.stackexchange.com/a/86588
I bet you tried to work on a CS287-16 class :). I have contacted the developer of this library who wasn't that easy to do something to solve the problem. Apparently he has no friends who have a Mac PC... As a workaround I could suggest you to use a Docker container with Linux in it to run Lua scripts. That's what I have ended up with...
Here's the Docker image I was talking about: https://github.com/aoboturov/cs287-16-lua. You could build it yourself and the just run as a Docker container :)

What's the error as "CMAKE_BOOTSTRAP_BINARY_DIR" at a time as build CMake from a source code

What's the error as "CMAKE_BOOTSTRAP_BINARY_DIR". How can I build cmake from the source.
Environment:
System: Kubuntu-15.04
CMake source: https://github.com/Kitware/CMake
Reproduction:
git clone git#github.com:Kitware/CMake.git
cd CMake
git checkout v3.2.2
./bootstrap
Error ( at ./bootstrap ):
---------------------------------------------
g++ -I/home/usagi/repos/CMake/Bootstrap.cmk -I/home/usagi/repos/CMake/Source -I/home/usagi/repos/CMake/Bootstrap.cmk -c /home/usagi/repos/CMake/Source/cmSystemTools.cxx -o cmSystemTools.o
/home/usagi/repos/CMake/Source/cmSystemTools.cxx: In static member function ‘static void cmSystemTools::FindCMakeResources(const char*)’:
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2195:13: error: ‘CMAKE_BOOTSTRAP_BINARY_DIR’ was not declared in this scope
exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
^
/home/usagi/repos/CMake/Source/cmSystemTools.cxx:2249:28: error: ‘CMAKE_BOOTSTRAP_SOURCE_DIR’ was not declared in this scope
cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR;
^
Makefile:88: recipe for target 'cmSystemTools.o' failed
make: *** [cmSystemTools.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
Note:
"/home/usagi/repos" is a repository pool directory in my account.( "usagi" is my user name in this system.)
I got the solution at try on the after a lunch time.
The solution:
rm *
git checkout -f
./configure # In the environment, it is not require "./bootstrap".
make
"./bootstrap" is not needed in this environment.
I had the same problem in mac and spending a lot of time,
it was the best download cmake dmg from:
https://cmake.org/download/
(and only added cmake to the path)
and it runs great.
There is some extra information that I found about the bugs in cmake
https://cmake.org/pipermail/cmake-commits/2014-June/019853.html
best,
I.