tech-pkg archive

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

Re: Selecting a C++ compiler



On 11/26/17 09:34, Greg Troxel wrote:
Jason Bacon <bacon4000%gmail.com@localhost> writes:

Disabling gcc-inplace-math did not reduce dependencies much on my
CentOS systems.  Is it different on NetBSD?
I see gcc48 and gcc49 packages installed (NetBSD 7 amd64) that look
like:

   Requires:
   gsed>=3.0.2
   gmp>=5.0.1
   mpcomplex>=0.8.2
   mpfr>=3.0.0.3
   cloog>=0.18.0nb1
   isl>=0.11.1

and on another, older system, gcc6 that has no dependencies (but needs
gsed to build, at least).

I am building all gcc >= 34 currently, on NetBSD 7 amd64, to see what
happens.

For 2017Q3, GCC 4.8 seemed to work best on CentOS, but GCC 5 is
close.  There still appears to be a lot of work to do toward GCC 6
compatibility across the whole collection.  Below are counts for
successful pbulk builds.
Thanks.  I'll flip the text to recommend 5 as the newest version that
avoids bleeding-edge trouble.   Everyone else should feel free to object
and post their own data :-)

www/pkgsrc/packages/sharedapps/pkg-2017Q3/Darwin15/All    14162
www/pkgsrc/packages/sharedapps/pkg-2017Q3/Darwin16/All    14012
www/pkgsrc/packages/sharedapps/pkg-2017Q3/NetBSD-7.1/All  17986
www/pkgsrc/packages/sharedapps/pkg-2017Q3/RHEL6-gcc6/All  15849
www/pkgsrc/packages/sharedapps/pkg-2017Q3/RHEL6/All       16459
So is that 4.8 vs 6?

www/pkgsrc/packages/sharedapps/pkg-2017Q3/RHEL7-gcc5/All  16338
www/pkgsrc/packages/sharedapps/pkg-2017Q3/RHEL7/All       16413
And this is 4.8 vs 5?
Correct.  Any RHEL build without -gcc* is using 4.8.

The other point is that with a fixed 4.8, rather than our current logic,
firefox will fail (I think).   In your bulk builds with 4.8, did 4.9 get
built and used?  Did firefox build?  Or did something else fail and
prevent it, so you didn't see this effect  Or ??
Packages built by pbulk using 48:

FreeBSD login.peregrine bacon ~~/www/pkgsrc/packages/sharedapps/pkg-2017Q3/RHEL6/All 403: ls firefox*
firefox-l10n-55.0.3.tgz     firefox36-3.6.28nb30.tgz
firefox10-l10n-10.0.12.tgz  firefox36-l10n-3.6.28.tgz
firefox17-l10n-17.0.10.tgz  firefox38-l10n-38.8.0.tgz
firefox24-l10n-24.8.1.tgz   firefox45-l10n-45.9.0.tgz
firefox31-l10n-31.8.0.tgz   firefox52-l10n-52.3.0.tgz

Firefox dependencies when using 48:

