New User? Register here - Existing Users: Username: Password: [Advanced Login]

 

 

Current Poll

Your preferred Interactive shell?









( 1395 votes ~ 15 comments )

 

Weblog entry #17 for lykwydchykyn

Question about debuild failure
Posted by lykwydchykyn on Fri 19 Dec 2008 at 18:01
Tags: none.
When building packages from source downloaded with apt-get source or apt-src, sometimes debuild fails with errors like this:
****************************************
/usr/bin/make install DESTDIR=/home/alanm/packages/jwm-2.0.1/debian/jwm prefix=/home/alanm/packages/jwm-2.0.1/debian/jwm
make[1]: Entering directory `/home/alanm/packages/jwm-2.0.1'
/usr/bin/make -C src all
make[2]: Entering directory `/home/alanm/packages/jwm-2.0.1/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/alanm/packages/jwm-2.0.1/src'
/usr/bin/make -C src install
make[2]: Entering directory `/home/alanm/packages/jwm-2.0.1/src'
install -d /usr/bin
install jwm /usr/bin/jwm
install: cannot remove `/usr/bin/jwm': Permission denied
make[2]: *** [install] Error 1
make[2]: Leaving directory `/home/alanm/packages/jwm-2.0.1/src'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/alanm/packages/jwm-2.0.1'
make: *** [install] Error 2
dpkg-buildpackage: failure: fakeroot debian/rules binary gave error exit status 2
*******************************

It's as though "make install" is trying to install to /usr/bin instead of the build directory. Am I missing a step here?

 

Comments on this Entry

Posted by Steve (82.41.xx.xx) on Sun 21 Dec 2008 at 12:22
[ Send Message | View Steve's Scratchpad | View Weblogs ]

It seems clear that the Makefile is ignoring the DESTDIR setting you've passed to it.

I'd suggest you read the contents of the file to see if it is supposed to use it. Much software uses PREFIX instead of DESTDIR - and some software doesn't come with out of the box support for non-global installation at all, so you'll need to edit the Makefile yourself to add it ..

Steve

[ Parent | Reply to this comment ]

Posted by lykwydchykyn (65.1.xx.xx) on Thu 25 Dec 2008 at 06:10
[ Send Message | View Weblogs ]
Thanks steve; I tried PREFIX and DESTDIR and it seems to ignore either. I'm wondering, though; isn't that the sort of thing the package maintainer would fix when putting the source into Debian? Or is that fix likely to be in the diff.gz file that gets downloaded along with the source? How do I apply the diff.gz file?

[ Parent | Reply to this comment ]

Posted by Steve (2001:0xx:0xx:0xxx:0xxx:0xxx:xx) on Thu 25 Dec 2008 at 10:14
[ Send Message | View Steve's Scratchpad | View Weblogs ]

It depends is the best answer I could give. I fixup packages to install with a prefix, in general, and as you say that change would make it into the diff.gz file.

If you've got a Debian package, and you've extracted it vai "apt-get source" then the diff.gz file has already been applied - everything in "debian/" comes from there for a start.

If I run "apt-get source jwm", and then immediately change into that directory and run "debuild -sa" I see this:

..
make[2]: Leaving directory `/tmp/jwm-2.0.1/src'
/usr/bin/make -C src install
make[2]: Entering directory `/tmp/jwm-2.0.1/src'
install -d /tmp/jwm-2.0.1/debian/jwm/usr/bin
install -m 0755 jwm /tmp/jwm-2.0.1/debian/jwm/usr/bin/jwm
make[2]: Leaving directory `/tmp/jwm-2.0.1/src'
..

So oddly it works for me..

I guess you

Steve

[ Parent | Reply to this comment ]

 

 

Flattr