trying to build glibc without threads -- the detailed errors

Robert P. J. Day
Fri Oct 28 13:02:00 GMT 2005

  (sorry if this resembles an earlier post -- i'm trying to make this
one as detailed as possible.)

using my own, minimal mini-crosstool script to try to build a
toolchain with these parts:


*without* selecting any type of thread support.  so it's not
surprising that, in the output, i get asked a couple of times:

*** WARNING: Are you sure you do not want to use the `nptl'
*** add-on?

yes, yes, i'm sure.  get on with it.  until, trying to build glibc:


In file included from ../sysdeps/unix/sysv/linux/fatal-prepare.h:19,
                 from assert.c:43:
../include/pthread.h:1:26: error: pthread.h: No such file or directory
assert.c: In function '__assert_fail':
assert.c:54: error: 'pthread_setcancelstate' undeclared (first use in
this function)
assert.c:54: error: (Each undeclared identifier is reported only once
assert.c:54: error: for each function it appears in.)
assert.c:54: warning: implicit declaration of function
assert.c:54: error: 'PTHREAD_CANCEL_DISABLE' undeclared (first use in
this function)
make[2]: ***
Error 1
make[2]: Leaving directory
*** [assert/subdir_lib] Error 2
make[1]: Leaving directory


  obviously, errors related to not having selected some thread
support, no?  in particular, look at the error message about the
missing pthread.h.

  in the first place, if i don't want thread support, why is the build
even trying to include a thread-related header file?

  also, if you examine the source tree for glibc, there
are two "pthread.h" files:


that first one, which is the one being included successfully,

	#include_next <pthread.h>

you'd think that the preprocessor would then find the one under "nptl"
but the list of include libraries doesn't include that directory, so
the #include_next fails (not surprisingly).

  in short, it appears that, even if i try not to include thread
support, the build is definitely going to try to pull in some
thread-related files and the build will fail.



Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list