[root@sciprog2 firefox]# bmake clean-depends
===> Cleaning for cwrappers-20170611
===> Cleaning for nbpatch-20151107
===> Cleaning for digest-20160304
===> Cleaning for checkperms-1.11nb1
===> Cleaning for libtool-base-2.4.6
===> Cleaning for perl-5.26.0nb3
===> Cleaning for p5-gettext-1.07nb2
===> Cleaning for help2man-1.47.4
===> Cleaning for autoconf-2.69nb7
===> Cleaning for p5-Unicode-EastAsianWidth-1.33nb4
===> Cleaning for ncurses-6.0nb4
===> Cleaning for p5-Locale-libintl-1.28
===> Cleaning for p5-Text-Unidecode-1.30nb1
===> Cleaning for gtexinfo-6.3nb1
===> Cleaning for gmp-6.1.2
===> Cleaning for isl-0.17.1
===> Cleaning for cloog-0.18.4
===> Cleaning for mpfr-3.1.6
===> Cleaning for mpcomplex-1.0.3
===> Cleaning for gcc48-4.8.5nb4
===> Cleaning for bzip2-1.0.6nb1
===> Cleaning for zlib-1.2.11
===> Cleaning for unzip-6.0nb8
===> Cleaning for zip-3.0nb3
===> Cleaning for pkgconf-1.3.5
===> Cleaning for alsa-lib-1.1.4.1
===> Cleaning for pax-20080110nb2
===> Cleaning for gcc48-libs-4.8.5nb5
===> Cleaning for libogg-1.3.2
===> Cleaning for flac-1.3.2
===> Cleaning for libvorbis-1.3.5
===> Cleaning for libsndfile-1.0.28nb2
===> Cleaning for speex-1.2.0
===> Cleaning for speexdsp-1.2rc3
===> Cleaning for readline-7.0
===> Cleaning for gdbm-1.13nb1
===> Cleaning for automake-1.15.1
===> Cleaning for libelf-0.8.13nb1
===> Cleaning for libffi-3.2.1nb4
===> Cleaning for pcre-8.41
===> Cleaning for glib2-2.52.3nb1
===> Cleaning for libatomic_ops-7.6.0
===> Cleaning for libltdl-2.4.6
===> Cleaning for bsdtar-3.3.2
===> Cleaning for libdaemon-0.14nb1
===> Cleaning for expat-2.2.4
===> Cleaning for getopt-1.1.6
===> Cleaning for xmlcatmgr-2.2nb1
===> Cleaning for docbook-xml-4.5
===> Cleaning for docbook-xsl-1.79.1nb2
===> Cleaning for xz-5.2.3nb1
===> Cleaning for libxml2-2.9.5
===> Cleaning for libgpg-error-1.27
===> Cleaning for libgcrypt-1.8.1
===> Cleaning for libxslt-1.1.30
===> Cleaning for xmlto-0.0.28nb1
===> Cleaning for kbproto-1.0.7
===> Cleaning for tradcpp-0.5.2nb2
===> Cleaning for bigreqsproto-1.1.2
===> Cleaning for inputproto-2.3.2
===> Cleaning for xproto-7.0.31
===> Cleaning for libXau-1.0.8
===> Cleaning for libXdmcp-1.1.2
===> Cleaning for db4-4.8.30
===> Cleaning for makedepend-1.0.5
===> Cleaning for p5-Scalar-List-Utils-1.49
===> Cleaning for p5-CPAN-Meta-2.150010nb1
===> Cleaning for p5-inc-latest-0.500nb2
===> Cleaning for p5-Module-Build-0.42240
===> Cleaning for p5-Perl4-CoreLibs-0.004
===> Cleaning for openssl-1.0.2knb1
===> Cleaning for mozilla-rootcerts-1.0.20170121nb6
===> Cleaning for python27-2.7.14
===> Cleaning for py27-cElementTree-2.7.14
===> Cleaning for py27-expat-2.7.14
===> Cleaning for py27-xcbgen-1.12
===> Cleaning for xcb-proto-1.12
===> Cleaning for libxcb-1.12nb1
===> Cleaning for xcmiscproto-1.2.2
===> Cleaning for xextproto-7.3.0
===> Cleaning for xf86bigfontproto-1.2.0
===> Cleaning for xtrans-1.3.5
===> Cleaning for libX11-1.6.5
===> Cleaning for libICE-1.0.9
===> Cleaning for libSM-1.2.2
===> Cleaning for libXt-1.1.5
===> Cleaning for dbus-1.10.22
===> Cleaning for p5-XML-Parser-2.44nb3
===> Cleaning for intltool-0.51.0nb2
===> Cleaning for fixesproto-5.0
===> Cleaning for compositeproto-0.4.2
===> Cleaning for damageproto-1.2.1
===> Cleaning for dri2proto-2.8
===> Cleaning for dri3proto-1.0
===> Cleaning for glproto-1.4.17
===> Cleaning for shared-mime-info-1.8
===> Cleaning for flex-2.6.4
===> Cleaning for bison-3.0.4nb3
===> Cleaning for gobject-introspection-1.52.1
===> Cleaning for atk-2.24.0
===> Cleaning for gperf-3.1
===> Cleaning for freetype2-2.8.1
===> Cleaning for fontconfig-2.12.5
===> Cleaning for icu-59.1nb1
===> Cleaning for harfbuzz-1.5.1nb1
===> Cleaning for lzo-2.10
===> Cleaning for py27-setuptools-36.5.0
===> Cleaning for py27-mako-1.0.7
===> Cleaning for libarchive-3.3.2
===> Cleaning for libuv-1.14.1
===> Cleaning for rhash-1.3.5
===> Cleaning for libunistring-0.9.7
===> Cleaning for libidn2-2.0.4
===> Cleaning for curl-7.55.1nb1
===> Cleaning for cmake-3.9.2nb1
===> Cleaning for libLLVM-4.0.1
===> Cleaning for libXext-1.3.3
===> Cleaning for libXfixes-5.0.3
===> Cleaning for pciids-20150907
===> Cleaning for libpciaccess-0.13.5nb1
===> Cleaning for libdrm-2.4.83
===> Cleaning for libva-1.8.3
===> Cleaning for libvdpau-1.1.1nb1
===> Cleaning for libXdamage-1.1.4
===> Cleaning for xf86vidmodeproto-2.3.1
===> Cleaning for libXxf86vm-1.1.4
===> Cleaning for xorg-util-macros-1.19.1
===> Cleaning for libxshmfence-1.2nb5
===> Cleaning for presentproto-1.1
===> Cleaning for xf86driproto-2.1.1nb1
===> Cleaning for MesaLib-11.2.2nb6
===> Cleaning for png-1.6.32
===> Cleaning for renderproto-0.11.1
===> Cleaning for libXrender-0.9.10
===> Cleaning for pixman-0.34.0nb1
===> Cleaning for cairo-1.14.10
===> Cleaning for cairo-gobject-1.14.10
===> Cleaning for libXft-2.3.2
===> Cleaning for pango-1.40.8
===> Cleaning for jbigkit-2.1
===> Cleaning for jpeg-9b
===> Cleaning for tiff-4.0.8nb1
===> Cleaning for gdk-pixbuf2-2.36.9
===> Cleaning for libXcomposite-0.4.4
===> Cleaning for libXcursor-1.1.14
===> Cleaning for libXi-1.7.9
===> Cleaning for xineramaproto-1.2.1
===> Cleaning for libXinerama-1.1.3
===> Cleaning for randrproto-1.5.0
===> Cleaning for libXrandr-1.5.1
===> Cleaning for gtk2+-2.24.31nb4
===> Cleaning for avahi-0.6.32nb7
===> Cleaning for gdbus-codegen-2.52.3
===> Cleaning for openpam-20140912nb2
===> Cleaning for nspr-4.16
===> Cleaning for spidermonkey17-17.0.0nb1
===> Cleaning for polkit-0.113nb3
===> Cleaning for dbus-glib-0.108
===> Cleaning for consolekit-1.0.2nb1
===> Cleaning for recordproto-1.14.2
===> Cleaning for libXtst-1.2.3
===> Cleaning for pulseaudio-11.0
===> Cleaning for autoconf213-2.13nb6
===> Cleaning for libevent-2.1.8
===> Cleaning for sqlite3-3.20.1nb1
===> Cleaning for nss-3.32nb1
===> Cleaning for yasm-1.3.0
===> Cleaning for libv4l-0.4.3nb3
===> Cleaning for gcc49-4.9.4nb5
===> Cleaning for gcc49-libs-4.9.4nb6
===> Cleaning for lame-3.99.5nb3
===> Cleaning for fribidi-0.19.7
===> Cleaning for enca-1.15
===> Cleaning for libass-0.13.7
===> Cleaning for libtheora-1.1.1nb2
===> Cleaning for libvpx-1.6.1nb1
===> Cleaning for nasm-2.13.01
===> Cleaning for x264-devel-20170912
===> Cleaning for xvidcore-1.3.3
===> Cleaning for ffmpeg3-3.3.4
===> Cleaning for libIDL-0.8.14nb4
===> Cleaning for desktop-file-utils-0.23
===> Cleaning for libxkbfile-1.0.9
===> Cleaning for xkbcomp-1.4.0
===> Cleaning for xkeyboard-config-2.21
===> Cleaning for libxkbcommon-0.7.2
===> Cleaning for at-spi2-core-2.25.91
===> Cleaning for at-spi2-atk-2.25.1
===> Cleaning for gettext-lib-0.19.8.1
===> Cleaning for gettext-tools-0.19.8.1nb1
===> Cleaning for hicolor-icon-theme-0.13nb1
===> Cleaning for libepoxy-1.4.3
===> Cleaning for gtk3+-3.22.20



