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

Bug#280445: libpthread miscompiled (wrong pic options) on s390



Greetings!

Gerhard Tonn <GerhardTonn@gammatau.de> writes:

> GOTO Masanori wrote:
> > At Tue, 09 Nov 2004 15:04:50 +0000,
> > Camm Maguire wrote:
> >
> >>While the details previously mailed to me have alas now been lost, I
> >>believe there is an upstream libc fix for s390 which is not yet in the
> >>Debian package.  In short, libpthread must be compiled with a certain
> >>pic option (-fPIC or -fpic, not sure which) to prevent the following
> >>relocation problem when compiling lam, for example:
> >>
> >>cc -shared -Wl,-soname=liblam.so.4 -o debian/tmp/usr/lib/liblam.so.4.0 tmp/*/*.o -lpthread -lutil -ldl
> >>/usr/lib/libpthread_nonshared.a(pthread_atfork.os)(.text+0x24): In function `__pthread_atfork':
> >>/build/buildd/glibc-2.3.2.ds1/build-tree/glibc-2.3.2/linuxthreads/pthread_atfork.c:39: relocation truncated to fit: R_390_GOT12 __dso_handle
> >>collect2: ld returned 1 exit status
> >>
> >>Hopefully Gerhard can give more information if needed.
> >>
> >>Please let me know if this is a quick fix for Sarge, or whether I
> >>should attempt a workaround in lam.
> > Could you teach us more information about it and the fix?  Glibc is
> > not changed more than one year.  If this problem has not been existed
> > such a long time (over one year), I think it's related with the recent
> > various toolchain updates.  Note that it's similar problem with the
> > recent binutils problem on mips (that problem is decided to not fix in
> > the sarge).
> > Camm, Gerhard, did you know the following issues? (1) what the
> > problem
> > is (2) what the appropriate fix is (3) it's glibc specific problem.
> > If it's difficult issue, I think it's nice to apply workaround patch
> > to lam.
> >

Given Gerhard's simple fix proposed below -- would this be possible to
apply quickly (before sarge), or should a lam workaround be attempted?
This would appear to be a matter of a simple Makefile setting
somewhere.

Take care,

> 
> 
> The problem is that libpthread_nonshared.a is compiled with -fpic but
> should be compiled with -fPIC as libc_nonshared.a already is. This
> would solve the lam problem.
> 
> Regards,
> Gerhard
> 
> 
> 

-- 
Camm Maguire			     			camm@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



Reply to: