Building ports with gcc46

b. f. bf1783 at googlemail.com
Thu Dec 15 00:05:04 UTC 2011


> > Is there a way to build devel/protobuf with gcc46? Unfortunately I see
> > a compatibility issue where the software I'm linking against it
> > crashes because of the conflicting stdc++ librray versions. I've tried
> > setting CC, CXX, LDFLAGS but I seem to be missing something else?
> >
> > Thanks,
>
> Hi Ali,
>
> Have you tried adding the following to /etc/make.conf?
>
> USE_GCC=4.6
>
> Note that the directive will bring in a lot of other dependencies with
> it, so you may also want to add WITHOUT_X11=yes to make.conf, if necessary.

USE_GCC is the right statement, but one should be careful about adding such
statements to make.conf without conditions, because you can pollute every
invocation of make(1).  Here, you can cause cycles in your dependency graphs
if you set USE_GCC=4.6 for any of the ports that are required by lang/gcc46.
If you are interested in applying them to a single port, use a test on .CURDIR,
or, better yet, add the statement to any of the optional Makefiles that are
automatically included by bsd.port.mk and were intended for that purpose --
${MASTERDIR}/Makefile.local, for example.  Please be careful in what you add,
or recommend that others add, to make.conf.

b.


More information about the freebsd-ports mailing list