m4-1.4.14 build break with 2.6.31.

Rob Landley rob at landley.net
Thu May 27 22:55:41 UTC 2010


The m4 build dies with:

  In file included from execute.c:47:
  ./spawn.h:112: error: field '_sp' has incomplete type

Changing sched_param to __sched_param on line 89 of lib/sched.h in the m4 
package works around it, but you don't need to do that on glibc.

The problem is that glibc is always #defining:

  struct sched_param
    {
      int __sched_priority;
    };

But uClibc-0.9.31 /usr/include/bits/sched.h is defining:

  struct __sched_param
    {
      int __sched_priority;
    };

The reason is that when uClibc sucks in sys/types.h it gets 
bits/pthreadtypes.h which #includes bits/sched.h with a #define explicitly 
telling it _not_ to get struct sched_param.

Here's the uClibc #include chain bits/sched.h gets called via during the m4 
build:

In file included from /usr/bin/../include/bits/pthreadtypes.h:23,
                 from /usr/bin/../include/bits/types.h:203,
                 from /usr/bin/../include/sys/types.h:31,
                 from ./fcntl.h:39,
                 from execute.c:25:
/usr/bin/../include/bits/sched.h:21:2: warning: #warning one

On glibc the #include chain is:

In file included from /usr/include/sched.h:35,
                 from /usr/include/spawn.h:24,
                 from ./spawn.h:27,
                 from execute.c:47:
/usr/include/bits/sched.h:22:2: warning: #warning one

I tried adding an #undef __need_schedparam to pthread.h right after the 
#include bits/sched.h (which seems the right thing to do anyway), but then it 
doesn't get defined at all because uClibc doesn't seem to have a "spawn.h"...

Any opinions?  (Stick with the workaround of patching m4?)

Rob
-- 
Latency is more important than throughput. It's that simple. - Linus Torvalds


More information about the uClibc mailing list