<div dir="ltr">On Mon, Sep 30, 2013 at 11:50 AM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">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 tree:<br>
><br>
> crypto/openssh/pkcs11.h:                       unsigned char *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>
</div>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>
<div class="im"><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>
</div>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>
<div class=""><div class="h5"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</div></div></blockquote></div><br></div><div class="gmail_extra">It all uses the same branch of code, so it won't matter what version while you are still in 8.x, unless you are running 8.x STABLE, and not a RELEASE based branch.<br>
<br></div><div class="gmail_extra">In working with a fellow developer, this came down to gcc bugs that were 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">http://people.freebsd.org/~jgh/files/libvirt-84fix.diff</a><br><br></div><div class="gmail_extra">Here are all the buildlogs, as well:<br></div><div class="gmail_extra">
<a href="http://redports.org/buildarchive/20130930180500-15801/">http://redports.org/buildarchive/20130930180500-15801/</a><br><br></div><div class="gmail_extra">-jgh<br><br></div><div class="gmail_extra">-- <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>