Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

At the top of this message, the compiler is in the directory sys/modules/xl and is trying to build a working kernel module out of the source code there. You see the command it's trying to run; it's on the next few lines, starting with cc −0. What appears as several lines on paper is actually one very, very long line to the computer; this particular line goes down to just above the v symbol.

On the next line (v), we see the error code (syntax error before ‘<’), as well as the line number and the filename. This error stops the compile, and we see a cascading series of errors. The kernel module cannot be built, so the whole range of kernel modules cannot be built, so the kernel cannot be built, so everything basically comes to a screaming, crashing halt.

Fortunately, FreeBSD will insist upon compiling a complete kernel before installing anything. You haven't damaged your system by doing this; your failed compile is still sitting in the directory created by running config.

You know the step in the kernel build where the process stopped (the bit beginning with cc), and you know what error resulted from that step (syntax error before ‘<’). The cascading errors that follow are really irrelevant; a failure in one step makes the whole process blow apart.

Don't be embarrassed if you don't understand these errors; most people don't. Just go through the "Getting More Help" process in Chapter 2. Your first best bet is the FreeBSD−questions mailing list archive. Take the last lines of your compile output (if_xl.c:155: syntax error before‘<’), paste it into the search engine, and see who else has had the problem. If you don't find any hits on that, try the next line of the failure (cpp: output pipe has been closed).

I f n o t h i n g s h o w s u p i n t h e m a i l i n g l i s t a r c h i v e , s e n d a m e s s a g e t o t h e FreeBSD−questions@FreeBSD.org mailing list. Include the following information:

The end of the output of the failed compile

Your FreeBSD version number

The contents of /var/run/dmesg/boot

The output of uname −a

The kernel config file

Chances are, your problem is fairly simple to fix, and if you include all of this, someone will write you back with suggestions. These sorts of errors are generally the result of an incorrect kernel configuration.

[6]Personally, I prefer to breathe, eat, and live air, food, and my life, in that order, but some people seem to get by living on computers.

Booting an Alternate Kernel

So, what do you do if your new kernel doesn't work? Perhaps you forgot a device driver, or cut the ppp pseudo−device and cannot dial out to the Net. Don't panic, you're not lost. You did keep your old kernel, right? Okay, here's what to do.

91