Matthew Rosewarne on 31 Dec 2008 10:39:33 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Perils of building from source?


On Wednesday 31 December 2008, Eric wrote:
> Happy New Year to all!

Happy New Year!

> I'm building some software from source code ( Kompozer: nvu spin-off
> which is a Mozilla Composer spin-off ).  I'm doing this because I
> installed it from the package (apt-get install kompozer) but the darn
> thing crashes at the slightest provocation.

The likely causes of the instability are, in order of probability:
	1. Buggy software:  There's a reason Nvu never got anywhere.
	2. Library changes: A library the app uses has been changed in incompatible 
ways.  If only the binary interface has changed, a rebuild will fix the 
problem.  If the API has changed, the app's source would need to be updated.
	3. Ghosts: A perennial problem; consult an exorcist.
	4. Bad packaging: Fairly unlikely, but relatively easy to find and fix.  
However, {Ubuntu comment redacted}.

> What is the recommended way to do this in Ubuntu?  Should I uninstall
> the binary package first?

Yes.

However, if some software is already in your distro (even an outdated version 
of it), it makes little sense to install it directly from source.  Rather you 
would download the distro's source package, (optionally) alter it, build .deb 
packages from it, and install those.

To get the source packages, you need the appropriate lines in your 
/etc/apt/sources.list.  Make a copy of any lines starting with "deb", but 
replacing "deb" with "deb-src".  Update apt, then run "apt-get source 
<packagename>".  If apt doesn't find the source, use "apt-cache showsrc 
<packagename>" and it should tell you.

apt-get source will download and unpack the source to a directory called 
<sourcename>-<version>.  Go into that directory, run "apt-get build-dep 
<sourcename>", and then "dpkg-buildpackage".  If the build is successful, you 
will now have .deb packages in the directory above.


If there are problems, or you wish to build a never version than your distro 
provides, feel free to ask on #plug.

Attachment: signature.asc
Description: This is a digitally signed message part.

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug