tech-pkg archive

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

Re: pkgsrc frozen for 2017Q2



On 06/29/17 06:44, Greg Troxel wrote:
Joerg Sonnenberger <joerg%bec.de@localhost> writes:

That sounds like a framework bug.  USE_LANGUAGES=c++11 is supposed to
ensure that the complier used is capable of c++11.
No, it doesn't. That wouldn't work as it results in random mixing of GCC
versions used with different ABIs. You have to preselect a version that
supports all the C++ ABIs you need.
I agree with you about the ABI issue, and have said that before.  But, I
remembered that the last big discussion of this did not have full
consensus, and misremembered the outcome, thinking that we had put in
requiring newish gcc for c++11, realizing that it would add ABI issues
while maybe fixing some builds.

I just went and looked at mk/, and see that what actually happened was
simply setting --std for the various USE_LANGUAGES flavors, with no
influence on compiler selection.

I think pkgsrc should have a better default for c++ than using base 4.4.
So I think this is still a framework bug, just one that we know about
and didn't reach consensus to fix :-)

So trying to find a way forward:

   1) Jason should set GCC_REQD=4.8 in mk.conf for his entire build.  This
   is not something to adjust in individual packages because of the ABI
   issue.  But, this solution is not entirely ok because the default
   build with no patches/settings will not work.

   2) We should consider changing mk/ somehow so that platforms with old
   compilers (<4.8?) GCC_REQD is forced to something that at least
   supports c++11 for either 1) all builds or 2) all builds with c++.  I
   thought we had almost consensus on this.

and explicitly not endorsing

   3) Change mk/ so that c++11 sets newish GCC_REQD and c++ does not.

I am now thinking that there was disagreement between 2 and 3.


Option 1 doesn't involve changing pkgsrc so Jason can do that during the
freeze :-)

The other changes are obviously too big in freeze.  But it would be
really good to fix this early in the next quarter.

Adding GCC_REQD to mk.conf definitely has some appeal, but it's a big can of worms and I anticipate some issues.

The first thing I realized upon trying this is that GCC 4.8 has to be installed before adding GCC_REQD to mk.conf to avoid circular dependencies. I'm doing this now and will report on the progress. This is going to take a long time to test properly, as most packages have never been tested with a pkgsrc GCC. I'm sure the vast majority of them will work fine, but they need to be tested nevertheless.

I understand the ABI issues across versions, but I can tell you that in roughly 5 years of using pkgsrc on CentOS 6, I've had zero issues with mixing different GCC versions. I've selectively added GCC_REQD=4.8 or 4.9 to packages that need it and this has never caused us any problems.

I *have* hit a few issues with GCC/clang mixing on FreeBSD, but they have been rare and it has never been difficult to find a solution.

My inclination would be to make USE_LANGUAGES=c++11 imply GCC_REQD=4.8, but only on Linux systems. This will have no effect on most Linux distros since they already have a newer "base" compiler. Based on my experience, it will cause very few (or no) problems for CentOS 6.

BTW, RHEL/CentOS 6 will remain fully supported until Nov 2020: https://access.redhat.com/support/policy/updates/errata

It's still the mainstream OS in high performance computing, although many sites are migrating to v7.

There's growing interest in pkgsrc in the HPC community right now, so I would argue that it's important to support RHEL/CentOS well and resolve these issues quickly.

Thanks for all your efforts and feedback,

    JB

--
Earth is a beta site.



Home | Main Index | Thread Index | Old Index