[mpich-discuss] ROMIO configure looks for lstat in the wrong header

Rob Latham robl at mcs.anl.gov
Mon Sep 21 13:49:39 CDT 2015



On 09/14/2015 06:09 PM, William Throwe wrote:
> Hello,
>
> I hope this is the correct place to report a minor bug.  If not, please
> point me in the right direction.

thanks for sending this patch.  Since ROMIO happily provides its own 
lstat declaration and continues on its way, I never noticed this error.

I committed this change to master:
http://git.mpich.org/mpich.git/commit/7b8bd055dfdeb

==rob

>
> The ROMIO configure script checks for a declaration of lstat in
> unistd.h, but, at least on the Linux machines I checked, lstat is in
> sys/stat.h.  (The detection failure led to a linker error when building
> ROMIO as part of OpenMPI on one of my admittedly strangely configured
> machines, somehow.)  It appears from the man page that either location
> is possible, so I suggest checking both.  Suggested patch below.
>
> Thanks,
> William Throwe
>
> diff -Naur a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac
> --- a/src/mpi/romio/configure.ac	2015-09-14 18:33:06.000000000 -0400
> +++ b/src/mpi/romio/configure.ac	2015-09-14 18:36:06.000000000 -0400
> @@ -1562,7 +1562,8 @@
>   AC_CHECK_FUNCS(lstat)
>   if test "$ac_cv_func_lstat" = "yes" ; then
>       # Do we need to declare lstat?
> -    PAC_FUNC_NEEDS_DECL([#include <unistd.h>],lstat)
> +    PAC_FUNC_NEEDS_DECL([#include <unistd.h>
> +                         #include <sys/stat.h>],lstat)
>   fi
>   AC_CHECK_FUNCS(readlink)
>   if test "$ac_cv_func_readlink" = "yes" ; then
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>

-- 
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list