From owner-freebsd-fortran@freebsd.org Mon May 7 00:26:13 2018 Return-Path: Delivered-To: freebsd-fortran@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 637FEFCB6A3 for ; Mon, 7 May 2018 00:26:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id F277468C0A for ; Mon, 7 May 2018 00:26:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B6661FCB6A2; Mon, 7 May 2018 00:26:12 +0000 (UTC) Delivered-To: fortran@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77E86FCB6A1 for ; Mon, 7 May 2018 00:26:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1375068BFB for ; Mon, 7 May 2018 00:26:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 2CB4511B00 for ; Mon, 7 May 2018 00:26:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w470QBMp054890 for ; Mon, 7 May 2018 00:26:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w470QBoZ054889 for fortran@FreeBSD.org; Mon, 7 May 2018 00:26:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fortran@FreeBSD.org Subject: [Bug 228007] math/lapack: switch to flang Date: Mon, 07 May 2018 00:26:11 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: sgk@troutmask.apl.washington.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fortran@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fortran@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Fortran on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2018 00:26:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228007 --- Comment #6 from sgk@troutmask.apl.washington.edu --- (In reply to robert.ayrapetyan from comment #5) > The gfortran's issue I'm talking about is related to: > > ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by > /usr/local> \\/lib/gcc48/libgfortran.so.3 not found from gfortran.so libr= ary That isn't a gfortran issue. This is an issue with FreeBSD's ldd, ldconfig, and the highjacking of a filename. -% gfortran7 -o z h.f90 % ldd z z: libgfortran.so.4 =3D> /usr/local/lib/gcc7/libgfortran.so.4 (0x20064= 5000) libm.so.5 =3D> /lib/libm.so.5 (0x200a17000) libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x200a4b000) libquadmath.so.0 =3D> /usr/local/lib/gcc7/libquadmath.so.0 (0x200a6= 3000) libc.so.7 =3D> /lib/libc.so.7 (0x200ca3000) % ldconfig -r | grep libgcc 6:-lgcc_s.1 =3D> /lib/libgcc_s.so.1 218:-lgccpp-threaded.1 =3D> /usr/local/lib/libgccpp-threaded.so.1 679:-lgccpp.1 =3D> /usr/local/lib/libgccpp.so.1 715:-lgcc_s.1 =3D> /usr/local/lib/gcc7/libgcc_s.so.1 The problem is trivially solved by a number of means. (1) If clang is the system compiler, then rename libgcc_s.so.1 to libclang_s.so.1. It's rather odd that clang uses gcc in the name of an important runtime library. (2) Bump the the major number on FreeBSD's libgcc_s.so.1 from 1 to 2 to indicate that FreeBSD's libgcc_s has nothing to do with GCC. You then have libgcc_s.so.2 and ldd should be able to=20 differentiate between 1 and 2. (3) Use -rpath. (4) Use -Wl to explicitly find the right libgcc_s. This is not a problem with gfortran and naively changing the default to flang is questionable. 1) There is no release version of flang. 2) flang developers do not participate in discussions with users (see crickets on flang-dev list). 3) AFAICT, flang developers do not accept patches from outside of Nvidia. --=20 You are receiving this mail because: You are the assignee for the bug.=