Problem compiling MPI project, how do I get libopenmpi-dev on Fedora? - mpi

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.

Related

Torch '!./install.sh' returns error in Colab when installing Torch

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.

Cannot install rpy2 in python 2.7

I am attempting to install RPy2 in the Python environment (2.7.x) that comes bundled in Mac OS X Sierra (10.12.6), and as such, I am attempting to install the latest non-2.9.x version from Terminal using pip via the command:
pip install 'rpy2<2.9.0' --user
The --user flag is there because I have installed Homebrew on a user which is normally not admin and for which I turned on admin rights briefly for the sole purpose of installing Homebrew.
Every time I run this command, I get the following error:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/1x/d_trx3556sl61by_tp4093j80000gq/T/pip-build-uV52fY/rpy2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/1x/d_trx3556sl61by_tp4093j80000gq/T/pip-LoW5FN-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/1x/d_trx3556sl61by_tp4093j80000gq/T/pip-build-uV52fY/rpy2/
Looking back into the output, it shows the following at time of failure:
creating build/temp.macosx-10.12-intel-2.7/rpy/rinterface
/usr/local/Cellar/gcc/7.2.0/bin/gcc-7 -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I./rpy/rinterface -I/Library/Frameworks/R.framework/Resources/include -c ./rpy/rinterface/r_utils.c -o build/temp.macosx-10.12-intel-2.7/./rpy/rinterface/r_utils.o
unable to execute '/usr/local/Cellar/gcc/7.2.0/bin/gcc-7': No such file or directory
error: command '/usr/local/Cellar/gcc/7.2.0/bin/gcc-7' failed with exit status 1
I am unable to find anyone who is getting a similar error, and I cannot figure out what is going on.
Does anyone know why this is failing?
I would discourage you from installing Python packages in your system's Python (unless you are happy with reinstalling the system if "something suddenly stopped working").
I also encourage you to use the latest rpy2 (the 2.9.x series are arguably much better than the 2.8.x series), and move to Python 3.
Finally, a binary wheel for rpy2-2.9.3 on OS X is now available on pypi (making the installation no longer require a development tools).

How do I switch source of memcache to compile and for drush to enable it?

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

installing guile, issue with libunistring depedencies

I'm trying to install meep and at the moment guile on my dir on a cluster. I'm not root.
guile needs libunistring. I have installed that but the ./configure of guile still can not find the libunistring. Of course I am telling it where to look at with
--with-libunistring-prefix=/home/xxx/install/libunistring
But I'm still receiving the same error.
configure:21042: checking for libunistring
configure:21074: gcc -o conftest -g -O2 conftest.c -lunistring >&5
conftest.c:141:21: error: uniconv.h: No such file or directory
and the uniconv.h is really where it should be.
Any input?

Unable to compile thrift-0.9.0 on Centos6.4

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

Resources