Bug 609647

Summary: mpich2.x86_64 1.2.1p1-2.fc13 /usr/bin/ld: cannot find -lmpich
Product: [Fedora] Fedora Reporter: Andy <urunda>
Component: mpich2Assignee: Deji Akingunola <dakingun>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: 13CC: dakingun
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-01 01:10:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
hypre config log
none
petsc configure log none

Description Andy 2010-06-30 18:35:05 UTC
Description of problem:

/usr/bin/ld: cannot find -lmpich

Version-Release number of selected component (if applicable):

mpich2.x86_64 1.2.1p1-2.fc13

How reproducible:

100%

Steps to Reproduce:
1. module load mpich2-x86_64
2. mpd&
3. LD_LIBRARY_PATH=/usr/lib64/mpich2/lib; export LD_LIBRARY_PATH
4. mpicc --showme:link

Actual results:

/usr/bin/ld: cannot find -lmpich

Cannot compile/link codes using mpich2.x86_64 1.2.1p1-2.fc13

Expected results:



Additional info:

On a similar PC with mpich2.x86_64 1.2.1p1-1.fc12 it works fine.

Comment 1 Deji Akingunola 2010-06-30 18:55:43 UTC
Is the problem that you really are having issues compiling/linking code, or that 'mpicc --showme:link' is not working for you?
I'm asking because you're not running (MPICH2's) mpicc with the correct argument. I guess you're using to openmpi, to see the compile or link info used by MPICH2's mpicc, your run it with '-link-info' or 'compile-info' arguments;
"mpicc -link-info" or "mpicc -compile-info" or just "mpicc -info".

mpich2.x86_64 1.2.1p1-2.fc13 works quite well for me (without manually exporting LD_LIBRARY_PATH env like you did above).

Comment 2 Andy 2010-06-30 19:46:48 UTC
mpicc -info
/usr/bin/ld: cannot find -lmpich

I cannot compile actual codes: I have tried 
http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.1-p3.tar.gz
and 
https://computation.llnl.gov/casc/hypre/download/hypre-2.6.0b_reg.html
and both have failed with the same error: 
/usr/bin/ld: cannot find -lmpich(

In reply to comment #1)
> Is the problem that you really are having issues compiling/linking code, or
> that 'mpicc --showme:link' is not working for you?
> I'm asking because you're not running (MPICH2's) mpicc with the correct
> argument. I guess you're using to openmpi, to see the compile or link info used
> by MPICH2's mpicc, your run it with '-link-info' or 'compile-info' arguments;
> "mpicc -link-info" or "mpicc -compile-info" or just "mpicc -info".
> 
> mpich2.x86_64 1.2.1p1-2.fc13 works quite well for me (without manually
> exporting LD_LIBRARY_PATH env like you did above).

Comment 3 Deji Akingunola 2010-06-30 20:04:39 UTC
Can you attach the build logs for the failed compilations?

Comment 4 Andy 2010-06-30 20:48:41 UTC
Created attachment 428093 [details]
hypre config log

Comment 5 Andy 2010-06-30 20:49:36 UTC
Created attachment 428094 [details]
petsc configure log

Comment 6 Andy 2010-06-30 21:45:15 UTC
It is not related just to mpich2. I get the exactly same error using openmpi.x86_64   1.4.1-4.fc13

Comment 7 Deji Akingunola 2010-06-30 21:56:00 UTC
(In reply to comment #6)
> It is not related just to mpich2. I get the exactly same error using
> openmpi.x86_64   1.4.1-4.fc13    

I've been thinking about this issue, but can't figure it out at all yet. It seems to me that something might have messed up with your system configuration somewhere or a package (eg. environment-module or glibc).
Are you loading some custom scripts on start-up?

Comment 8 Andy 2010-06-30 22:09:58 UTC
No. It's a fresh install of FC13, with nothing special, and all current updates. 

(In reply to comment #7)
> (In reply to comment #6)
> > It is not related just to mpich2. I get the exactly same error using
> > openmpi.x86_64   1.4.1-4.fc13    
> 
> I've been thinking about this issue, but can't figure it out at all yet. It
> seems to me that something might have messed up with your system configuration
> somewhere or a package (eg. environment-module or glibc).
> Are you loading some custom scripts on start-up?

Comment 9 Andy 2010-06-30 22:45:05 UTC
I have found the source of the problem. 

ld is trying to find libmpich.so , which is not available in mpich2 rpm. On my other system, FC12, where it works, I do have a soft link libmpich.so -> libmpich.so.1.2 , but I do not remember how it got there. 

If I add on FC13 in /usr/lib64/mpich2/lib
ln -s libmpich.so.1.2 libmpich.so
now I get a different error
/usr/bin/ld: cannot find -lopa

So, how to get all the missing soft links? And why there are not in the rpm?

Comment 10 Andy 2010-06-30 23:01:12 UTC
Problem solved! There were missing packages openmpi-devel.x86_64 and mpich2-devel.x86_64 

Thanks for trying to help!

Comment 11 Deji Akingunola 2010-07-01 01:10:59 UTC
Good to know you found the solution. I'm still intrigued by how it needs the *-devel sub-package to work. mpicc (and mpicxx,mpif*) used to be packaged in the -devel sub-package.