[CentralOH] Ubuntu Dapper (6.06) / Python 2.51

William McVey wam at cisco.com
Fri Jan 4 21:45:45 CET 2008


On Fri, 2008-01-04 at 12:09 -0500, Mark Erbaugh wrote:
> However, if I run sudo checkinstall to build and install a .DEB package,
> it get a lot of errors:
> /usr/bin/install -c -m644 ./<x> /usr/local/lib/python25/<x>
> /usr/bin/install: setting permissions for /usr/local/lib/<x>: No such
> file or Directory and the installation eventually aborts.

Based on what the error message is stating (No such file or directory),
I'm thinking the target directory /usr/local/lib/python25 (or perhaps
even /usr/local or /usr/local/lib) are not created. The install tool
doesn't by default create interleaving directories needed for
installation. That requires the -D option to be given. Perhaps your
Makefile or installation instructions skipped over the making of the
directories. This can happen for example if the install target of the
makefile depends on the target directories, and those directories could
be tied to rules that explicitly go through an "install -d" process. I
don't know why trying to install with checkinstall wouldn't resolve
these dependencies, when it should be doing a 'make install', but that
appears to be the case. You might want to do a "make -n install" to see
what make would try to do if it were running without being under the
control of checkinstall.

> If I manually execute /usr/bin/install (as superuser), the command
> completes without error and the file is installed with the appropriate
> permissions at the right place.

Hmm, so that would seem to indicate the directories are already properly
created. I don't know much about the inner workings of checkinstall, but
does it drop the installed files into a chroot'ed or fakeroot'ed
hierarchy as it's building the package file?

> I also tried running the ./config --prefix /usr to try and have it
> install files in /usr rather than /usr/local as the default Python 2.4
> install in Dapper was in /usr rather than /usr/local. I still got the
> same No Such File or Directory messages.

My first gut instinct is to try and figure out exactly which files or
directories the install tool is complaining about. You make be able to
discover this using strace (consider setting your Makefile's INSTALL
definition to 'strace -f -e trace=file /usr/bin/install -c'). This will
generate a lot of output, so you may want to redirect stderr to a file
that can be searched.

> Is this just a makefile that checkinstall can't process or do I have
> something set up wrong. I've used checkinstall to build packages for
> other projects where the instructions are ./configure, make and make
> install.

Well, it certainly does sound like an issue with checkinstall and not
python per-se. If you do a 'make install' does everything get installed
properly?

> Second question.  Python 2.5.1 comes with the latest version of Ubuntu
> (Gutsy - 7.10). However, the python executabe file that I built on my
> Dapper workstation is over 3 MB in size. The executable python file in
> Gutsy is only about 1.1 MB.  Am I building with some additional
> information that I don't need?

Your binary probably has debugging symbols still in the objects files.
These are generally removed by 'install' when run with the '-s' option,
or using the standalone tool 'strip'. 

  -- William



More information about the CentralOH mailing list