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

Lisandro Dalcin dalcinl at gmail.com
Mon Aug 6 11:56:30 CDT 2012


On 6 August 2012 13:32, Dave Goodell <goodell at mcs.anl.gov> wrote:
> 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.
>

Isn't this just a configure issue? In 1.4.x, MPE's configure is
invoked with CFLAGS set:

$ cd mpich2-1.4.1
$ head -n 7 config.log | tail -n 1
  $ ./configure --prefix=/home/devel/mpi/mpich2-1.4.1 --enable-shared
CFLAGS=-fPIC FFLAGS=-fPIC --enable-g=all

$ cd src/mpe2/
$ head -n 7 config.log | tail -n 1
  $ /home/devel/BUILD/MPI/mpich2-1.4.1/src/mpe2/configure
--prefix=/home/devel/mpi/mpich2-1.4.1 --enable-shared CFLAGS=-fPIC -g
-O2 FFLAGS=-fPIC -g -O2 --enable-g=all --disable-option-checking


>> 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.
>

I see. Unfortunately, my skills on autotools is limited. Is there any
other sub-component that is already using libtool?


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


More information about the mpich2-dev mailing list