Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
On Thu, Aug 29, 2013 at 9:42 AM, Eric Blake wrote: > On 08/29/2013 10:33 AM, Eric Blake wrote: > >> Since gnulib has a working random_r() function can we just make > >> gnulib replace the boneheaded freebsd impl ? > > > > Huh - the glibc man pages state that random_r returns RAND_MAX bits. > > ra

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 10:33 AM, Eric Blake wrote: >> Since gnulib has a working random_r() function can we just make >> gnulib replace the boneheaded freebsd impl ? > > Huh - the glibc man pages state that random_r returns RAND_MAX bits. > random_r is a glibc extension: POSIX only requires rand(), rand_r(

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 10:03 AM, Daniel P. Berrange wrote: >> I think I can fix libvirt to work around the boneheaded decision; >> basically, since we cannot trust the full range of random_r to be evenly >> distributed, I will have to tweak libvirt's call to truncate every call >> to random_r to a subset o

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 09:52 AM, Eric Blake wrote: >>> >>> #define RAND_MAX0x7ffd >> >> Huh? Why is this not 2**n-1? That violates assumptions we have made, >> and is WHY your compile failed. It has nothing to do with clang vs. gcc >> (both compilers would fail), it has to do with your chang

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 09:52:52AM -0600, Eric Blake wrote: > On 08/29/2013 09:43 AM, Eric Blake wrote: > > On 08/29/2013 09:35 AM, Jason Helfman wrote: > > > > >>> stdlib.h:#defineRAND_MAX0x7fff > > > > Good. > > > >>> > >>> -jgh > >>> > >> > >> And on our current head

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 09:43 AM, Eric Blake wrote: > On 08/29/2013 09:35 AM, Jason Helfman wrote: > >>> stdlib.h:#defineRAND_MAX0x7fff > > Good. > >>> >>> -jgh >>> >> >> And on our current head release (10) it is this: >> >> #define RAND_MAX0x7ffd > > Huh? Why is th

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 09:35 AM, Jason Helfman wrote: >>> >> stdlib.h:#defineRAND_MAX0x7fff Good. >> >> -jgh >> > > And on our current head release (10) it is this: > > #define RAND_MAX0x7ffd Huh? Why is this not 2**n-1? That violates assumptions we have made, and is

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
On Thu, Aug 29, 2013 at 8:33 AM, Jason Helfman wrote: > On Thu, Aug 29, 2013 at 8:08 AM, Eric Blake wrote: > >> On 08/29/2013 08:58 AM, Jason Helfman wrote: >> > Hello, >> > >> > There is an initiative at FreeBSD in removing gcc from base system and >> > using CLANG. That being said, we are tryi

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
On Thu, Aug 29, 2013 at 8:08 AM, Eric Blake wrote: > On 08/29/2013 08:58 AM, Jason Helfman wrote: > > Hello, > > > > There is an initiative at FreeBSD in removing gcc from base system and > > using CLANG. That being said, we are trying to resolve issues of ports > that > > can't build without gcc

Re: [libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Eric Blake
On 08/29/2013 08:58 AM, Jason Helfman wrote: > Hello, > > There is an initiative at FreeBSD in removing gcc from base system and > using CLANG. That being said, we are trying to resolve issues of ports that > can't build without gcc. Libvirt fell into this group, and are curious if > anyone has an

[libvirt] FreeBSD, no gcc present libvirt build issue

2013-08-29 Thread Jason Helfman
Hello, There is an initiative at FreeBSD in removing gcc from base system and using CLANG. That being said, we are trying to resolve issues of ports that can't build without gcc. Libvirt fell into this group, and are curious if anyone has any ideas on why this breakage would occur. Here is a link