From owner-svn-ports-head@freebsd.org Sun Oct 29 01:43:32 2017 Return-Path: Delivered-To: svn-ports-head@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 395CAE55354; Sun, 29 Oct 2017 01:43:32 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 229AD65C65; Sun, 29 Oct 2017 01:43:31 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yv.noip.me (c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id v9T1SDs5037762 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 28 Oct 2017 18:28:13 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56] claimed to be yv.noip.me Subject: Re: svn commit: r452962 - head/math/libRmath To: Johannes M Dieterich , Joseph Mingrone Cc: Tijl Coosemans , ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org, portmgr@freebsd.org, maho@freebsd.org, sunpoet@freebsd.org 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> <20171028182237.1f83708c@kalimero.tijl.coosemans.org> <861slmu8qx.fsf@phe.ftfl.ca> <20171028212224.5a675ac0@manray.ogolem.org> From: Yuri Message-ID: <1c137d62-95b3-ea80-11c4-b963aa2232fd@rawbw.com> Date: Sat, 28 Oct 2017 18:28:12 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171028212224.5a675ac0@manray.ogolem.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Oct 2017 01:43:32 -0000 On 10/28/17 18:22, Johannes M Dieterich wrote: > On Sat, 28 Oct 2017 20:56:38 -0300 > Joseph Mingrone wrote: > >> Tijl Coosemans writes: >>> 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. >> I missed this paragraph last time around. >> >> It's not really a switch to wget. We just pull it in as RUN_DEPENDS >> when gfortran is on. R still defaults to downloading packages with >> curl. Users can create/edit configuration to switch to wget, which is >> not a big deal, but not ideal. I've copied sunpoet@, the maintainer >> of ftp/curl. sunpoet@, what do you think about switching ftp/curl's >> default to c-ares instead of THREADED_RESOLVER to work around this >> problem (until there are fixes for the threading problem that is >> triggered with ports libgcc_s)? >> >> Here is a quick-and-dirty poudriere testport run. I say >> quick-and_dirty because 1) I just included ports, which have a >> Makefile with USES.*fortran in them, so there are probably some ports >> missing and 2) I haven't looked in detail at the build logs to see >> what is going on. math/lapack resulted in, by far, the most severe >> fallout. >> >> http://pkg.awarnach.mathstat.dal.ca/build.html?mastername=11amd64-default&build=2017-10-28_12h15m47s > Thanks for running this! > > I spent a few minutes on the lapack failure. Turns out this is one of > these homebrew situations. It uses etime, a gfortran extension. > make.inc should allow however to select NONE or CPU_TIME (which is the > F95 standard function). > > For some of the others: > > openblas tries to link against libgfortran. > > mpich/mpich2 looks like an invalid linking command for clang. > > arpack uses a gfortran-only command line argument to release the fixed > format line length requirement. > > fr-med needs an -fPIC. > > netcdf-fortran is another case of invalid linking command. > > mumps tries to link libgfortran. > > openmpi is another case of invalid linking command > > gotoblas is still using gcc6 somehow > > NASTRAN looks like a legitimate flang issue that should be reported. > > libxc: see above, invalid linking command. > > All things considered, this looks not terrible, I think (I am > positively surprised actually). > > Johannes There are ~150 ports using fortran. I also randomly checked several of them, and some of them failed. Some failures depend on pending upstream fixes in flang. Ideally, all fortran-dependent ports need to be checked. Yuri