Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So the Linux From Scratch Hint recommends that before you even attempt LFS you should be able to build and install emacs from scratch. I am trying to do this.

The INSTALL doc claims it's fairly strightforward

./configure; make

but when I do make I get crashes to the order of

Makefile:111: *** commands commence before first target. Stop. ***

After poking around for what seems like ever I realize that I can fix this error by opening the Makefile in question and placing a \ on the end of the preceding line. Ok, I kind of sort of understand what's going on. Of course there are lots of Makefiles with lots of multiline commands, doing this to each file is just too time consuming.

I imagine that if these Makefiles work for some people and not for me there is some simple global setting that I can adjust to fix this?

share|improve this question
up vote 2 down vote accepted

This simply shouldn't happen with a actively maintained product like GNU Emacs, so I'd like to explore why it might be happening

  1. How are you getting the sources that are doing this to you?

    • Is there some chance that line endings have been converted or the text re-filled along the way or something?

    • Had you previously opened the makefile in a editor that likes to impose it's own space/tab or line length conventions?

  2. Are you sure that the make (and autoconf?) you are using is sufficient. The GNU guys are never shy about requiring their tool chain and recent versions.

  3. Did you pay attention to the bit in INSTALL where it says:

    When `configure' finishes, it prints several lines of details about the system configuration. Read those details carefully looking for anything suspicious, such as wrong CPU and operating system names, wrong places for headers or libraries, missing libraries that you know are installed on your system, etc.

    (emphasis added)?

  4. What file-system have you unpacked onto?

Aside trying with emacs-23.3b.tar.gz downloaded today "just work"ed with

$ tar xzf emacs-23.3b.tar.gz
$ cd emacs-23.3
$ configure
$ make

on by MacBook.

share|improve this answer
I downloaded the latest tar.gz directly from the emacs website. Unless tar -xvf does something to line Also this is happening to files that I have never opened. And no, I have no idea what the configure file was supposed to do nor what I'm supposed to do to fix it but this is a fresh ubuntu 11.10 install with all the default settings - shouldn't the most popular consumer version of linux be captured by the autoconf? – George Mauer Jan 5 '12 at 23:01
That pretty much shoots all my good ideas down, unless ./configure has missed something important. – dmckee Jan 5 '12 at 23:07
I did read that part but again - I have no idea what qualifies something as 'suspicious' (this is an a VM afterall) nor what to do about it. Again, this is all the default settings in what has got to be an incredibly common setup. In any case, how could any of these things affect line endings? I am trying to do LFS to learn all this stuff but it seems that knowing it is a prerequisite for even the prerequisite. – George Mauer Jan 5 '12 at 23:09
I've had one more brain-storm: if you have unpacked onto a windows-native filesystem I'd look to see it tar or the filesystem might be diddling the line-endings for you. After that I'm stuck. The INSTALL file has a lot of advice further down, but it does require that you can guess at what's going wrong in the first place. Finally, do you have a non-VM environment you could try this in just for comparison? – dmckee Jan 5 '12 at 23:19
Ok, restarted from the beginning and got a lot further (though it still doesn't build properly) I think maybe I was downloading an older version from the ftp hub? – George Mauer Jan 5 '12 at 23:22

Check for whitespace after the backslash \ on the previous line. This can cause the error. Also try converting tabs to spaces (here inside vim):

share|improve this answer
The default version of vi that comes with ubuntu doesn't have retab? Also, no, no trailing spaces that I can see detect in gedit. – George Mauer Jan 5 '12 at 23:05
@George: No version of vi has :retab. The feature is part of vim as hesse said. – grawity Jan 6 '12 at 8:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .