<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 9, 2019 at 9:43 AM Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 2019-05-09 at 08:08 -0400, Paul Barker wrote:<br>
&gt; On Thu, 9 May 2019, at 11:13, Paul Barker wrote:<br>
&gt; &gt; On Wed, 8 May 2019, at 14:02, Adrian Bunk wrote:<br>
&gt; &gt; &gt; On Wed, May 08, 2019 at 11:58:36AM +0000, <a href="mailto:paul@betafive.co.uk" target="_blank">paul@betafive.co.uk</a><br>
&gt; &gt; &gt; wrote:<br>
&gt; &gt; &gt; &gt; ...<br>
&gt; &gt; &gt; &gt; +--- strace-4.26.orig/strace.c<br>
&gt; &gt; &gt; &gt; ++++ strace-4.26/strace.c<br>
&gt; &gt; &gt; &gt; +@@ -26,7 +26,7 @@<br>
&gt; &gt; &gt; &gt; + #include &lt;locale.h&gt;<br>
&gt; &gt; &gt; &gt; + #include &lt;sys/utsname.h&gt;<br>
&gt; &gt; &gt; &gt; + #ifdef HAVE_PRCTL<br>
&gt; &gt; &gt; &gt; +-# include &lt;sys/prctl.h&gt;<br>
&gt; &gt; &gt; &gt; ++# include &lt;linux/prctl.h&gt;<br>
&gt; &gt; &gt; &gt; + #endif<br>
&gt; &gt; &gt; &gt; + #include &lt;asm/unistd.h&gt;<br>
&gt; &gt; &gt; &gt; diff --git a/meta/recipes-devtools/strace/<a href="http://strace_4.26.bb" rel="noreferrer" target="_blank">strace_4.26.bb</a><br>
&gt; &gt; &gt; &gt; b/meta/recipes-devtools/strace/<a href="http://strace_4.26.bb" rel="noreferrer" target="_blank">strace_4.26.bb</a><br>
&gt; &gt; &gt; &gt; index 24f92c99e5..b71122babf 100644<br>
&gt; &gt; &gt; &gt; --- a/meta/recipes-devtools/strace/<a href="http://strace_4.26.bb" rel="noreferrer" target="_blank">strace_4.26.bb</a><br>
&gt; &gt; &gt; &gt; +++ b/meta/recipes-devtools/strace/<a href="http://strace_4.26.bb" rel="noreferrer" target="_blank">strace_4.26.bb</a><br>
&gt; &gt; &gt; &gt; @@ -15,6 +15,7 @@ SRC_URI = &quot;<br>
&gt; &gt; &gt; &gt; <a href="https://strace.io/files/$%7BPV%7D/strace-$%7BPV%7D.tar.xz" rel="noreferrer" target="_blank">https://strace.io/files/${PV}/strace-${PV}.tar.xz</a> \<br>
&gt; &gt; &gt; &gt;             file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \<br>
&gt; &gt; &gt; &gt;             file://0001-tests-sigaction-Check-for-mips-and-<br>
&gt; &gt; &gt; &gt; alpha-before-usin.patch \<br>
&gt; &gt; &gt; &gt;             file://0001-mips-o32-fix-build.patch \<br>
&gt; &gt; &gt; &gt; +           file://musl-fixes-armv8.patch \<br>
&gt; &gt; &gt; &gt;             &quot;<br>
&gt; &gt; &gt; &gt; ...<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; #include &lt;sys/prctl.h&gt; is the documented way for getting the<br>
&gt; &gt; &gt; prototype <br>
&gt; &gt; &gt; of prctl(), which cannot be in linux/prctl.h for obvious reasons.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; This patch creates the following problem:<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; ../strace-4.26/strace.c: In function &#39;startup_child&#39;:<br>
&gt; &gt; &gt; ../strace-4.26/strace.c:1355:3: warning: implicit declaration of <br>
&gt; &gt; &gt; function &#39;prctl&#39; [-Wimplicit-function-declaration]<br>
&gt; &gt; &gt;    prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY);<br>
&gt; &gt; &gt;    ^~~~~<br>
&gt; &gt; &gt; <br>
&gt; &gt; <br>
&gt; &gt; Ah that&#39;s definitely not a solution then. I&#39;ll have to look into<br>
&gt; &gt; this <br>
&gt; &gt; further and see if I can come up with a v2 patch that doesn&#39;t<br>
&gt; &gt; cause <br>
&gt; &gt; this warning.<br>
&gt; &gt; <br>
&gt; <br>
&gt; So alpine fixes this by patching the linux headers: <br>
&gt; <a href="https://git.alpinelinux.org/aports/tree/main/linux-headers/fix-aarch64-asm-ptrace.patch" rel="noreferrer" target="_blank">https://git.alpinelinux.org/aports/tree/main/linux-headers/fix-aarch64-asm-ptrace.patch</a><br>
&gt; <br>
&gt; I think that should be acceptable here if we just do it when building<br>
&gt; with musl libc.<br>
&gt; <br>
&gt; Any thoughts on that before I work up a v2 patch?<br>
<br>
This really needs to get fixed upstream. I don&#39;t mind a patch but only<br>
if its gone upstream, we don&#39;t want to be carrying patches to libc-<br>
headers.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">I can live with that as well, we have carried them just for musl in the past, but yes, we should at least know that someone is trying to upstream it. I can&#39;t get the alpine linux git to come in right now, so I can&#39;t check the referenced change to see how it looks.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m going to do new libc-headers when I get the -dev kernel up and running with the 5.2-rc kernels, so I can watch to see that it continues to apply. I can also do some extra build testing here, if you want the headers change to come through my next pull request.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Bruce</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-3733819215945982634gmail_signature">- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end<br>- &quot;Use the force Harry&quot; - Gandalf, Star Trek II<br><br></div></div>