From owner-svn-ports-all@freebsd.org Sat Oct 28 16:22:55 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29D92E476AA; Sat, 28 Oct 2017 16:22:55 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay108.isp.belgacom.be (mailrelay108.isp.belgacom.be [195.238.20.135]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D71BE7403F; Sat, 28 Oct 2017 16:22:53 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AIxfPlxIYtIlv+nLMmtmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgXKvn+rarrMEGX3/hxlliBBdydsKMUzbKO+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZPebgFLiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPde?= =?us-ascii?q?RWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbY?= =?us-ascii?q?UwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhS?= =?us-ascii?q?kJNzA37nzZhM9yg6JVrx2uuxNxzpXIYIyXKPZyYr/Rcc8ESWdHQ81fVzZBAoS5?= =?us-ascii?q?b4YXEeQBPORYr43grFYQqhu+AhKsC/3qyjBSgH/2xrAx3uM9EQHH3gwgG8kDvn?= =?us-ascii?q?TOrNrrKqgfTP27wqfSwTXEdfNW1i7w5Y7VeR4vpvGMWKh/ccvXyUQ3GQPFlEuf?= =?us-ascii?q?ppL+MDOOy+sBqW+b7/BvVe63lmEotQ9xrSKyxscolonFn5wVxU7e9SViwYY1It?= =?us-ascii?q?u4SFVhbd6hE5tdsTyROYhuQs46QGxkpDw2xqMatZKnZiQHyZAqywTCZ/CZfYWF?= =?us-ascii?q?5A/oWvyLLjdinn1lfaqyhxO18Ue91OLxTtK00FNWripdldnMq2wN2wTT6seZTv?= =?us-ascii?q?t9+V+s2TWV2ADX6+FEJF47lbDcK5I73r4wl5gTsUDZEiDqn0X2i7SWeVsh+uey?= =?us-ascii?q?7eTnea/qppiGN497kg3+M6IuldKjAekgMQUCQ3KX9fqg2LH/50H0QbFHgucrnq?= =?us-ascii?q?XHvp3WPcEbqbS4Aw9R3IYj8RG/DzK+3dQEnHkHLlZFdQmJj4jzJV7BPuv3Deyi?= =?us-ascii?q?jFi2lzdr3f/GMqX7AprRNnjDjKvhfbFl5k5Ezwoz18xf55dbCrEbO//zVFXxu8?= =?us-ascii?q?LGARAiKAy73vzrCNJn1oMRQWiPGLOWMLvOsV+U4eIiO/KMZJETuDrkM/gl4OTu?= =?us-ascii?q?jWMimVMEfammw4EYZ22jE/RoOUWWf2TjjcwaEWgXpAY+S/bqiFKaWz5Je3myR7?= =?us-ascii?q?485i08CI++FofDWIatjKWZ3Ce8BJ1WentGBkmWHnfsc4WJQPkMaDiMLcB/iTME?= =?us-ascii?q?TqWuR5Um1RG0uw/w06BnIfbM+i0EqZLj08B45/XUlREo6Tx0FN2R3H2KT2Fxm2?= =?us-ascii?q?MIRiM23Lxhrkxn0VeOyqZ4g+ZGGtNN/PxJSRo1OYTbz+xgBND4QhjBccuRSFa6?= =?us-ascii?q?XtWmBik8TtArw98LeEt9Fc+igQ7d0CWxGL8aiqaHBJsu8qLTjDDNIJNfzG3LzK?= =?us-ascii?q?lpqlggTdFIM2Du0qxl8iD9HYPEuX610aGwevJP8jTK8TK/zGiK9GpfVxV9VKzD?= =?us-ascii?q?RjhLekrUqfzX/E7PZYSCT7M9PV0Smoa5NqJWZ4ix3h19T/D5NYGGbg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2B6DwAnrvRZ/3tFyFBbHAEBBAEBCgEBF?= =?us-ascii?q?wEBBAEBCgEBgzRUEG4UE48Pjh4BAYF7MgGYICINhRYChEpEFAEBAQEBAQEBAQE?= =?us-ascii?q?BaihCDIFqIoJDAQEBAQIBATkcIxALDgQGCSUPGREQDgYTG4oADAymPxGDSop9A?= =?us-ascii?q?QEBAQEBAQMBAQEBAQEigy6FQ4IdgQ2DPodJBaIDh2aHDYV8gQCCAJA6jF+KajY?= =?us-ascii?q?hgWhVMghZBBGCPwmCUxyBaT82AYI2iW4BAQE?= X-IPAS-Result: =?us-ascii?q?A2B6DwAnrvRZ/3tFyFBbHAEBBAEBCgEBFwEBBAEBCgEBgzR?= =?us-ascii?q?UEG4UE48Pjh4BAYF7MgGYICINhRYChEpEFAEBAQEBAQEBAQEBaihCDIFqIoJDA?= =?us-ascii?q?QEBAQIBATkcIxALDgQGCSUPGREQDgYTG4oADAymPxGDSop9AQEBAQEBAQMBAQE?= =?us-ascii?q?BAQEigy6FQ4IdgQ2DPodJBaIDh2aHDYV8gQCCAJA6jF+KajYhgWhVMghZBBGCP?= =?us-ascii?q?wmCUxyBaT82AYI2iW4BAQE?= Received: from 123.69-200-80.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([80.200.69.123]) by relay.skynet.be with ESMTP; 28 Oct 2017 18:22:49 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id v9SGMnGd043642; Sat, 28 Oct 2017 18:22:49 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sat, 28 Oct 2017 18:22:48 +0200 From: Tijl Coosemans To: Joseph Mingrone Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, portmgr@FreeBSD.org Subject: Re: svn commit: r452962 - head/math/libRmath Message-ID: <20171028182237.1f83708c@kalimero.tijl.coosemans.org> In-Reply-To: <86y3nvtjlt.fsf@phe.ftfl.ca> References: <201710270052.v9R0qf7A058644@repo.freebsd.org> <20171027125130.39e98c9c@kalimero.tijl.coosemans.org> <86d158vcve.fsf@phe.ftfl.ca> <20171028124843.56f8e8d3@kalimero.tijl.coosemans.org> <86y3nvtjlt.fsf@phe.ftfl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2017 16:22:55 -0000 On Sat, 28 Oct 2017 11:47:26 -0300 Joseph Mingrone wrote: > Tijl Coosemans writes: >> On Fri, 27 Oct 2017 12:17:41 -0300 Joseph Mingrone wrote: >>> Tijl Coosemans writes: >>>> I don't see this approach to support flang work. Will this have to be >>>> added to all Fortran ports? Will you modify all Fortran ports whenever >>>> flang supports a new architecture? Will users run into problems when >>>> they select gfortran in some ports and flang in others? Will you allow >>>> port maintainers to set different defaults in their ports? It all looks >>>> like high maintenance and highly error prone. Too many modifiable >>>> variables in too many places. >>>> >>>> USES arguments are the wrong mechanism for this in my opinion. >>>> DEFAULT_VERSIONS seems much better to me. Users can then add >>>> fortran=gfortran or fortran=flang to DEFAULT_VERSIONS. fortran.mk would >>>> look at FORTRAN_DEFAULT to determine the fortran compiler instead of >>>> fortran_ARGS. All ports would simply have USES=fortran and no options. >>>> That's two variables in two locations: the user's DEFAULT_VERSIONS in >>>> make.conf and the ports tree FORTRAN_DEFAULT in bsd.default-versions.mk >>>> (which could eventually be set to flang on amd64 if that turns out to be >>>> a better default). Advanced users that want to build some ports with >>>> flang and some with gfortran and think they know what they're doing can >>>> figure out the if-elseif-else logic needed in their make.conf. Port >>>> maintainers/committers should not have to deal with the support requests >>>> resulting from such mixed configurations which is very likely if you >>>> add per port options like you do in this commit. >>> >>> The DEFAULT_VERSIONS solution is cleaner, but switching all Fortran >>> ports to build with flang would cause breakage and, as you know, flang >>> is currently only available for amd64. The current, more complicated, >>> fine-tuned approach is less drastic. If port maintainers do not make >>> any changes, nothing with their port changes. They have time to test >>> with flang and make a choice to opt in. For example, math/R defaults to >>> flang (on amd64) because we have problems with gfortran [1][2] and a >>> work-in-progress port for Rstudio [3] only works when math/R uses flang. >>> Hopefully flang will mature and become supported on more architectures, >>> port maintainers will put in some work to support flang, and it will be >>> an obvious choice to move to the DEFAULT_VERSIONS approach. This is not >>> a precedent for choosing the compiler as a port option [4]. >>> >>> [1] https://wiki.freebsd.org/libgcc%20problem >>> [2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220359 >>> [3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221127 >>> [4] E.G. cad/ghdl games/eduke32 lang/erlang-runtime16 lang/gambit-c >>> math/opensolaris-libm multimedia/x264 net-p2p/cpuminer net/asterisk11 >>> www/mod_spdy >> >> The download problem you have in math/R looks like the problem reported at >> https://lists.freebsd.org/pipermail/freebsd-current/2017-August/066855.html >> https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067254.html >> and is unrelated to Fortran. > > Thanks for this. The problem is with gfortran (gcc). It is good to > know it is simply with gcc/gfortran and not a result of mixing libgcc > libraries. The main point for users of math/R is that problems are only > triggered when it is built with gfortran and not with flang. If we want > R to work as it should, we need flang, but if we have to switch all > Fortran ports to flang we will break (many) other ports. It's not a gfortran problem. It's a kernel or libthr problem. You can work around it by avoiding the combination of recycled thread stacks and exception handling done by ports libgcc_s. When you switched from curl to wget you avoided threads and that fixed the problem. Switching to flang avoids ports libgcc_s and that also fixes the problem, but it's not necessary to go this way. You could probably go back to curl if you build it with the CARES option instead of THREADED_RESOLVER. >> You could then ask portmgr for an exp-run with the default set to >> flang to see where the problems are. Point upstream flang developers >> and anyone else who wants to push flang to the error logs and >> prioritise fixing ports that cause the biggest fallout. You'll get >> better results faster that way than when you expect individual port >> maintainers to experiment with flang or fix flang related issues. > > I did this with a private poudriere run and there was a lot of breakage > with flang. It was a few months ago though, so I will try again. If a > high proportion break with flang, then I still feel it might be best (in > terms of breakage for users) to ease in with the current approach. I > will report back soon(ish). If it's really that bad then flang is not ready and it's somewhat irresponsible to use it for such an important package as R. Flang has no proven track record. Even if it builds without errors in case of R you can't be reasonably sure it produces correct code. With compilers you have to be a bit more conservative and cautious than usual because everything else depends on it.