showconsole-1.07 and -1.08 fail to compile on systems running uclibc, as it does not seem to provide pthread_yield(). armeb-softfloat-linux-uclibc-gcc -Os -march=armv5te -mtune=xscale -D_GNU_SOURCE -DLOG_BUFFER_SIZE=65536 -DTRANS_BUFFER_SIZE=4096 -DBOOT_LOGFILE=\"/var/log/boot.msg\" -D_PATH_BLOG_FIFO=\"/dev/blog\" -Wall -pipe -funroll-loops -c libconsole.c -pthread libconsole.c: In function `poll': libconsole.c:442: warning: implicit declaration of function `pthread_yield' armeb-softfloat-linux-uclibc-gcc -Os -march=armv5te -mtune=xscale -D_GNU_SOURCE -DLOG_BUFFER_SIZE=65536 -DTRANS_BUFFER_SIZE=4096 -DBOOT_LOGFILE=\"/var/log/boot.msg\" -D_PATH_BLOG_FIFO=\"/dev/blog\" -Wall -pipe -funroll-loops -o showconsole showconsole.c libconsole.o -pthread libconsole.o: In function `action': libconsole.c:(.text+0x498): undefined reference to `pthread_yield' collect2: ld returned 1 exit status make: *** [showconsole] Error 1 sched_yield() is the suggested alternative. Here is a patch that changes the only instance of pthread_yield() to sched_yield(): --- showconsole-1.08-orig/libconsole.c 2006-01-21 13:35:43 +1000 +++ showconsole-1.08/libconsole.c 2006-01-21 13:39:47 +1000 @@ -439,7 +439,7 @@ ret = 0; } } else - pthread_yield(); + sched_yield(); return ret; } This fixes the problem on my uclibc-0.9.27-r1 system (host type armeb-softfloat-linux-uclibc). Also tested against glibc-2.3.5-r2 (on i686-pc-linux-gnu).
I modified the showconsole-1.08.ebuild and it work's for me too. But I don't know if the above patch works only for uclibc or also for glibc and if we need to check what is used within the ebuild.
Created attachment 81294 [details] modified ebuild
Created attachment 81295 [details, diff] changes pthread_yield() to sched_yield()
The safe bet is. #include <features.h> #ifndef __UCLIBC__ #else #endif
pthread_yield should just be changed to sched_yield: http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/linuxthreads/linuxthreads/FAQ.html?rev=1.2.2.1&content-type=text/html&cvsroot=glibc#E
fixed in cvs, thanks for the report