Error in installation of quorum blockchain - blockchain

Error in installing the quorum
github.com/ethereum/go-ethereum/crypto/secp256k1 exec: "gcc":
executable file not found in $PATH
github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid #
github.com/ethereum/go-ethereum/vendor/github.com/karalabe/hid exec:
"gcc": executable file not found in $PATH util.go:44: exit status 2
exit status 1 Makefile:25: recipe for target 'all' failed make: ***
[all] Error 1
`

Install gcc
$ apt-get install build-essential
or
$ apt-get install gcc
After that you can run make all it will run.

Related

Fix the build issue when using 'make' command when installing OSRM

I am setting up a OSRM server locally on a EC2 instance which is running Ubuntu 18.04.
I have followed the following steps to install OSRM:-
sudo apt update
sudo apt install -y git \
cmake \
build-essential \
jq \
liblua5.2-dev \
libboost-all-dev \
libprotobuf-dev \
libtbb-dev \
libstxxl-dev \
libbz2-dev
git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend/
mkdir build
cd build/
cmake ..
make /* fails here */
On executing this in the given sequence, I get this error
[ 8%] Built target UTIL
[ 10%] Built target MICROTAR
[ 12%] Linking CXX executable osrm-components
CMakeFiles/osrm-components.dir/src/tools/components.cpp.o:components.cpp:function main: error: undefined reference to 'boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
CMakeFiles/osrm-components.dir/build.make:132: recipe for target 'osrm-components' failed
make[2]: *** [osrm-components] Error 1
CMakeFiles/Makefile2:100: recipe for target 'CMakeFiles/osrm-components.dir/all' failed
make[1]: *** [CMakeFiles/osrm-components.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Thanks in advance
Reinstalling everything in the same manner after deleting every related file and folder worked for me.

Install GCC: fatal error: gnu/stubs-32.h: No such file or directory

I'm using a server with Centos 6.6. I don't have root access and I want to install the gcc-4.8.1 to my own directory. I found a solution and I run the following commands:
wget http://www.netgull.com/gcc/releases/gcc-4.8.1/gcc-4.8.1.tar.gz
tar zxvf gcc-4.8.1.tar.gz
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1 --enable-languages=c,c++,fortran,go
make
I got errors when running the make command. It reports the following information:
configure: error: `CC' has changed since the previous run:
configure: former value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/include -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/sys-include '
configure: current value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/include -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/sys-include '
configure: error: in `/home/mypath/software/try_gcc2/objdir/x86_64-unknown-linux-gnu/libgcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make: *** [all] Error 2
I cannot figure what's wrong with my command. Thank you all for helping me!!!
I think I have found the solution. When I'm trying to build gcc-5.2.0, it reports that my server does not have 32-bit libraries. It also informs that if I still want to install anyway, I can add --disable-multilib when building. I tried and now the build is running normally.

Linking error: "relocation R_X86_64_32 ... can not be used when making a shared object; recompile with -fPIC"

I am attempting to compile Tox (specifically toxcore). When I attempt to compile it, I encounter the following error:
>make
make all-recursive
make[1]: Entering directory '/root/Tox/toxcore'
Making all in build
make[2]: Entering directory '/root/Tox/toxcore/build'
CCLD libtoxav.la
/usr/bin/ld: /usr/local/lib/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvpx.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:1385: recipe for target 'libtoxav.la' failed
make[2]: *** [libtoxav.la] Error 1
make[2]: Leaving directory '/root/Tox/toxcore/build'
Makefile:506: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/Tox/toxcore'
Makefile:410: recipe for target 'all' failed
make: *** [all] Error 2
Following the error message, I have attempted to use fPIC by exporting C++ flags (export CXXFLAGS="$CXXFLAGS -fPIC"), by adding an argument to configure (./configure --enable-shared) and by editing the Makefile (changing CC = gcc to CC = gcc -fPIC), but these attempts have not worked and I still encounter the same error. What might be going wrong?
Here's the approach I have right now (on Ubuntu):
sudo apt-get install pkg-config
sudo apt-get install build-essential
sudo apt-get install libtool
sudo apt-get install autotools-dev
sudo apt-get install automake
sudo apt-get install checkinstall
sudo apt-get install check
sudo apt-get install git
sudo apt-get install yasm
cd ~
mkdir Tox
cd Tox
git clone https://github.com/jedisct1/libsodium.git
cd libsodium
git checkout tags/1.0.3
./autogen.sh
./configure && make check
sudo checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc
sudo ldconfig
cd ..
git clone https://chromium.googlesource.com/webm/libvpx
cd libvpx
git checkout tags/v1.3.0
./configure
make
make install
cd ..
git clone https://github.com/irungentoo/toxcore.git
cd toxcore
autoreconf -i
./configure
make
sudo make install
cd ..
There must be a bug in the configuration script, it shouldn't come up with libvpx.a.
But worry not, since Ubuntu provides packages for both libvpx-dev and libsodium-dev, and using those seems to work just fine, so you should probably just do that unless there's some strong reason not to.
Also, unless you need classic toxcore, it seems c-toxcore is the successor, so you probably should use it instead.
Configuring with --enable-pic will add in the necessary -fPIC options, and works for me.

Coova-Chilli 1.3.0 build fails for Ubuntu server 14.04

Followed the directions from Coova-Chilli distribution build.
wget https://coova.github.io/coova-chilli/coova-chilli-1.3.0.tar.gz
tar xzf coova-chilli-1.3.0.tar.gz
cd coova-chilli-1.3.0/
debuild -b
and the results are the following error.
...........Error Section................
/usr/bin/ld: /usr/lib/libssl.a(s23_srvr.o): relocation R_X86_64_32 against
`.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libssl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libchilli.la' with the above command before
installing it
make[4]: *** [install-libLTLIBRARIES] Error 1
make[4]: Leaving directory `/home/download/coova-chilli-1.3.0/src'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/download/coova-chilli-1.3.0/src'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/download/coova-chilli-1.3.0/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/download/coova-chilli-1.3.0'
make: *** [install] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit
status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc -b failed
I initially thought maybe openssl was not a recent enough version. None of the other applications had that problem. So I removed openssl package, built and installed it from source. The latest version is openssl 1.0.2e. I retested radius server after ripping up and rebuilding openssl and all is surprisingly still working fine.
I tried to compile coova-chilli again and also 1.2.9 as well but received the same error. libssl.a is present in that location.
Any thoughts on how best to proceed?
The instructions for Debian/Ubuntu on Coova-Chilli were not correct for Ubuntu.
wget https://coova.github.io/coova-chilli/coova-chilli-1.3.0.tar.gz
tar xzf coova-chilli-1.3.0.tar.gz
cd coova-chilli-1.3.0/
./configure --prefix= --enable-miniportal (or whatever flags you want)
make
sudo make install
update-rc.d chilli defaults
Reference: https://help.ubuntu.com/community/WifiDocs/CoovaChilli

Cannot open libmpc.so.3 while making gcc4.8.1

I want to install gcc4.8.1 on ubuntu 10.04.
Here are my installing steps:
Install libgmp, libmpfr and libmpc.
After switch to gcc4.8.1 source code dir, run "./configure --prefix=/usr/bin/gcc4.8.1 --with-gmp=/opt/pkg/gmp5.1.2 --with-mpfr=/opt/pkg/mpfr3.1.2 --with-mpc=/opt/pkg/mpc1.0.1"
make
export LD_LIBRARY_PATH=/opt/pkg/gmp5.1.2/lib:/opt/pkg/mpfr3.1.2/lib:/opt/pkg/mpc1.0.1/lib
sudo make install.
In the last step I get this error:
/usr/local/sbin/gcc-4.8.1/host-i686-pc-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
make[5]: *** [install-exec-hook] Error 1
make[5]: Leaving directory `/usr/local/sbin/gcc-4.8.1/i686-pc-linux-gnu/libjava'
make[4]: *** [install-exec-am] Error 2
make[4]: Leaving directory `/usr/local/sbin/gcc-4.8.1/i686-pc-linux-gnu/libjava'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/usr/local/sbin/gcc-4.8.1/i686-pc-linux-gnu/libjava'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/local/sbin/gcc-4.8.1/i686-pc-linux-gnu/libjava'
make[1]: *** [install-target-libjava] Error 2
make[1]: Leaving directory `/usr/local/sbin/gcc-4.8.1'
make: *** [install] Error 2
I have switched to the libmpc library path and tested libmpc.so.3 with ldd. It has been installed successfully. Why does it say it cannot open shared object libmpc.so.3? How can I fix it?
According to your suggest, I have installed gcc4.8.1 successfully. Here are my steps:
Remove gmp, mpfr and mpc from /opt/pkg.
Install gmp, mpfr and mpc with the default configure. These packages will be installed in /usr/local/lib.
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH.
Enter the gcc source dir, run "./configure".
make.
Add symbol links:
sudo ln -s /usr/local/lib/libgmp.so.10 /usr/lib/libgmp.so.10
sudo ln -s /usr/local/lib/libmpfr.so.4 /usr/lib/libmpfr.so.4
sudo ln -s /usr/local/lib/libmpc.so.3 /usr/lib/libmpc.so.3
sudo make install.
Than you KiaMorot. Thank you trojanfoe.
I don't believe any of the answers here address the issue. Your problem is the last two steps
export LD_LIBRARY_PATH=/opt/pkg/gmp5.1.2/lib:/opt/pkg/mpfr3.1.2/lib:/opt/pkg/mpc1.0.1/lib
sudo make install
exporting your LD_LIBRARY_PATH is correct, but then you reset all environment variables when you change to root user with sudo in the last step.
One way to get around this:
sudo -s # become root user
export LD_LIBRARY_PATH=/opt/pkg/gmp5.1.2/lib:/opt/pkg/mpfr3.1.2/lib:/opt/pkg/mpc1.0.1/lib
make install # don't use sudo here
If anybody stumbles upon this using their own manually-built version of libgmp, libmpfr and libmpc instead of the system-provided ones:
export LD_LIBRARY_PATH=/opt/your-prefix-directory
is necessary for make itself, i.e. even when gcc ./configure was run with
--with-gmp=/opt/your-prefix-directory --with-mpc=/opt/your-prefix-directory --with-mpfr=/opt/your-prefix-directory
you need to specify where the linker should go looking for libgmp and friends.
You have to check if the libmpc.so.3 is a successfully created symbolic link to libmpc.so.3.0.0. This error may arise because you have installed this library manually and the sym. link may be missing. You could try this:
sudo ln -s /opt/pkg/mpc1.0.1/lib/libmpc.so.3.0.0 /opt/pkg/mpc1.0.1/lib/libmpc.so.3
Syntax of ln is ln -s <real path to file> <symbolic link name>. For more check out the man page of ln.