Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: python dumps core


perl configure dies as well:
Checking your choice of C compiler and flags for coherency...
I've tried to compile and run the following simple program:

#include <stdio.h>
int main() { printf("Ok\n"); return(0); }

I used the command:

        cc -o try -O2 -pthread -I/usr/include -fno-strict-aliasing
        -pipe -Wdeclaration-after-statement try.c -lm -lcrypt -lpthread

and I got the following output:

[1]   Segmentation fault (core dumped) ./try
The program compiled OK, but exited with status 139.
You have a problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.
*** Error code 1

Since I was seeing this error, too, I did some investigation:

So far I found that the difference between an older version and the current
one is that libc isn't linked against /usr/lib/crt* stuff any more.  That
results in not getting any .init (or .fini) section.  Since pthread
initialization is done in libc (src/lib/libc/misc/initfini.c calls
__libc_thr_init, which is a weak alias in libc, but a strong alias in
libpthread), any program using libpthread breaks.

Linking against /usr/lib/crt* again does avoid the bug.
However, do we really want to link libc against that stuff?

--                         Wolfgang Solfrank

Home | Main Index | Thread Index | Old Index