[blfs-dev] glibc errors in blfs packages on i686

Bruce Dubbs bruce.dubbs at gmail.com
Wed Aug 28 20:03:23 PDT 2013


Ken Moffat wrote:
> On Wed, Aug 28, 2013 at 07:17:07PM -0500, Bruce Dubbs wrote:
>> Fernando and I have been having a discussion about some errors that have
>> come up on the i686.  The initial indications were a seg fault when
>> running javac.  Even doing a simple 'javac -version' was demonstrating
>> the problem.
>>
>> Upon doing some research, we found that a change upstream in glibc was
>> causing it.  It really is not 100% clear if it is fundamentally a glibc
>> or a gcc problem, but a relatively simple fix appears to correct the
>> problem.
>>
>> The problem was involved with the __strstr_sse42 function in glibc and
>> reports showed crashes with the plasma desktop, kdm, glxgears, among others.
>
>   On my i686 build with the ati video driver, glxgears is fine.
>>
>> http://sourceware.org/ml/libc-alpha/2013-08/msg00257.html
>>
>
>   Reading the responses, intel was among the systems which had
> failures - my intel box is 64-bit only.  Reading a bit further,
> misalignment between older and current gcc versions gets a mention:
> https://sourceware.org/ml/libc-alpha/2013-08/msg00291.html
>
>> In the glibc build procedures, a simple sed to the glibc code seems to
>> fix the problem:
>>
>> sed -i -e 's/static __m128i/inline &/' sysdeps/x86_64/multiarch/strstr.c
>>
>> I am proposing that we add this to both Chapter 5 and Chapter 6 of LFS.
>>    I'm not sure if we need to do an -rc2 or not.

>   Does that also alter x86_64 builds, or are you going to wrap it ?
>
>   I note that it isn't claimed to _fix_ the problem, just work around
> it for current versions.

Changing one function to inline shouldn't affect x86_64, but then again, 
it shouldn't have caused the problem in the first place.  One suggestion 
was that there was some kind of frame or stack misalignment that glibc 
needed to fix.  This change is really down in the weeds.

The problem could also be in the way gcc generates code.  Building with 
-O3 is also reported to fix the problem.  It will really be necessary 
for upstream to get this sorted out properly.  I have not seen the 
problem on x86_64 and I've done a great many of the packages.  The 
question is how do we handle the situation.

   -- Bruce



More information about the blfs-dev mailing list