Compiling Grep Chapter 6

Gerard Beekmans gerard at
Tue Mar 19 20:43:17 PST 2002

On Mon, Mar 18, 2002 at 02:56:11PM -0600, David wrote:
> While compiling grep-2.5 it fails with these last few lines.
> dfa.c:2929: `MB_CUR_MAX' undeclared (first use in this function)
> dfa.c: In function `dfafree':
> dfa.c:2995: `MB_CUR_MAX' undeclared (first use in this function)
> make[2]: *** [dfa.o] Error 1
> make[2]: Leaving directory `/usr/src/grep-2.5/src'
> make[1]: *** [all recursive] Error 1
> make[1]: Leaving directory `/usr/src/grep-2.5'
> make: *** [all] Error 2

Two questions.

1) what chapter are you in? From your gcc-3.0.4 note I assume chapter 6.
2) does /usr/include/stdlib.h exist? This file defines MB_CUR_MAX unless
something went wrong during your Glibc installation. Run "grep MB_CUR_MAX
/usr/include/stdlib.h" and see if it returns this:

gerard at gwaihir:~$ grep MB_CUR_MAX /usr/include/stdlib.h 
#define MB_CUR_MAX      (__ctype_get_mb_cur_max ())

> Any ideas what went wrong and how to fix it?
> I'm using gcc-3.0.4 if it makes any difference.

I'm using gcc-3.0.4 too (just finished installing my entire workstation, no
single problem encountered so far), no problems there.

How did you install gcc-3.0.4 in chapter 5 though?

Gerard Beekmans

-*- If Linux doesn't have the solution, you have the wrong problem -*-
Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list