<p>On 14 Aug 2011 13:45, &quot;Gordan Bobic&quot; &lt;<a href="mailto:gordan@bobich.net">gordan@bobich.net</a>&gt; wrote:<br>
&gt;<br>
&gt; On 08/14/2011 07:55 AM, Niels de Vos wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 14 Aug 2011 00:30, &quot;Gordan Bobic&quot; &lt;<a href="mailto:gordan@bobich.net">gordan@bobich.net</a><br>
&gt;&gt; &lt;mailto:<a href="mailto:gordan@bobich.net">gordan@bobich.net</a>&gt;&gt; wrote:<br>
&gt;&gt;  &gt;<br>
&gt;&gt;  &gt; On 08/13/2011 10:23 PM, Niels de Vos wrote:<br>
&gt;&gt;  &gt;&gt;<br>
&gt;&gt;  &gt;&gt; On Sat, Aug 06, 2011 at 10:24:03AM +0100, Andrew Haley wrote:<br>
&gt;&gt;  &gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt; On 08/05/2011 09:07 PM, Gordan Bobic wrote:<br>
&gt;&gt;  &gt;&gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt; Thanks for pointing out, it does look like the same bug. So what&#39;s the<br>
&gt;&gt;  &gt;&gt;&gt;&gt; fix/workaround?<br>
&gt;&gt;  &gt;&gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt; On 08/05/2011 08:59 PM, Niels de Vos wrote:<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; On 5 Aug 2011 19:15, &quot;Gordan Bobic&quot;&lt;<a href="mailto:gordan@bobich.net">gordan@bobich.net</a><br>
&gt;&gt; &lt;mailto:<a href="mailto:gordan@bobich.net">gordan@bobich.net</a>&gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &lt;mailto:<a href="mailto:gordan@bobich.net">gordan@bobich.net</a> &lt;mailto:<a href="mailto:gordan@bobich.net">gordan@bobich.net</a>&gt;&gt;&gt;  wrote:<br>
&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;  How does one pick the correct &quot;ports&quot; part of glibc for the<br>
&gt;&gt; correct core?<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;  I tried to build the RHEL6 glibc with the F13 ports tar ball,<br>
&gt;&gt; but the<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;  build eventually fails:<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.4.5/libgcc_eh.a(unwind-arm.o):<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;  In function `__gnu_Unwind_Backtrace&#39;:<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;  (.text+0x8b8): undefined reference to `__stack_chk_guard&#39;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; &gt;  collect2: ld returned 1 exit status<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; Looks very much like the error in<br>
&gt;&gt;  &gt;&gt;&gt;&gt;&gt; <a href="https://bugzilla.redhat.com/show_bug.cgi?id=726495">https://bugzilla.redhat.com/show_bug.cgi?id=726495</a><br>
&gt;&gt;  &gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt;<br>
&gt;&gt;  &gt;&gt;&gt; What is it linking against?  __stack_chk_guard should be defined in<br>
&gt;&gt;  &gt;&gt;&gt; libc.a.<br>
&gt;&gt;  &gt;&gt;<br>
&gt;&gt;  &gt;&gt;<br>
&gt;&gt;  &gt;&gt; Adding -W,l:$PATH_TO_JUST_COMPILED/libc.a seems to work. The linker than<br>
&gt;&gt;  &gt;&gt; finds __stach_chk_guard for the .so&#39;s that require -static-libgcc. This<br>
&gt;&gt;  &gt;&gt; hack is now attached to Bug 726495. A scratch build is also running, in<br>
&gt;&gt;  &gt;&gt; a local mock it was successful:<br>
&gt;&gt;  &gt;&gt; - <a href="http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=151594">http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=151594</a><br>
&gt;&gt;  &gt;&gt;<br>
&gt;&gt;  &gt;&gt; I&#39;m really not sure how the linker is supposed to find libc.a (which was<br>
&gt;&gt;  &gt;&gt; compiled a little earlier during the building of the glibc package). It<br>
&gt;&gt;  &gt;&gt; works for other architectures, so there must be some trick somewhere...<br>
&gt;&gt;  &gt;&gt;<br>
&gt;&gt;  &gt;&gt; (Note, this is all for F-14&#39;s glibc-2.13 on armv5tel.)<br>
&gt;&gt;  &gt;<br>
&gt;&gt;  &gt;<br>
&gt;&gt;  &gt;<br>
&gt;&gt;  &gt; Interesting, I&#39;ll look into that. I&#39;m currently looking at this bug<br>
&gt;&gt; in relation to the glibc build issues:<br>
&gt;&gt;  &gt; <a href="https://bugzilla.redhat.com/show_bug.cgi?id=708452">https://bugzilla.redhat.com/show_bug.cgi?id=708452</a><br>
&gt;&gt;<br>
&gt;&gt; The result of bug 708452 was the inclusion of a patch for<br>
&gt;&gt; tzdata-update.c in upstream. That bz did not fix the __stack_chk_guard<br>
&gt;&gt; compile issue. I would advise you to with the argument from Jakub and do<br>
&gt;&gt; not break unwinding.<br>
&gt;<br>
&gt;<br>
&gt; What about the other ARM specific spec changes from the F13 version? Things like:<br>
&gt;<br>
&gt; %ifarch %{arm}<br>
&gt; BuildFlags=&quot;$BuildFlags -fno-asynchronous-unwind-tables -fno-stack-protector&quot;<br>
&gt; %else<br>
&gt; BuildFlags=&quot;$BuildFlags -fasynchronous-unwind-tables&quot;<br>
&gt; %endif</p>
<p>My assumption is that adding libc.a for -static-libgcc fixes the build issues. __stack_chk_guard is (part of) the stack protector which is used for the unwinding of backtraces/exceptions.</p>
<p>Hth,<br>
Niels<br>
</p>