command 'gcc' failed while installing HUE - gcc

I am trying to install HUE on ubuntu 14 and I get the following error:
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/home/huser/miniconda/include/python2.7 -c src/_fastmath.c -o build/temp.linux-x86_64-2.7/src/_fastmath.o
src/_fastmath.c:36:18: fatal error: gmp.h: No such file or directory
# include <gmp.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
make[2]: *** [/home/huser/hue/desktop/core/build/pycrypto-2.6.1/egg.stamp] Error 1
make[2]: Leaving directory `/home/huser/hue/desktop/core'
make[1]: *** [.recursive-env-install/core] Error 2
make[1]: Leaving directory `/home/huser/hue/desktop'
make: *** [desktop] Error 2
I have installed gcc using
sudo apt-get install gcc
I followed the instructions from this link. I have installed all the packages listed here. Please help!

This error states that gcc had not found "gmp.h", not that gcc is missing.
You need to assure that you have installed "libgmp3-dev" package and have gmp.h in path.
It is duplicate of Where to find "gmp.h"?, but I seem not to be able to flag this as such.

Related

Issue compiling FFTW

I am trying to install FFTW on my mac with OpenMP enabled. I initially had trouble configuring, but that issue was solved here.
Now after configuring I type "make" and I get the following error:
libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I../kernel -I../dft -I../rdft -I../api -I../tests -I../libbench2 -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -Wa,-q -Wl,-no_compact_unwind -MT any-true.lo -MD -MP -MF .deps/any-true.Tpo -c any-true.c -o any-true.o
clang: error: unknown argument: '-malign-double'
clang: warning: -Wl,-no_compact_unwind: 'linker' input unused
clang: error: unsupported argument '-q' to option 'Wa,'
clang: warning: optimization flag '-fno-schedule-insns' is not supported
make[3]: *** [any-true.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
What is the issue here and how can I solve it?
You could try passing the location of the gcc compiler its absolute path rather than the binary name, just as
CC=/usr/local/gcc-6.1.0/bin/gcc-6.1.0 ./configure --enable-mpi --enable-threads --enable-openmp
EDIT
After having a brief chat with OP, it looks like he omitted part of the error and the error came from the mpicc compiler used (due to --enable-mpi in the configure stage). According to the user, they were using OpenMPI and according to this FAQ the user can tune the C compiler by using the OMPI_CC environtment variable. So my suggestion was to build the FFTW library as
OMPI_CC=/usr/local/gcc-6.1.0/bin/gcc-6.1.0 make

make[2]: *** [libevent.la] Error 1

I'm trying to install libevent-2.0.12-stable on Centos, but when i type sudo make,error happens(I did ./configure before make):
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -Wall -fno-strict-aliasing -pthread -version-info 6:1:1 -release 2.0 -o libevent.la -rpath /usr/local/libevent-2.0.12-stable/lib event.lo evthread.lo buffer.lo bufferevent.lo bufferevent_sock.lo bufferevent_filter.lo bufferevent_pair.lo listener.lo bufferevent_ratelim.lo evmap.lo log.lo evutil.lo evutil_rand.lo strlcpy.lo select.lo poll.lo epoll.lo signal.lo event_tagging.lo http.lo evdns.lo evrpc.lo -lrt
libtool: link: gcc -shared -fPIC -DPIC .libs/event.o .libs/evthread.o .libs/buffer.o .libs/bufferevent.o .libs/bufferevent_sock.o .libs/bufferevent_filter.o .libs/bufferevent_pair.o .libs/listener.o .libs/bufferevent_ratelim.o .libs/evmap.o .libs/log.o .libs/evutil.o .libs/evutil_rand.o .libs/strlcpy.o .libs/select.o .libs/poll.o .libs/epoll.o .libs/signal.o .libs/event_tagging.o .libs/http.o .libs/evdns.o .libs/evrpc.o -lrt -O2 -pthread -pthread -Wl,-soname -Wl,libevent-2.0.so.5 -o .libs/libevent-2.0.so.5.1.1
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/librt.a(clock_gettime.o): relocation R_X86_64_PC32 against undefined symbol `__errno_location##GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libevent.la] Error 1
make[2]: Leaving directory `/home/lpchou/software/httpsqs/libevent-2.0.12-stable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lpchou/software/httpsqs/libevent-2.0.12-stable'
make: *** [all] Error 2
Can anyone help? Thanks.
Update
After i install libevent successfully with rpm package as mentioned by #KnudLarsen, i try to install tokyocabinet using make, however same error happens:
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libm.a(s_sin.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libm.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libtokyocabinet.so.9.10.0] Error 1
I tried methods in Recompiling with -fPIC, but doesn't work. It seems there lacks some dependent packages, for i just install libevent and tokyocabinet in another centos machine and everything works fine.
CentOS 6.8 - 64bits :
tokyocabinet-1.4.32 builds OK : libtokyocabinet.so.8.23.0, libtokyocabinet.a
tokyocabinet-1.4.48 is also OK : libtokyocabinet.so.9.11.0, libtokyocabinet.a
... So I guess you have to install / reinstall your build requirements for gcc :
yum reinstall gcc-c++ glibc-devel glibc-headers kernel-headers
... to have the right files /usr/lib64/ and /usr/include/.
? Which version of tokyocabinet are you trying to build ? And where did you get it ?

How to cross compile iw to Xilinx Petalinux?

Update
The error happens at line 8962 of libtool, which performs a lot of commands inside a loop. The content of the problematic command is
arm-xilinx-linux-gnueabi-gcc -shared -fPIC -DPIC genl/.libs/ctrl.o genl/.libs/family.o genl/.libs/genl.o genl/.libs/mngt.o -Wl,-rpath -Wl,/usr/arm-linux-gnueabi/lib -L/usr/arm-linux-gnueabi/lib -lnl-3 -lpthread -lm -O2 -Wl,--version-script=../libnl.sym -Wl,-soname -Wl,libnl-genl-3.so.200 -o .libs/libnl-genl-3.so.200.19.0
If I manually run it, it says
error: genl/.libs/ctrl.o: No such file or directory
the .o s are there, but the problem is that make install is under sudo, but sudo is a different environment and it doesn't recognize the paths. So solution is:
sudo -s
source /opt/pkg/......./settings.sh
source command is required by Xilinx Petalinux for the paths. Now make install will work
Original
I am following the beyond logic example to cross compile the iw tool. The first step is the libnl. I am using CentOS to crossc compile libnl, so I have to run source /opt/pkg/.../settings.sh to setup the arm-xilinx-linux-gnueabi-gcc paths. I then used ./configure --host=arm-xilinx-linux-gnueabi --prefix=/usr/arm-xilinx-linux-gnueabi
The make is running fine. But make install failed with following errors:
libtool: install: (cd /xxx/libnl-3.2.24/lib; /bin/sh /home/xxx/libnl-3.2.24/libtool --silent --tag CC --mode=relink arm-xilinx-linux-gnueabi-gcc -g -O2 -version-info 219:0:19 -Wl,--version-script=../libnl.sym -o libnl-genl-3.la -rpath /usr/arm-xilinx-linux-gnueabi/lib genl/ctrl.lo genl/family.lo genl/genl.lo genl/mngt.lo libnl-3.la -lpthread -lm )
/xxx/libnl-3.2.24/libtool: line 8962:
arm-xilinx-linux-gnueabi-gcc: command not found
libtool: install: error: relink `libnl-genl-3.la' with the above command before installing it
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: Leaving directory `/xxx/libnl-3.2.24/lib'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/xxx/libnl-3.2.24/lib'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/xxx/libnl-3.2.24/lib'
make: *** [install-recursive] Error 1
so since make is successful using arm-xilinx-linux-gnueabi-gcc, why make install is complaining it can't find it?
Problem is with following statement
./configure --host=arm-xilinx-linux-gnueabi --prefix=/usr/arm-xilinx-linux-gnueabi
arm-xilinx-linux-gnueabi is not installed at /usr thats why getting arm-xilinx-linux-gnueabi-gcc: command not founderror.
Install arm toolchain and then follow procedure mentioned in beyond logic example

Errors occuring when make-ing Aircrack-ng on raspberry pi

As it can be seen in the log I have some errors when trying to compile Aircrack on my Raspberry pi B+ running latest raspbian. I can't manage to find out what's wrong.
(I have also installed libnl)
make -C src all
make[1]: Entering directory '/home/pi/aircrack-ng-1.2-rc1/src'
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0
-DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3
-Wno-unused-but-set-variable -Wno-array-bounds -Iinclude wpaclean.o
osdep/radiotap/radiotap.o -o wpaclean -Losdep -losdep -lnl-genl-3
-lnl-3
/usr/bin/ld: cannot find -lnl-genl-3
collect2: ld returned 1 exit status
Makefile:189: recipe for target 'wpaclean' failed
make[1]: *** [wpaclean] Error 1
make[1]: Leaving directory '/home/pi/aircrack-ng-1.2-rc1/src'
Makefile:25: recipe for target 'all' failed
make: *** [all] Error 2
Thanks
sudo apt-get install libnl-3-dev
sudo ln -s /lib/arm-linux-gnueabihf/libnl-genl-3.so.200 /lib/arm-linux-gnueabihf/libnl-genl-3.so
You have installed libnl-3-dev but it doesn't create proper library link.
Try "sudo make" and "sudo make install"
You also might need to install the libssl-dev package if you havent done so already.

Chef-solo install - gecode compile error

Im trying to install chef-solo on CentOS 6.3 x64 and when I run:
sudo chef-solo -c /etc/chef/solo.rb -j ~/chef.json -r http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
I'm getting this output:
g++ -I. -ffast-math -fno-strict-aliasing -O3 -fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG \
-c -o gecode/int/extensional.o gecode/int/extensional.cpp
make[1]: Leaving directory `/tmp/chef-solo/gecode-3.5.0'
STDERR: {standard input}: Assembler messages:
{standard input}:13822: Warning: end of file not at end of a line; newline inserted
{standard input}:14946: Error: unknown pseudo-op: `.'
{standard input}:14946: Error: open CFI at the end of file; missing .cfi_endproc directive
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [gecode/int/extensional.o] Error 1
make: *** [compilelib] Error 2
---- End output of "bash" "/tmp/chef-script20120904-19809-1ofhwoq" ----
Ran "bash" "/tmp/chef-script20120904-19809-1ofhwoq" returned 2
I can install gecode from the RBEL6 repo without any problems but the cookbook attempts to install from source. I found this pull request on github which attempts to install from the RBEL repo but I got an error saying that the repository metadata couldn't be found. Anyone know what to do?
Since I have been searching for an answer to this, my findings were rather ... unsurprising.
I simply ran out of memory. I had to compile my files on another system with the same OS (copied over /tmp/chef-solo/gecode-3.5.0 to the box and just ran make) and synced the resulting folder back to run make install
Once the library is found the compile step is skipped and you should be good to continue.

Resources