<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 30, 2013 at 7:04 PM, Doug Goldstein <span dir="ltr"><<a href="mailto:cardoe@gentoo.org" target="_blank">cardoe@gentoo.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>On Mon, Sep 30, 2013 at 2:27 PM, Jason Helfman <<a href="mailto:jgh@freebsd.org" target="_blank">jgh@freebsd.org</a>> wrote:<br>



> On Mon, Sep 30, 2013 at 11:50 AM, Eric Blake <<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>> wrote:<br>
>><br>
>> On 09/30/2013 10:09 AM, Jason Helfman wrote:<br>
>><br>
>> >> So, what has to be included prior to <stdlib.h> for the forward<br>
>> >> declaration of struct random_data in that header to no longer be an<br>
>> >> incomplete type?  Can you grep your system headers and find what all<br>
>> >> mentions struct random_data?<br>
>> >><br>
>> >><br>
>> > In looking through our 8.4 Branch, here are the results of digging the<br>
>> > tree:<br>
>> ><br>
>> > crypto/openssh/pkcs11.h:                       unsigned char<br>
>> > *random_data,<br>
>> > crypto/heimdal/lib/hx509/ref/pkcs11.h:                 unsigned char<br>
>> > *random_data,<br>
>> > crypto/heimdal/lib/hx509/hxtool.c:random_data(void *opt, int argc, char<br>
>> > **argv)<br>
>> > sys/netinet/sctp_output.c:<br>
>> > SCTP_READ_RANDOM(randp->random_data, random_len);<br>
>><br>
>> Not relevant.<br>
>><br>
>> > sys/netinet/sctp_header.h:      uint8_t random_data[];<br>
>><br>
>> Maybe relevant.  Can this header be picked up by some include sequence<br>
>> of standard-only headers, such that using <stdlib.h> in isolation<br>
>> doesn't have a problem, but <stdlib.h> in combination with this header<br>
>> causes the problem?<br>
>><br>
>> ><br>
>> > Per another developer at FreeBSD, it seems to be a bug in 8.x branch and<br>
>> > picking up something it shouldn't and was "fixed" by adding this to the<br>
>> > configure environment:<br>
>> > ac_cv_type_struct_random_data=""<br>
>><br>
>> Generally, Autoconf wants you to use 'ac_cv_type_struct_random_data=no',<br>
>> not blank.  I don't know if using 'no' instead of a blank would resolve<br>
>> the compiler core dump you hit.  Is there a mail archive where you were<br>
>> discussing this with the FreeBSD developers?<br>
>><br>
>> ><br>
>> > <a href="http://redports.org/~jgh/20130930154500-61365-148605/libvirt-1.1.2.log" target="_blank">http://redports.org/~jgh/20130930154500-61365-148605/libvirt-1.1.2.log</a><br>
>><br>
>> Also, this build was on FreeBSD 8.4, although you reported the problem<br>
>> against FreeBSD 8.3.  Let's get it resolved on one platform before<br>
>> bouncing around to another (at the moment, I only have a FreeBSD 8.2<br>
>> environment for my own testing, so I'm not much help at the moment).<br>
>><br>
>> --<br>
>> Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266" target="_blank">+1-919-301-3266</a><br>
>> Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
>><br>
><br>
> It all uses the same branch of code, so it won't matter what version while<br>
> you are still in 8.x, unless you are running 8.x STABLE, and not a RELEASE<br>
> based branch.<br>
><br>
> In working with a fellow developer, this came down to gcc bugs that were<br>
> addressed in later versions<br>
> of FreeBSD, but was not merged from CURRENT branch to 8.x.<br>
><br>
> Here is a link to the fix that I will be committing at some point today.<br>
><br>
> <a href="http://people.freebsd.org/~jgh/files/libvirt-84fix.diff" target="_blank">http://people.freebsd.org/~jgh/files/libvirt-84fix.diff</a><br>
><br>
> Here are all the buildlogs, as well:<br>
> <a href="http://redports.org/buildarchive/20130930180500-15801/" target="_blank">http://redports.org/buildarchive/20130930180500-15801/</a><br>
><br>
> -jgh<br>
><br></div></div><div>
<br>
</div>What's the error you're getting with -Wmissing-include-dirs? We should<br>
be testing to see if gcc supports that and not using it if its not<br>
supported. Additionally, what version of gcc are you using in 8.x? We<br>
can probably whip up a quick patch to resolve this.<br>
<br></blockquote><div><br></div><div>These were bugs associated with the version of gcc in the 8.x branch, that were supposedly fixed in later RELEASE versions (ie. 9.x, 10.x).</div><div>However, these fixes were not merged back into the 8.x branch, is my understanding.</div>


<div><br></div><div>Here is a link to the log that has the error when using missing-include-dirs:</div><div><a href="https://redports.org/~jgh/20130930162300-20190-148614/libvirt-1.1.2.log" target="_blank">https://redports.org/~jgh/20130930162300-20190-148614/libvirt-1.1.2.log</a><br>


</div><div><br></div><div>My understanding is that we've been ripping this out of a number of gnome related ports due to the same failure. However,</div><div>a patched gcc has resolved this for the x-STABLE branches, other than 8 :)</div>

<div><br></div><div>In looking through our svn respository:</div><div><a href="http://svnweb.freebsd.org/base/release/8.4.0/gnu/usr.bin/cc/cc/Makefile?view=log" target="_blank">http://svnweb.freebsd.org/base/release/8.4.0/gnu/usr.bin/cc/cc/Makefile?view=log</a><br>

</div><div><br></div><div>Seems we are at version <span style="white-space:pre-wrap">GCC 4.2 as r169718</span></div><div><font color="#000000"><span style="white-space:pre-wrap"><a href="http://svnweb.freebsd.org/base?view=revision&revision=169718" target="_blank">http://svnweb.freebsd.org/base?view=revision&revision=169718</a></span></font></div>


<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
As far as the struct random_data, I'll let Eric work on that since<br>
he's got a better understand and more context.</blockquote><div><br></div><div> Great, thanks!<br><br></div><div>-jgh</div></div><div><br></div>-- <br><div dir="ltr">Jason Helfman          | FreeBSD Committer<br>jgh@FreeBSD.org     | <a href="http://people.freebsd.org/%7Ejgh" target="_blank">http://people.freebsd.org/~jgh</a>  | The Power to Serve<br>


</div>
</div></div>