[Trilinos-Users] error with 'make install' for Teuchos with PyTrilinos

Bill Spotz wfspotz at sandia.gov
Fri Aug 3 08:52:23 MDT 2007


John,

Sorry for my delay in responding to this.  I looked through the  
documentation for distutils and I found support for the command line  
arguments --prefix= (which I use) and --home= (which might be a  
better choice) but not for --root=.  Is this a valid option?

On Jul 25, 2007, at 8:05 PM, John Pye wrote:

> Bill Spotz wrote:
>> Your error is because the PyTrilinos installer is trying to write to
>> /usr and you do not have permission. The reason it is trying to write
>> to /usr is because PyTrilinos has a hybrid build system: make turns
>> over control to a python script that uses the distutils module. You
>> are specifying your install directory in a way I do not  
>> anticipate, so
>> it doesn't get passed to the script.
>
> I understand that. My aim here is the creation of a binary RPM for
> Trilinos. This process is the same as is required for packaging Debian
> packages as well. What is done is that './configure' is called with  
> the
> desired *final* locations of the files. This ensures that when  
> 'make' is
> run, any file locations that are hard-coded in the built files are set
> correctly. Then, when 'make install' is run, all the file locations  
> are
> changed to *temporary* file locations, so that all the files end up  
> in a
> special place (/var/tmp/trilinos-7.0.8 for example) so that RPM or
> Debian can come along afterwards and gather them up and put them into
> the package.
>
> Two approaches to the 'make install' thing are (1) to set prefix,
> exec_prefic, bindir, etc explicitly. (there are standard macros  
> provided
> in RPM for doing that) or (2) to set just one parameter like so: 'make
> install DESTDIR=/var/tmp/trilinos-7.0.8' (this path would then be
> preprended to all destination paths in calls to 'install' and 'mkdir'
> etc; and it would default to an empty string).
>
> It looks to me as though the simplest approach here might be the
> 'DESTDIR' approach, in which case it seems that your problem with
> distutils would be solved by calling it via 'python setup.py install
> --root=$DESTDIR' to pass the installation root location through to
> distutils.
>
> Hope that clarifies things a little.
>
> Cheers
> JP
>
>>
>> If you configure with --prefix=..., the PyTrilinos build system  
>> should
>> be able to figure out where to install its modules. I'm a little
>> surprised that it is trying to install in /usr and not /usr/local.  
>> Are
>> you currently setting --prefix?
>>
>> On Jul 25, 2007, at 6:07 AM, John Pye wrote:
>>
>>> Hi all
>>>
>>> I think I have a problem with the 'make install' step with  
>>> PyTrilinos in
>>> the current 7.0.8 release. My 'make install' command (part of  
>>> building
>>> an RPM package) is:
>>>
>>> |make prefix=/var/tmp/trilinos-7.0.8/usr
>>> exec_prefix=/var/tmp/trilinos-7.0.8/usr
>>> bindir=/var/tmp/trilinos-7.0.8/usr/bin
>>> sbindir=/var/tmp/trilinos-7.0.8/usr/sbin
>>> sysconfdir=/var/tmp/trilinos-7.0.8/etc
>>> datadir=/var/tmp/trilinos-7.0.8/usr/share
>>> includedir=/var/tmp/trilinos-7.0.8/usr/include
>>> libdir=/var/tmp/trilinos-7.0.8/usr/lib
>>> libexecdir=/var/tmp/trilinos-7.0.8/usr/libexec
>>> localstatedir=/var/tmp/trilinos-7.0.8/var
>>> sharedstatedir=/var/tmp/trilinos-7.0.8/usr/com
>>> mandir=/var/tmp/trilinos-7.0.8/usr/share/man
>>> infodir=/var/tmp/trilinos-7.0.8/usr/share/info install|
>>>
>>> This gets a little bit of the way in, with for example
>>>
>>> | /usr/bin/install -c -m 644 ./Teuchos_XMLParameterListReader.hpp
>>> /var/tmp/trilinos-7.0.8/usr/include/ 
>>> Teuchos_XMLParameterListReader.hpp
>>> /usr/bin/install -c -m 644 ./Teuchos_XMLParameterListWriter.hpp
>>> /var/tmp/trilinos-7.0.8/usr/include/ 
>>> Teuchos_XMLParameterListWriter.hpp
>>> /usr/bin/install -c -m 644 ./Teuchos_XMLParser.hpp
>>> /var/tmp/trilinos-7.0.8/usr/include/Teuchos_XMLParser.hpp
>>> make[4]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/src'|
>>>
>>> but then it fails. It seems that the makefile in
>>> packages/teuchos/python/src is ignoring the above 'make install'  
>>> flags,
>>> and just going ahead and instlaling the stuff in /usr. See below  
>>> for the
>>> error.
>>>
>>> Chees
>>> JP
>>>
>>> |make[4]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/example'
>>> make[3]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/example'
>>> Making install in python
>>> make[3]: Entering directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/python'
>>> Making install in src
>>> make[4]: Entering directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/python/src'
>>> /usr/bin/python ./setup.py install --prefix=/usr
>>> running install
>>> running build
>>> running build_py
>>> running build_ext
>>> running install_lib
>>> creating /usr/lib/python2.5/site-packages/PyTrilinos
>>> error: could not create '/usr/lib/python2.5/site-packages/ 
>>> PyTrilinos':
>>> Permission denied
>>> make[4]: *** [install] Error 1
>>> make[4]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/python/src'
>>> make[3]: *** [install-recursive] Error 1
>>> make[3]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos/python'
>>> make[2]: *** [install-recursive] Error 1
>>> make[2]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages/teuchos'
>>> make[1]: *** [install-recursive] Error 1
>>> make[1]: Leaving directory
>>> `/usr/src/redhat/BUILD/trilinos-7.0.8/packages'
>>> make: *** [install-recursive] Error 1
>>> error: Bad exit status from /var/tmp/rpm-tmp.40021 (%install)|
>>>
>>>
>>> <john.pye.vcf>
>>> _______________________________________________
>>> Trilinos-Users mailing list
>>> Trilinos-Users at software.sandia.gov
>>> http://software.sandia.gov/mailman/listinfo/trilinos-users

** Bill Spotz                                              **
** Sandia National Laboratories  Voice: (505)845-0170      **
** P.O. Box 5800                 Fax:   (505)284-5451      **
** Albuquerque, NM 87185-0370    Email: wfspotz at sandia.gov **




More information about the Trilinos-Users mailing list