From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Building 22.1 Date: Sun, 09 Sep 2007 12:18:29 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87wsv0h98q.fsf@lion.rapttech.com.au> References: <711a73df0709071041s5deafe5ar6d96851e17da4f33@mail.gmail.com> <711a73df0709071128m1885eb58t2ec873db1e61393c@mail.gmail.com> <711a73df0709071151lebe8a61x8052504f3bd05351@mail.gmail.com> <711a73df0709080126h5137e200g9ffac7c7136c463a@mail.gmail.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189328704 15119 80.91.229.10 (9 Sep 2007 09:05:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2007 09:05:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 09 11:03:17 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from mail-forward.uio.no ([129.240.10.42]) by dough.gmane.org with esmtp (Exim 4.50) id 1IUINO-0003Xh-SN for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Sep 2007 10:42:42 +0200 Original-Received: from mail-mx8.uio.no ([129.240.10.38]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IUCku-0006et-RE for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Sep 2007 04:42:36 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by mail-mx8.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IUCkp-0002kh-Ko for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Sep 2007 04:42:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IUCjZ-0002eM-P6 for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Sep 2007 22:41:13 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!news.glorb.com!sn-xt-sjc-04!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:g38qoy6IlINfRAsg3L6PZq4O3UQ= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 122 Original-Xref: shelby.stanford.edu gnu.emacs.help:151864 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-UiO-SPF-Received: Received-SPF: pass (mail-mx8.uio.no: domain of gnu.org designates 199.232.76.165 as permitted sender) client-ip=199.232.76.165; envelope-from=help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org; helo=lists.gnu.org; X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=12.0, autolearn=disabled, none) X-UiO-Scanned: 7A3A2F0F27DAB68B41351FE16278D9DE03286F30 X-UiO-SPAM-Test: remote_host: 199.232.76.165 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 17 total 17540 max/h 41 blacklist 0 greylist 0 ratelimit 0 Xref: news.gmane.org gmane.emacs.help:47389 Archived-At: "Dave Pawson" writes: > Done! Built. > (But in my /temp directory). > It was the missing packages it would seem. > Thanks for the hints. > > What's the 'normal' location for it please? > I.e. where should I build it for emacs to be in it's normal home? > Ubuntu 7 OS. > This all depends on the outcome you want. If you just want a stand alone non-integrated emacs, I'd put it in the /usr/local tree. In fact, I'd put it there even if you want it integrated with Debian's emacsen framework. I only put stuff in /usr if it comes from a deb package. I also have /usr/local on its own partition. That way, if for some reason in the future I decide to blow away my GNU Linux installation (either to install a clean new version or change distros etc), I can format all partitions except /home and /usr/local, leaving all my locally installed and private stuff alone. You specify the installation prefix when you run configure. I think it defaults to /usr/local, but best to verify. If thats the case, you should be able to just do make install and it will be installed. Note however, if you want to have integration with other emacs debian packages, such as emms or muse or whatever, you need to modify the emacs sources - normally, at elast the startup.el file and you need to do this *before* building emacs. To keep things simple and get full integration, here is what I do (I have plenty of disk space - if your low on disk space, this may not be feasible). 1. Install the emacs22 deb package. This will ensure that debconf knows you have an emacs22 version and therefore, all add-on deb packages need to be built with/for that version. It also satisfies dependencies for add-on packages. 2. Do the emacs configure, specifying /usr/local as the install prefix. Check all libraries, such as GTK dev libraries, various libraries for handling images, sound etc are all satisfied. If not, install the relevant packages and build again. 3. Modify the lisp/startup.el file that is part of the emacs sources. You need to add a defconstant for debian-emacs-flavor (set it to emacs22 even though you are installing emacs 23 - I will explain why later). Yo also need to modify the code later in that file which controls the loading of site-start.d files. The easiest way to do this is to open the startup.el file which comes with the deb version of emacs22 and search for the word 'debian' (case insensitive search). Open the startup.el file which comes with the emacs sources and add the necessary bits (its commented in the deb version, so its not hard). 4. Do a make bootimage 5. Check that the executable runs correctly by running it from the src directory. If all is working, do a make install. 6. After make install, cd to /usr/local/share/emacs/ and remove the site-lisp directory and replace it with a link to /usr/share/emacs22/site-lisp 7. Make sure your /usr/local/bin directory is in your path before /usr/bin. this will ensure your version of emacs is called before the deb versions or whatever /etc/alternatives points to (yo could just change /etc/alternatives, but this may get reset if you update the deb version of emacs22.) You should now have a version of emacs you have built from sources, but which is also able to take advantage of debian managed add-ons, such as auctex or nxml-mode or whatever. There are some dangers though ...... I know that the latest deb version of w3m-el will not work with emacs 23. You will need to get the latest dev version of that software to use w3m in emacs 23. This is really a hack and may get you into some odd situations, especially as you will be loading elisp built with emacs 22. While I've not noticed any problems myself, its generally not a good idea to mix up byte codes from different emacs versions. The danger here is probably low since at the moment there doesn't seem to be much variation in the elisp between emacs 22 and emacs 23. This could change as 23 develops. The reason you need to set debian-emacs-flavor to emacs22 rather than emacs23 is because this constant is used to setup the load-path and src-path stuff. If you set it to emacs23, your version of emacs will look for site-start files in /etc/emacs23/site-start.d and for byte code files in /usr/share/emacs23/site-lisp/*, but because your version of emacs is not a deb package, the deb isntallation process won't create any of these directories or put the relevant files in them when a new version or updated version of some elisp package is installed. Setting the debian-emacs-flavor to emacs22 effectively works around this issue and ensures you have access to the deb managed elisp packages. Of course, if you don't want to use any of the deb elisp packages and intend to install everything from sources by hand, you don't need to do any of this hackaery or install any of the debian emacsen stuff. If you do, once debian has an emacs23 package, install that and change the debian-emacs-flavor to emacs23. While all of this is a hack and it does use more disk space etc, it does have the advantage of the convenience of using deb packages while at the same time, making it easy to run the latest emacs CVS sources. Another advantage is that if for some reason the CVS version of emacs is broken or has a bug that makes it difficult to use, you can always run the debian version - handy to get you out of trouble in an emergency. HTH Tim -- tcross (at) rapttech dot com dot au