After upgrading glibc to 2.5 and doing this also with toolchain I'am unable to do 'emerge -e system'. This is error when updating arts. The same error appears on Python package when doing 'emerge -e system' In file included from threads_posix.cc:36: /usr/include/semaphore.h:1:36: error: linuxthreads/semaphore.h: No such file or directory In file included from /usr/include/glib-2.0/glib/gtypes.h:30, from /usr/include/glib-2.0/glib/galloca.h:30, from /usr/include/glib-2.0/glib.h:30, from ../flow/gsl/gsldefs.h:24, from ../flow/gsl/gslcommon.h:22, from threads_posix.cc:335: /usr/lib/glib-2.0/include/glibconfig.h:13:1: warning: "GLIB_HAVE_ALLOCA_H" redefined In file included from threads_posix.cc:24: ../config.h:19:1: warning: this is the location of the previous definition threads_posix.cc:249: error: 'sem_t' does not name a type threads_posix.cc: In constructor 'Arts::PosixThreads::Semaphore_impl::Semaphore_impl(int, int)': threads_posix.cc:253: error: 'semaphore' was not declared in this scope threads_posix.cc:253: error: 'sem_init' was not declared in this scope threads_posix.cc: In destructor 'virtual Arts::PosixThreads::Semaphore_impl::~Semaphore_impl()': threads_posix.cc:257: error: 'semaphore' was not declared in this scope threads_posix.cc:257: error: 'sem_destroy' was not declared in this scope threads_posix.cc: In member function 'virtual void Arts::PosixThreads::Semaphore_impl::wait()': threads_posix.cc:261: error: 'semaphore' was not declared in this scope threads_posix.cc:261: error: 'sem_wait' was not declared in this scope threads_posix.cc: In member function 'virtual int Arts::PosixThreads::Semaphore_impl::tryWait()': threads_posix.cc:265: error: 'semaphore' was not declared in this scope threads_posix.cc:265: error: 'sem_trywait' was not declared in this scope threads_posix.cc: In member function 'virtual void Arts::PosixThreads::Semaphore_impl::post()': threads_posix.cc:269: error: 'semaphore' was not declared in this scope threads_posix.cc:269: error: 'sem_post' was not declared in this scope threads_posix.cc: In member function 'virtual int Arts::PosixThreads::Semaphore_impl::getValue()': threads_posix.cc:274: error: 'semaphore' was not declared in this scope threads_posix.cc:274: error: 'sem_getvalue' was not declared in this scope
# equery b /usr/include/semaphore.h [ Searching for file(s) /usr/include/semaphore.h in *... ] sys-libs/glibc-2.5 (/usr/include/semaphore.h) There's no linuxthreads/semaphore.h installed with sys-libs/glibc-2.3.6-r4 (nptlonly) either, so that's no glibc fault apparently. Port emerge --info and arts version you are trying to compile.
OK, with the help of kangur on IRC I've sorted out what you mean: $ grep linuxthreads /usr/include/semaphore.h /usr/include/semaphore.h: #include <linuxthreads/semaphore.h>
Thanks jakub. It broke for me during emerge -e world on nearly bare stage3, 2006.1, ~x86 on python: i686-pc-linux-gnu-gcc -pthread -c -fno-strict-aliasing -DNDEBUG -march=athlon-xp -O2 -funit-at-a-time -pipe -I. -I./Include -fPIC -DPy_BUILD_CORE -o Python/thread.o Python/thread.c In file included from Python/thread_pthread.h:24, from Python/thread.c:115: /usr/include/semaphore.h:1:36: error: linuxthreads/semaphore.h: No such file or directory In file included from Python/thread.c:115: Python/thread_pthread.h: In function 'PyThread_allocate_lock': Python/thread_pthread.h:250: error: 'sem_t' undeclared (first use in this function) Python/thread_pthread.h:250: error: (Each undeclared identifier is reported only once Python/thread_pthread.h:250: error: for each function it appears in.) Python/thread_pthread.h:250: error: 'lock' undeclared (first use in this function) Python/thread_pthread.h:257: error: expected expression before ')' token Python/thread_pthread.h: In function 'PyThread_free_lock': Python/thread_pthread.h:276: error: 'sem_t' undeclared (first use in this function) Python/thread_pthread.h:276: error: 'thelock' undeclared (first use in this function) Python/thread_pthread.h:276: error: expected expression before ')' token Python/thread_pthread.h: In function 'PyThread_acquire_lock': Python/thread_pthread.h:306: error: 'sem_t' undeclared (first use in this function) Python/thread_pthread.h:306: error: 'thelock' undeclared (first use in this function) Python/thread_pthread.h:306: error: expected expression before ')' token Python/thread_pthread.h: In function 'PyThread_release_lock': Python/thread_pthread.h:333: error: 'sem_t' undeclared (first use in this function) Python/thread_pthread.h:333: error: 'thelock' undeclared (first use in this function) Python/thread_pthread.h:333: error: expected expression before ')' token make: *** [Python/thread.o] Error 1 !!! ERROR: dev-lang/python-2.4.3-r4 failed. Call stack: ebuild.sh, line 1568: Called dyn_compile ebuild.sh, line 937: Called src_compile python-2.4.3-r4.ebuild, line 184: Called die !!! Parallel make failed !!! If you need support, post the topmost build error, and the call stack if relevant. # cat /usr/include/semaphore.h #include <linuxthreads/semaphore.h> # cat /usr/include/linuxthreads/semaphore.h cat: /usr/include/linuxthreads/semaphore.h: No such file or directory Please fix it fast because currently I can not rebuild my system... :) Thanks!
Sorry for messy entry. I should describe it more thoroughly. Sorry again.
fixed in cvs ... in the meantime, you dont have to waste time re-emerging glibc just unpack glibc-linuxthreads-2.5.tar.bz2 and copy linuxthreads/semaphore.h to /usr/include/
*** Bug 152078 has been marked as a duplicate of this bug. ***
*** Bug 152086 has been marked as a duplicate of this bug. ***