[petsc-dev] Requiring $prefix/lib for --with-pkg-dir=

Jed Brown jed at jedbrown.org
Mon May 11 18:49:27 CDT 2015


Satish Balay <balay at mcs.anl.gov> writes:

> For one - I want to get rid of 'self.libdir,self.altlibdir' usage [but
> self.libdir is used allover configure - so I should look at this usage
> more closely before I make this change].
>
> But to adress your issue - I expected packages that don't have 'lib' to
> set: [as in config/BuildSystem/config/packages/cusp.py]
>
> self.libdir = ''.
>
> But to get libdir check working for mpicc etc - perhaps the following would
> suffice?
>
>>>>>>>>
> $ git diff config/BuildSystem/config/packages/MPI.py
> diff --git a/config/BuildSystem/config/packages/MPI.py b/config/BuildSystem/config/packages/MPI.py
> index 0a0cb2a..312de0c 100644
> --- a/config/BuildSystem/config/packages/MPI.py
> +++ b/config/BuildSystem/config/packages/MPI.py
> @@ -68,6 +68,7 @@ class Configure(config.package.Package):
>    def generateLibList(self, directory):
>      if self.setCompilers.usedMPICompilers:
>        self.liblist = []
> +      self.libdir  = []
>      return config.package.Package.generateLibList(self,directory)
>  
>    # search many obscure locations for MPI
> <<<<<<<<<

Why should MPI be special?

> To get this working more generally - perhaps the following change?
>
>>>>>>>>>
> $ git diff config/BuildSystem/config/package.py |cat
> diff --git a/config/BuildSystem/config/package.py b/config/BuildSystem/config/package.py
> index 4c1f2c4..7a7da1b 100644
> --- a/config/BuildSystem/config/package.py
> +++ b/config/BuildSystem/config/package.py
> @@ -322,7 +322,7 @@ class Package(config.base.Configure):
>    def generateGuesses(self):
>      d = self.checkDownload()
>      if d:
> -      for libdir in [self.libdir, self.altlibdir]:
> +      for libdir in [self.libdir, self.altlibdir, '']:
>          libdirpath = os.path.join(d, libdir)
>          if not os.path.isdir(libdirpath):
>            self.logPrint(self.PACKAGE+': Downloaded DirPath not found.. skipping: '+libdirpath)
> @@ -358,7 +358,7 @@ class Package(config.base.Configure):
>                             fakeExternalPackagesDir+' is reserved for --download-package scratch space. \n'+
>                             'Do not install software in this location nor use software in this directory.')
>  
> -      for libdir in [self.libdir, self.altlibdir]:
> +      for libdir in [self.libdir, self.altlibdir, '']:
>          libdirpath = os.path.join(d, libdir)
>          if not os.path.isdir(libdirpath):
>            self.logPrint(self.PACKAGE+': UserSpecified DirPath not found.. skipping: '+libdirpath)
> @@ -405,7 +405,7 @@ class Package(config.base.Configure):
>            self.logPrint(self.PACKAGE+': SearchDir DirPath not found.. skipping: '+d)
>            continue
>          includedir = self.getIncludeDirs(d, self.includedir)
> -        for libdir in [self.libdir, self.altlibdir]:
> +        for libdir in [self.libdir, self.altlibdir, '']:
>            libdirpath = os.path.join(d, libdir)
>            if not os.path.isdir(libdirpath):
>              self.logPrint(self.PACKAGE+': DirPath not found.. skipping: '+libdirpath)
> <<<<<<<<<<<<<

Was there a reason to check in the first place?  Having an explicit
check for a $prefix/lib directory and then circumventing the check just
adds complexity.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150511/2dc615b5/attachment.sig>


More information about the petsc-dev mailing list