tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pre-C++11 compilers



On 07/01/17 05:31, Joerg Sonnenberger wrote:
On Sat, Jul 01, 2017 at 09:32:02AM +0000, coypu%sdf.org@localhost wrote:
Hi,

currently things are pretty bad if you are using pkgsrc without a C++11
compiler. I have attached a diff to make USE_LANGUAGES=c++11 imply
GCC_REQD+=4.8 for the GCC case, which is probably the right thing as
multiple GCC_REQD values behave correctly.

What I don't understand is how -std=c++11 ends up being appended to
packages like poppler and harfbuzz when they themselves do not have
USE_LANGUAGES=c++11, so I don't think my change is helping.
If there is any main program in the mix that depends on a C++11 library,
but itself doesn't use it, this will create very funny and subtile
breakage. My objection to this change stands. I don't care about
erroring out explicitly when using an older GCC, but mixing compilers
like this is asking for a desaster and doesn't fit pkgsrc goals at all.

Joerg

I think Joerg's concern is legitimate, especially if mixing major versions.

I'll say again, though, I've been mixing within the GCC 4.x family on CentOS and FreeBSD for years and it has not been a problem in practice.

Still, if we make a change like this, I'd be inclined to limit the scope to specific platforms (at least initially) and use the same major version as the base compiler on each platform.

I'm in the process of comparing this approach to a global GCC_REQD in make.conf right now, so I can provide some empirical data on the issue as my builds progress. I added gnu++11 to my gcc.mk as well. Looks like there's only one package with a c++14 requirement (audio/musicpd) + filezilla specifically requiring gcc49 for this reason.

It would be ideal to run a full bulk build with and without the patch and see if it actually breaks anything. I don't have a parallel pbulk setup at the moment though, so this would take me two weeks.

So far I've built googletest and R ( 130 packages in all ) on both without any issues, except for needing to add a c++11 requirement to harfbuzz. Are compiler flags inherited by dependencies?

If you guys can point to some specific packages that you think might be problematic with this approach, I'll be happy to test them over the next few days.

Cheers,

    JB

--
Earth is a beta site.



Home | Main Index | Thread Index | Old Index