building on FreeBSD 10
Michael Sinatra
michael at burnttofu.net
Wed Feb 15 00:19:51 UTC 2012
On 2/13/12 7:05 AM, Waitman Gobble wrote:
> JINMEI Tatuya <jinmei at isc.org> wrote ..
>> I think figured it out. We (in ./configure) disable -Werror for
>> some versions of g++ due to a compiler bug. All g++ versions on
>> FreeBSD we are using for development and tests seemingly have this
>> bug, so the offending warning (it happens) doesn't stop the build.
>>
>> Since this doesn't happen with other (older/newer) versions of g++,
>> I suspect this is another bug of g++, and, my guess is that your
>> version of g++/FreeBSD internally fixes the first bug that would
>> disable -Werror but doesn't fix the second.
>>
>> So, my suggestion is to use a different version of g++. You may
>> also try to use clang++ (it works on one of our test machines
>> running FreeBSD 8.1).
>>
>> --- JINMEI, Tatuya Internet Systems Consortium, Inc.
>
> Hi,
>
> After some research it seems that the "best" solution is to use a
> newer version of gcc. However, according to the FreeBSD Handbook, the
> included version is gcc4.2 (since FreeBSD 8). The handbook states
> that this due to "licensing issues". It is possible for a user to
> update their gcc, and there are some newer versions in the ports
> tree, however in my opinion it's not such a practical solution - an
> upgrade is possibly going to cause some trouble with other ports.
> Frankly it's likely going to cause a system nightmare. The "ultimate
> cool" solution is to use the latest gcc with FreeBSD.
>
> So it's a pickle. Since so many servers and routers are running
> FreeBSD it is prudent to have bind10 installed and working perfectly.
> I think the short term solution is to avoid -Werror (it's bombing out
> on warnings in boost headers). From my tests so far bind10 is running
> on FreeBSD 10.
>
> But I am curious enough to see about building a complete FreeBSD
> 10.0-Current with gcc4.6, ie, what that "looks like" and research the
> "licensing issues" described in the handbook. Hopefully updates
> soon!
As others have already pointed out, it's GPLv3. Basically, you can't
include GPLv3 code in a source tree with BSD-licensed code without
creating an impossible licensing mess (my understanding is that you
basically need to make all of the source tree GPLv3, and part of the
point is that FreeBSD is *BSD* licensed). The result is that the
FreeBSD bundled system compiler cannot be later than gcc 4.2.
There are two suggestions: 1. Use llvm/clang[++] which is included in
the base system for FreeBSD 9/10. 2. Use gcc4.6 from ports. It's not a
nightmare; you can simply take the FreeBSD port that Jeremy did and add:
USE_GCC= 4.6+
to the Makefile.
I did this and bind10 built and installed just fine. The only bad news
is that you have to compile the whole gcc 4.6 package, which can be
nightmarish on a really slow system. Given that, I would definitely
move toward using clang++, since it is already bundled with FreeBSD 9/10.
michael
More information about the bind10-users
mailing list