[petsc-dev] [petsc-maint #49590] problem building petsc-dev

Satish Balay balay at mcs.anl.gov
Sun Jul 18 09:16:48 CDT 2010


pushed changes.

satish

On Sat, 17 Jul 2010, Satish Balay wrote:

> On Fri, 16 Jul 2010, Satish Balay wrote:
> 
> > > >>> Part of the problem is: configure cannot distinguish between user
> > > >>> provided value vs configure default value - for any given option. So
> > > >>> we can't do both:
> 
> Actually this looks simple to fix. A single liner already exists in
> PETSc/Configure.py. So I just need it in framework.py
> 
> -----------------------------------------------------
>     args = dict([(nargs.Arg.parseArgument(arg)[0], arg) for arg in self.framework.clArgs])
> -----------------------------------------------------
> 
> diff -r 583bb7a11b3a config/framework.py
> --- a/config/framework.py       Fri Jul 16 19:44:18 2010 -0500
> +++ b/config/framework.py       Fri Jul 16 23:42:31 2010 -0500
> @@ -104,6 +104,8 @@
>      # List of packages actually found
>      self.packages           = []
>      self.createChildren()
> +    # Create argDB for user specified options only
> +    self.userArgDB = dict([(nargs.Arg.parseArgument(arg)[0], arg) for arg in self.clArgs])
>      return
>  
>    def __getstate__(self):
> asterix:/home/balay/tmp/petsc-dev/config/BuildSystem>
> 
> --------------------------------------------------------
> 
> Now the following works
> 
> >>>>>>>>>>
>     # if user specifies inconsistant 'with-dynamic-loader with-shared-libraries with-pic' options - flag error.
>     if self.framework.argDB['with-dynamic-loader'] and not self.framework.argDB['with-shared-libraries'] and 'with-shared-libraries' in self.framework.userArgDB:
>       raise RuntimeError('If you use --with-dynamic-loader you cannot disable --with-shared-libraries')
>     if self.framework.argDB['with-dynamic-loader'] and not self.framework.argDB['with-pic'] and 'with-pic' in self.framework.userArgDB:
>       raise RuntimeError('If you use --with-dynamic-loader you cannot disable --with-pic')
>     if self.framework.argDB['with-shared-libraries'] and not self.framework.argDB['with-pic'] and 'with-pic' in self.framework.userArgDB:
>       raise RuntimeError('If you use --with-shared-libraries you cannot disable --with-pic')
> <<<<<<<<<<
> 
> But I'd also like to do:
> >>>>>>>>>>>>
>     # default with-dynamic-loader=1 => with-shared-libraries=1 --with-pic=1
>     # default with-shared-libraries=1 => --with-pic=1
>     if self.framework.argDB['with-dynamic-loader'] and not self.framework.argDB['with-shared-libraries']: self.framework.argDB['with-shared-libraries'] = 1
>     if self.framework.argDB['with-shared-libraries'] and not self.framework.argDB['with-pic']: self.framework.argDB['with-pic'] = 1
> <<<<<<<<<<<<
> 
> but the code in buildsystem checkPIC() etc gets run before
> sharedLibraries.py - so having the above code in sharedLibraries.py
> won't work. [have to figure this out..]
> 
> Satish
> 




More information about the petsc-dev mailing list