[petsc-dev] bad BuildSystem output
Barry Smith
bsmith at mcs.anl.gov
Thu Mar 22 17:20:02 CDT 2012
configure output
sh: mpicc -o /tmp/petsc-jZ4A3c/config.setCompilers/conftest /tmp/petsc-jZ4A3c/config.setCompilers/conftest.o
Executing: mpicc -o /tmp/petsc-jZ4A3c/config.setCompilers/conftest /tmp/petsc-jZ4A3c/config.setCompilers/conftest.o
sh:
ERROR while running executable: /tmp/petsc-jZ4A3c/config.setCompilers/conftest is not executablesh: mpicc --help
Executing: mpicc --help
sh: Usage: gcc [options] file...
The relevant source
def outputRun(self, includes, body, cleanup = 1, defaultOutputArg = '', executor = None):
if not self.checkLink(includes, body, cleanup = 0): return ('', 1)
if not os.path.isfile(self.linkerObj) or not os.access(self.linkerObj, os.X_OK):
self.framework.log.write('ERROR while running executable: '+self.linkerObj+' is not executable')
return ('', 1)
1) The error is not "while running" the executable. It is while checking if the executable file exists or has the x bit, error message is bd
2) It should produce a different error message if the executable doesn't exist vs does not have the x bit
3) Why TF is :" mpicc --help" on the same line of the very informative configure log with the error message?
4) Just before the "ERROR while running exe" line why doesn't it have a line "Testing executable NAME to see if it can be run" or some similar message? Reading the configure file I see oh it is compiling something, oh executable cannot be run, they don't fit well together for an inexperienced reader.
5) The output printed for the end user is not bad
Cannot run executables created with C. If this machine uses a batch system
to submit jobs you will need to configure using ./configure with the additional option --with-batch.
Otherwise there is problem with the compilers. Can you compile and run code with your C/C++ (and maybe Fortran) compilers?
except it has the bad vague phrasing "with your C/C++ (and maybe Fortran) compilers?" it should tell the user EXACTLY what compiler it was trying to run (which may not be the compiler the user thinks is their "user's compiler". )
It is sloppy output like this that makes debugging configure failures more painful than they need be. Remember people are going to still be using this stuff in 20 years but we are not going to be here to interpret the error conditions.
Barry
Begin forwarded message:
> From: mahesh natarajan <mn1729 at gmail.com>
> Date: March 22, 2012 4:46:24 PM CDT
> To: Matthew Knepley <petsc-maint at mcs.anl.gov>
> Subject: [petsc-maint #110458] Re : Configuring petsc
> Reply-To: petsc-maint at mcs.anl.gov, mahesh natarajan <mn1729 at gmail.com>
>
> Hi,
>
> I am trying to install petsc on my laptop. But I get an error. PFA log
> files. Any fixes ? Thanks.
>
>
>
> --
> Regards
> Mahesh Natarajan
>
[see attached file: log_summary.dat] [see attached file: configure.log]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log_summary.dat
Type: application/octet-stream
Size: 3541 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120322/eaf70a74/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: text/x-log
Size: 58554 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120322/eaf70a74/attachment.bin>
More information about the petsc-dev
mailing list