| Summary: | net-im/ekg-1.6_rc1 doesn't compile with nptl | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | ketjow <ketjow> |
| Component: | Current packages | Assignee: | Michal Januszewski (RETIRED) <spock> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
an updated version of the ebuild for 1.6_rc1
patch that fixes the pthread-configure-error |
||
|
Description
ketjow
2005-04-11 06:36:36 UTC
Created attachment 56158 [details]
an updated version of the ebuild for 1.6_rc1
Please try replacing the ebuild from Portage with the attached one and let me
know whether it fixes the problem for you.
Created attachment 56246 [details, diff]
patch that fixes the pthread-configure-error
patch that fixes the pthread-configure-error. it adds -fPIC to the compile
flags in a configure-test.
ok, it worked, but ekg without pthread sux
I found out why configure crashes. The problem occurs, because any program, that requires pthreads fails to compile with the -shared flag when compiling without -fPIC..
example:
#include <pthread.h>
int
main ()
{
pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0);
return 0;
}
when trying to compile:
bash-2.05b$ gcc -shared main.c -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/cc5PWaFt.o: relocation R_X86_64_PC32 against `pthread_join@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
bash-2.05b$ gcc -lpthread -shared main.c
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccYI0m7t.o: relocation R_X86_64_PC32 against `pthread_join@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
configure contains such a test that tries to compile -shared without -fPIC. I created a patch that fixes the bug. I hope everything is ok with it...
I've added the patch to the ebuild in CVS. Thanks :) |