I have followed all the instructions mentioned in the Apache thrift wiki. I downloaded the thrift source code, then installed the dependencies
sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel
Then ran
./configure
(didn't run bootstrap.sh because there is no bootstrap.sh in the thrift-0.9.0 codebase). Finally, I get this error. Any idea why this is happening?
libtool: link: ( cd ".libs" && rm -f "libthriftz.la" && ln -s "../libthriftz.la" "libthriftz.la" )
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I./src -I./src/thrift -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtNetwork -Wall -g -O2 -MT libthriftqt_la-moc_TQTcpServer.lo -MD -MP -MF .deps/libthriftqt_la-moc_TQTcpServer.Tpo -c -o libthriftqt_la-moc_TQTcpServer.lo `test -f 'src/thrift/qt/moc_TQTcpServer.cpp' || echo './'`src/thrift/qt/moc_TQTcpServer.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include -I./src -I./src/thrift -DQT_SHARED -I/usr/include/QtCore -I/usr/include/QtNetwork -Wall -g -O2 -MT libthriftqt_la-moc_TQTcpServer.lo -MD -MP -MF .deps/libthriftqt_la-moc_TQTcpServer.Tpo -c src/thrift/qt/moc_TQTcpServer.cpp -fPIC -DPIC -o .libs/libthriftqt_la-moc_TQTcpServer.o
src/thrift/qt/moc_TQTcpServer.cpp:14:2: error: #error "This file was generated using the moc from 4.8.1. It"
src/thrift/qt/moc_TQTcpServer.cpp:15:2: error: #error "cannot be used with the include files from this version of Qt."
src/thrift/qt/moc_TQTcpServer.cpp:16:2: error: #error "(The moc has changed too much.)"
src/thrift/qt/moc_TQTcpServer.cpp:47: error: no 'void apache::thrift::async::TQTcpServer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' member function declared in class 'apache::thrift::async::TQTcpServer'
src/thrift/qt/moc_TQTcpServer.cpp:62: error: 'const QMetaObjectExtraData apache::thrift::async::TQTcpServer::staticMetaObjectExtraData' is not a static member of 'class apache::thrift::async::TQTcpServer'
src/thrift/qt/moc_TQTcpServer.cpp:63: error: 'qt_static_metacall' was not declared in this scope
src/thrift/qt/moc_TQTcpServer.cpp:64: error: too many initializers for 'const QMetaObjectExtraData'
src/thrift/qt/moc_TQTcpServer.cpp:68: error: 'staticMetaObjectExtraData' was not declared in this scope
src/thrift/qt/moc_TQTcpServer.cpp:69: error: too many initializers for 'QMetaObject::<anonymous struct>'
src/thrift/qt/moc_TQTcpServer.cpp: In member function 'virtual int apache::thrift::async::TQTcpServer::qt_metacall(QMetaObject::Call, int, void**)':
src/thrift/qt/moc_TQTcpServer.cpp:95: error: 'qt_static_metacall' was not declared in this scope
make[4]: *** [libthriftqt_la-moc_TQTcpServer.lo] Error 1
make[4]: Leaving directory `/home/rjain/Downloads/thrift-0.9.0/lib/cpp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/rjain/Downloads/thrift-0.9.0/lib/cpp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rjain/Downloads/thrift-0.9.0/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rjain/Downloads/thrift-0.9.0'
make: *** [all] Error 2
I download the source from: http://www.apache.org/dyn/closer.cgi?path=/thrift/0.9.0/thrift-0.9.0.tar.gz
Your qt-devel is out of date for thrift. Just remove the qt-devel rpm and rerun the configure script which will skip this part. It works for me.
First of all, check your qt related rpms by executing the following command
rpm -qa | grep qt-devel
If you find qt-devel is installed version below 4.6, please remove this package by executing command
rpm -qa | grep qt-devel | xargs rpm -e
If this is done, the qt part of thrift will be skipped.
It looks like the version of Qt that is on your system is older than what this program expects. Can you try updating Qt to a later version?
sudo yum install qt4-devel
Related
I run
make
I get this error
mkdir -p build/
mpicc -Wall -fPIC -m64 -O3 -c src/main.c -o build/main.o
make: mpicc: No such file or directory
make: *** [Makefile:24: build/main.o] Error 127
while trying to compile an mpi project. This is for a project for school and we are "required" to download the libopenmpi-dev package for ubuntu. I'm on fedora so I've tried installing openmpi, mpich-devel, lib-openmpi-devel,libmpich but nothing works yet. I still get the same error. I'm not sure where to go from here.I thought it could just be an export error for mpicc but locate mpicc and whereis mpicc returns nothing.
I'm trying to install RcppArmadillo in my R environment.
I have created a Docker container starting from a Ubuntu:20.04 image and installing miniconda to manage the environment and install R.
When I install RcppArmadillo I have this error:
checking whether the C++ compiler works... no
configure: error: in `/tmp/Rtmp1znFrE/R.INSTALL3901267e6e22/RcppArmadillo':
configure: error: C++ compiler cannot create executables
I have checked the config.log file to search the error, and I found this:
gcc version 9.4.0 (conda-forge 9.4.0-15)
configure:1931: $? = 0
configure:1920: aarch64-conda-linux-gnu-c++ -std=gnu++14 -V >&5
aarch64-conda-linux-gnu-c++: error: unrecognized command line option '-V'
aarch64-conda-linux-gnu-c++: fatal error: no input files
compilation terminated.
configure:1931: $? = 1
configure:1920: aarch64-conda-linux-gnu-c++ -std=gnu++14 -qversion >&5
aarch64-conda-linux-gnu-c++: error: unrecognized command line option '-qversion'; did you mean '--version'?
aarch64-conda-linux-gnu-c++: fatal error: no input files
compilation terminated.
configure:1931: $? = 1
configure:1951: checking whether the C++ compiler works
configure:1973: aarch64-conda-linux-gnu-c++ -std=gnu++14 -fvisibility-inlines-hidden -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem /root/miniconda3/include -fdebug-prefix-map=/drone/src/build_artifacts/r-base-split_1630154255557/work=/usr/local/src/conda/r-base-4.1.1 -fdebug-prefix-map=/root/miniconda3=/usr/local/src/conda-prefix conftest.cpp >&5
/root/miniconda3/bin/../lib/gcc/aarch64-conda-linux-gnu/9.4.0/../../../../aarch64-conda-linux-gnu/bin/ld: /root/miniconda3/bin/../lib/gcc/aarch64-conda-linux-gnu/9.4.0/libstdc++.so: undefined reference to `__cxa_thread_atexit_impl#GLIBC_2.18'
collect2: error: ld returned 1 exit status
I don't understand if it's a problem of GCC (I have tried to uninstall and install again through apt-get but nothing changed), but seems really strange to me.
If I echo $PATH I get as result /root/miniconda3/bin:/usr/bin:/bin, but If I find / -name gcc I get:
/root/miniconda3/lib/R/library/BH/include/boost/mpl/aux_/preprocessed/gcc
/root/miniconda3/lib/gcc
/root/miniconda3/libexec/gcc
/root/miniconda3/libexec/gcc/aarch64-conda-linux-gnu/9.4.0/gcc
/root/miniconda3/share/licenses/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/libexec/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/libexec/gcc/aarch64-conda-linux-gnu/9.4.0/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/share/licenses/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/lib/gcc
/root/miniconda3/pkgs/libgcc-devel_linux-aarch64-9.4.0-h85f5abf_15/lib/gcc
/root/miniconda3/pkgs/libstdcxx-devel_linux-aarch64-9.4.0-h85f5abf_15/lib/gcc
/root/miniconda3/pkgs/gfortran_impl_linux-aarch64-9.4.0-h54cdb55_15/libexec/gcc
/root/miniconda3/pkgs/gfortran_impl_linux-aarch64-9.4.0-h54cdb55_15/lib/gcc
/root/miniconda3/pkgs/gxx_impl_linux-aarch64-9.4.0-h603953f_15/libexec/gcc
/usr/share/gcc
/usr/share/doc/gcc
/usr/share/doc/gcc-9-base/gcc
/usr/lib/gcc
/usr/bin/gcc
so maybe there are some mistakes in all these GCC instances.
Thanks for your help
I followed http://torch.ch/docs/getting-started.html#_ to install Torch.
I always get the following error when running
!./install.sh
in google colab
error:
...
-- Installing: /root/torch/install/include/luaT.h
-- Installing: /root/torch/install/share/cmake/torch/luaTConfig.cmake
Updating manifest for /root/torch/install/lib/luarocks/rocks
torch scm-1 is now built and installed in /root/torch/install/ (license: BSD)
Updating manifest for /root/torch/install/lib/luarocks/rocks
dok scm-1 is now built and installed in /root/torch/install/ (license: BSD)
gcc -O2 -fPIC -I/root/torch/install/include -c utils.c -o utils.o
gcc -shared -o treplutils.so -L/root/torch/install/lib utils.o
gcc -O2 -fPIC -I/root/torch/install/include -c readline.c -o readline.o
readline.c:8:10: fatal error: readline/readline.h: No such file or directory
#include <readline/readline.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Error: Build error: Failed compiling object readline.o
.
Please I need help fixing this error.
Probably you need something like
!apt-get install libreadline-dev
before attempting to run the install.sh script.
Ubuntu 14.04 LTS
Drupal 7.43
PHP 7.0
I read in other posts:
I switched to the https://github.com/rlerdorf/php-memcached.git, then I can successfully build the extension.
So how do I actually switch to the other git repo to build?
Because of php 7.0, my current memcache fails to build; error below:
sudo pecl install memcache
...
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/libtool -- mode=compile cc -I/usr/include/php/20151012 -I. -I/tmp/pear/temp/memcache - DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/include - I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/main - I/tmp/pear/temp/memcache -I/usr/include/php/20151012 - I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM - I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext - I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/memcache/memcache.c -o memcache.lo
libtool: compile: cc -I/usr/include/php/20151012 -I. - I/tmp/pear/temp/memcache -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/include -I/tmp/pear/temp/pear-build-rootNtdeGS/memcache-2.2.7/main -I/tmp/pear/temp/memcache -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext - I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/memcache/memcache.c -fPIC -DPIC -o .libs/memcache.o
/tmp/pear/temp/memcache/memcache.c:40:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
#include "ext/standard/php_smart_str.h"
^
compilation terminated.
make: *** [memcache.lo] Error 1
ERROR: `make' failed
use git clone:
git clone https://github.com/rlerdorf/php-memcached.git
cd into folder
phpize
./configure
make
make install
I have compiled using below parameters
#./configure --prefix=/usr/local CFLAGS=-fPIC --enable-static --enable-shared \
CFLAGS="-g -O2 -DSQLITE_ENABLE_FTS3=1 \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-DSQLITE_SECURE_DELETE=1 \
-DSQLITE_ENABLE_DBSTAT_VTAB=1"
# make -j 8
# make install
After using sqlite I get below error message:
/usr/bin/g++ -o utools/utools.so -Wl,-Bsymbolic -g -O2 -shared -Wl,-z,defs utools/utools.plugin.o utools/lib/libutools.a core/lib/libunv.a fv/lib/libfv.a sb/lib/libsb.a -lz -ldl
/usr/bin/ld: /usr/local/sqlite/lib/libsqlite3.a(sqlite3.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/sqlite/lib/libsqlite3.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
scons: *** [stdarm/stdarm.so] Error 1
scons: building terminated because of errors.
inside /usr/local/lib/ directory, deleting following files worked for me
libsqlite3.a
libsqlite3.la
libsqlite3.o.0.bak
libsqlite3.so
I think these files are from the older versions of libsqlite3,
because when you type and check dpkg -L libsqlite3-dev, none goes to /usr/local/lib/
I took the reference from sqlite3 breakage