[mpich-discuss] Compiling shared libraries with Fortran 77 compiler and unexpected option
Pavan Balaji
balaji at mcs.anl.gov
Thu Sep 8 02:51:20 CDT 2011
After thinking about this for sometime, I'm not sure there's a good
solution to this problem. Here are two options to consider:
1. Do a WRAPPER_LDFLAGS="$LDFLAGS" at the start and at every point in
configure that we discover a new LDFLAGS variable, we add it to
WRAPPER_LDFLAGS as well. This will require us to make a pass on all
configure scripts and modify them appropriately (e.g., whenever we do
AC_SEARCH_LIBS, etc.). Personally, I think this is a definite way to
introduce bugs into the code and will be a maintenance nightmare.
2. Get rid of MPICH2LIB_LDFLAGS totally. Do we really need flags that
are used to build MPICH2, but not to build the application? Is there a
use case that I'm missing?
-- Pavan
On 09/07/2011 09:38 AM, Dave Goodell wrote:
> On Sep 7, 2011, at 8:24 AM CDT, Thomas Jahns wrote:
>
>> there is one other problem still: MPICH2LIB_LDFLAGS do still end up in the
>> wrapper, despite documentation indicating otherwise. This is the result of setting
>>
>> LDFLAGS="$LDFLAGS $MPICH2LIB_LDFLAGS"
>>
>> in configure.in line 275 and later in line 6166 setting
>>
>> WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS $LDFLAGS"
>>
>> I propose to add
>>
>> wrapper_saved_LDFLAGS=$LDFLAGS
>>
>> before line 275 and later use
>>
>> WRAPPER_LDFLAGS="$WRAPPER_LDFLAGS $wrapper_saved_LDFLAGS"
>
> Hmm... this is a tricky area of the configure. There is a tension between wanting to discover some needed libraries and/or library search paths automatically in configure (think -lmx and -L/path/to/mx/lib) and putting exactly what the user asked for in the wrapper linking flags.
>
> Your "fix" completely omits all libraries and flags that were discovered during the bulk of the configure process. Alternatively we could add everything that we discover but leave out the MPICH2LIB_LDFLAGS, but that would mean that we were blindly including a subset of the tested flags without having actually tested that exact subset together. Let me talk to Pavan offline and think about this some more and see if there's anything we can do.
>
> -Dave
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list