Jorge Almeida wrote:

On Mon, 12 Sep 2005, Richard Fish wrote:

Jorge Almeida wrote:

 I think this happens because my system is broken, God knows where and
 why.



Can you post the contents of /var/tmp/portage/glib-2.6.5/work/glib-2.6.5/config.log?

I'm sending it to you off list (4302 lines!)


Well, something is very wrong with your system, but of course, you knew that already! The configure blew up at this point:

configure:32976: checking for thread implementation
configure:32985: result: posix
configure:33079: i686-pc-linux-gnu-gcc -o conftest -O2 -march=pentium4 
-fomit-frame-pointer  -Wall -pthread   conftest.c   >&5
conftest.c: In function `main':
conftest.c:121: warning: implicit declaration of function `exit'
configure:33082: $? = 0
configure:33084: ./conftest
./configure: line 33085: 24663 Segmentation fault      ./conftest$ac_exeext
configure:33087: $? = 139
configure: program exited with status 139


Basically, gcc had a memory fault compiling a very simple program that configure was using to determine the features of the threading library. Normally the only time gcc segfaults is if you have bad hardware...faulty memory is the most common cause.

The (somewhat simplified) program that configure tried to build was:

#include <pthread.h>
int check_me = 0;
void* func(void* data) {check_me = 42; return &check_me;}
int main() {
 pthread_t t;
 void *ret;
 pthread_create (&t, 0, func, 0);
 pthread_join (t, &ret);
 exit (check_me != 42 || ret != &check_me);
}

If you save the above lines to a file (like testthread.c), you can try building it with:

 i=0
 while test $i -lt 1000; do
   printf "\r$i"
gcc -O2 -march=pentium4 -o testthread -pthread testthread.c >>results.txt 2>&1
   test $? -ne 0 && break
   i=$(( $i + 1 ))
 done

The above shell script will build the program 1000 times. My guess is that it won't compile more than a few times.

If so, I suspect hardware problems:

1. Dirty/bad CPU fan.  Try blowing out your system.

2. Bad memory. In addition to memtest86, there was another (and better) memory test script discussed on this list some weeks ago. Search the archives, or maybe someone else can provide a link.

3. Bad power supply.


Also, assuming that you have ACPI thermal zone support in your kernel, you might want to monitor the processor temperature with:

 while sleep 1 ; do cat /proc/acpi/thermal_zone/THRM/temperature; done

HTH,

-Richard

--
gentoo-user@gentoo.org mailing list

Reply via email to