[petsc-dev] Fwd: [petsc-users] cannot find 'libz.a' when configuring

Satish Balay balay at mcs.anl.gov
Thu Apr 11 10:39:57 CDT 2013


On Thu, 11 Apr 2013, Satish Balay wrote:

> On Thu, 11 Apr 2013, Matthew Knepley wrote:
> 
> > On Thu, Apr 11, 2013 at 10:12 AM, Satish Balay <balay at mcs.anl.gov> wrote:
> > 
> > > On Thu, 11 Apr 2013, Satish Balay wrote:
> > >
> > > > > > > > > We have had this same discussion a million times, and we always
> > > > > > > > eventually
> > > > > > > > > get to the same answer and forget. Do we need our own error
> > > message
> > > > > > for
> > > > > > > > > petsc-dev?
> > > > > > > > >
> > > > > > > > > We cannot possibly guess everything that can go wrong. What we
> > > need
> > > > > > is a
> > > > > > > > > system
> > > > > > > > > where the user can specify what he actually wants and we check
> > > it.
> > > > > > So,
> > > > > > > > zlib
> > > > > > > > > and
> > > > > > > > > everything else are optional dependencies for hdf5. If
> > > something is
> > > > > > not
> > > > > > > > > specified, it
> > > > > > > > > fails, and the user goes back and specifies the right thing.
> > > > > > > >
> > > > > > > > Sure - but specify how? specify everything with
> > > > > > > > --with-hdf5-lib,--with-hdf5-include options?
> > > > > > > >
> > > > > > > > Or somehow he knows that he has to specify
> > > > > > > > --with-zlib-include/-with-zlib-lib options?
> > > > > > > >
> > > > > > >
> > > > > > > This. It would be nice if HDF5 would tell us about its
> > > dependencies, but
> > > > > > if
> > > > > > > it does not, then
> > > > > > > the user has to, and this is our system (packages).
> > > > > >
> > > > > > So we would start adding zlib.py, szip.py and manymore [and support
> > > > > > --download-zlib --download-szip]. And if user gets the error:
> > > > > >
> > > > > > --with-hdf5-dir=/foo/bar does not work.
> > > > > >
> > > > > > So he/she send us configure.log
> > > > > >
> > > > > > Then we look at it and respond saying: you need to specify
> > > --with-zlib-dir
> > > > > > --with-szip-dir options aswell.
> > > > > >
> > > > > > Does this look right?
> > > > >
> > > > >
> > > > > Yes, that is what I think makes sense.
> > > > >
> > > > > We can always try to add another layer that 'greps' for libz in the
> > > hdf5
> > > > > error message and guesses that
> > > > > the user forgot it, but hopefully before we get to it, a sane storage
> > > > > library appears, or HDF5 gets its act
> > > > > together.
> > > >
> > > > In this case - why bother with libz.py and szip.py? Why not tell the
> > > > user to specify hdf5 completely with --with-hdf5-include and
> > > > --with-hdf5-lib options?
> > > >
> > > > Just printing the link errors on the screen might be sufficient to
> > > > clue in the user. Currently its hidden inside configure. [And its not
> > > > clear which of the 10 tests configure did for this case should be
> > > > printed on the screen as the appropriate message]
> > >
> > > I might have been the one that advocated self.needsCompression approach
> > > thats
> > > currently in configure.
> > >
> > > This is currently used only by hdf5.py.
> > >
> > > My current thought is to strip it out - and just add it to hdf5.py as:
> > >
> > >     self.liblist   =
> > > [['libhdf5.a','libhdf5_hl.a'],'['libhdf5.a','libhdf5_hl.a','libz.a'],['libhdf5.a','libhdf5_hl.a','zlib.lib']]
> > >
> > > This would be equivalent to the current functionality - and perhaps
> > > what was there previously - before we wanted better error messages and
> > > detection of zlib. Since this is not possible anyway why bother
> > > with the additional complexity?
> > 
> > 
> > What is not possible? Detecting zlib? Of course this is possible, and we do
> > it.
> 
> The primary thing we need is detecting hdf5 provided by user requires
> zlib [and or szip]. This is not poissible.
> 
> And current code can't detect zlib anyway [outside system locations]
> so we need libz.py to detect it better.  But whats the point of it?
> [detecting zlib or szip via --with-zlib-dir and --with-szip-dir options?]
> 
> When use has a mesages:
> 
> --with-hdf5=foo/bar provides does not work
> 
> I'd rather respond with:
> 
> Specify hdf5 and all its dependencies correctly with
> --with-hdf5-lib,--with-hdf5-include options.
> 
> 
> > It is not possible to know without testing what crazy link line is
> > required by HDF5, at least I don't know how to do that.
> 
> yes 
> 
> > This is no way affects the utility of testing for zlib.
> 
> But whats the point of testing for zlib - if not for hdf5? And if we
> can't relate them automatically.

I'll concede that having zlib.py szip.py will be useful if you need
them for --download-hdf5 [either as mandatory dependencies or optonal
dependencies].

Currently --download-hdf5 isn't built with either.

My contention here is - depencency management stuff in configure
doesn't help for the optional dependencies of user installed packages
that are specified to petsc configure with the option
--with-package-dir

Satish



More information about the petsc-dev mailing list