Error: libtool - while compiling an MPI program

旧街凉风 提交于 2019-12-07 14:46:01

问题


I'm using OpenSuse Leap and I installed openMPI thought YaST. Running a which mpirun command I get /usr/lib64/mpi/gcc/openmpi/bin/mpirun and running which mpicc i get /usr/bin/mpicc.

How to make sure first that OpenMPI is correctly installed?

Second, I have a simple hello world I am process X program and running mpicc hello.c I get this output

gcc: error: libtool:: No such file or directory

gcc: error: link:: No

such file or directory mpicc: No such file or directory

Also, I installed Eclipse for Parallel Application and used a build-in example and it gives me this output at build

make all

Building target: hello

Invoking: GCC C Linker

mpicc -o "hello" ./src/hello.o

gcc: error: libtool:: No such file or directory

gcc: error: link:: No such file or directory

makefile:30: recipe for target 'hello' failed

mpicc: No such file or directory

make: *** [hello] Error 1

I checked YaST and libtool is installed.


回答1:


This answer comes at a time too late. I recently had the same issue. Hence anyone who comes here for an answer, this was how I got it working.

Please note: this is an isolated situation who gets similar error

gcc: error: libtool:: No such file or directory

gcc: error: link:: No such file or directory

mpicc: No such file or directory

First try to check the solution suggested by LPs. It will try to update your libtool autoconf and automake. If you get nothing to do:

sudo zypper in automake autoconf libtool
root's password:
Loading repository data...
Reading installed packages...
'libtool' is already installed.
No update candidate for 'libtool-2.4.2-15.2.2.x86_64'. The highest available version is already installed.
'autoconf' is already installed.
No update candidate for 'autoconf-2.69-10.1.2.noarch'. The highest available version is already installed.
'automake' is already installed.
No update candidate for 'automake-1.13.4-5.1.2.noarch'. The highest available version is already installed.
Resolving package dependencies...

Nothing to do.

Then explicitly add your OpemMPI path variable.

export PATH=/usr/lib64/mpi/gcc/openmpi/bin:$PATH

This worked for me. Good luck!



来源:https://stackoverflow.com/questions/35378437/error-libtool-while-compiling-an-mpi-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!