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

Satish Balay balay at mcs.anl.gov
Wed Mar 18 00:37:41 CDT 2015


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
<<<<<<<<<

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)
<<<<<<<<<<<<<

Satish

On Mon, 16 Mar 2015, Jed Brown wrote:

> As of this commit, --with-mpi-dir=/prefix requires that /prefix/lib
> exists.  I use ccache so this doesn't exist, but some packages don't
> have/need $prefix/lib anyway.  (I got a working build by creating an
> empty lib directory.)
> 
> Can we get relax this check or at the very least give an error message
> that explains why we're failing?
> 
> 
> commit 4d3c5e81ae5a13470b170f68287cb1ab351ca05d
> Author: Satish Balay <balay at mcs.anl.gov>
> Date:   Wed Feb 25 22:13:09 2015 -0600
> 
>     configure: skip non-existant dirs in generateGuesses()
> 




More information about the petsc-dev mailing list