m4-not-needed

Emmanuel Thomé Emmanuel.Thome at gmail.com
Fri Dec 10 10:58:10 CET 2010


Hi,

When gmp is configured with no assembly, as is done e.g. when gcc is
compiled with the gmp source present, the following environment variable
gets set from within ./configure:

    M4=m4-not-needed

Indeed, as there is no assembly code to manipulate with m4, m4 is not
needed.

However, the M4 variable seems to have an unfortunate effect on flex:

ethome at suno-7:/tmp/gcc-build/gmp$ M4=m4-not-needed flex conftest.l 
flex: fatal internal error, exec failed

(where conftest.l is the one from the gmp configure, for that matter).

Under *some* circumstances (I come across this deterministically while
running a gcc compile from a batch job, however I haven't been able to
reproduce it live), it leads to lex.yy.c not being created, eventually
causing the configure script to abort (possibly a sigpipe/wait/unlink
race).

I see that the mercurial code now leaves the variable M4 untouched in
case it already exists, which seems more reasonable than overriding it
with bogus content unconditionally. However I wonder why gmp touches the
M4 variable in the first place in this case. May I suggest leaving this
variable untouched instead ? Or is there a compelling reason for setting
m4-not-needed ?

Best,

E.


More information about the gmp-bugs mailing list