[mpich2-dev] CFLAGS=-fPIC not passed down to MPE ?

Dave Goodell goodell at mcs.anl.gov
Mon Aug 6 11:32:45 CDT 2012


On Aug 5, 2012, at 7:26 PM CDT, Lisandro Dalcin wrote:

> This is with trunk updated yesterday. I've explicitly passed
> CFLAGS=-fPIC FFLAGS=-fPIC to configure:
[…]
> However, after trying to link-in libmpe.a to build a shared library on
> Linux x86_64, I get the usual relocation errors related to non-PIC
> code:

Hmm… not sure exactly what's going on here.  It looks like most of the MPE build system is still written assuming that "mpicc" from the build dir is around, but then uses some default fallback of "$CC $MPICPPFLAGS" since it's not.  That is, it's ignoring "$CFLAGS" in the fallback.  

Anthony, do you have a suggestion on what the right way to fix this would be?  I'm tempted to just insert "$CFLAGS" in the fallback, but that's almost certainly wrong given that I'm only looking at this through a tiny peephole.

If you want a very short-term workaround, you can probably add "-fPIC" to "$MPICPPFLAGS" in your environment.

> PS: Will MPICH2 ever provide lib[l]mpe.so in POSIX platforms? Getting
> trace files without a recompile is really handy:

Probably not.  Doing so would involve a lot of build system work in MPE and we are strapped pretty thin for development bandwidth as it is.  If you personally feel like updating MPE to use automake and libtool then I'd be happy to work with you to integrate such a patch into MPICH2.

-Dave



More information about the mpich2-dev mailing list