Maybe this should be dealt with separately, but has any thought been
given to compatibility between gfortran and clang on platforms such as
Darwin and FreeBSD?  FreeBSD ports has ways to deal with it, although
they are a little messy.  Here's an example of a FreeBSD port that
mixes boost compiled with clang++ and blas/lapack compiled with
gfortran:
https://github.com/outpaddling/freebsd-ports-wip/tree/master/bolt-lmm
I have not thought about it.   I think it really should be dealt with
separately, because I don't see how dealing with it at the same time
significantly reduces total effort, and this is complicated enough.
Agreed.

The logic for dealing with compiler and library issues is here, much
of it in Uses/compiler.mk:

https://github.com/freebsd/freebsd-ports/tree/master/Mk
Thanks for the pointers.

I'm inclined to save this for another day, but it might have some
bearing on the choice of a default GCC compiler if we're planning
ahead for that day.  I.e. which of gcc48, gcc5, or gcc6 is most
compatible with the base clang on a given platform?  Or maybe punt on
this and focus on integrating flang for those platforms when that's
feasible?
I view the choice of default compiler for any paticular platform as a
minor issue that will get changed in the future as programs in pkgsrc
both demand new compiler features and are updated to work with newer
compilers.  If we say pick 4.8 now and 6 months later decide to change
to gcc6, I think that's perfectly fine.   I'm only trying to figure out
defaults for right now.


I have a similar view.  I plan to test gcc48, gcc5 and gcc6 with my bulk builds each quarter and use whichever yields the best results, where "best" is defined as I believe best serves scientific computing.  I won't bother with 49, as it offers very little beyond 48 and can be safely added as a dependency for the few packages that won't build with 48.  As I've mentioned before, RHEL/CentOS 7 uses 4.8 as a base compiler, so at least in some installations, pkgsrc won't need to install another compiler.

--
Earth is a beta site.


Home | Main Index | Thread Index | Old Index