From nobody Fri Feb 10 01:26:32 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PCbfz2bn3z3ppB4 for ; Fri, 10 Feb 2023 01:26:35 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PCbfz1Vz9z3sGK; Fri, 10 Feb 2023 01:26:35 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.16.1/8.16.1) with ESMTPS id 31A1QWt7075608 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 9 Feb 2023 17:26:32 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.16.1/8.16.1/Submit) id 31A1QW97075607; Thu, 9 Feb 2023 17:26:32 -0800 (PST) (envelope-from sgk) Date: Thu, 9 Feb 2023 17:26:32 -0800 From: Steve Kargl To: Brooks Davis Cc: freebsd-ports@freebsd.org Subject: Re: devel/llvm16 -- flang is still broken Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4PCbfz1Vz9z3sGK X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, Feb 10, 2023 at 01:07:39AM +0000, Brooks Davis wrote: > On Thu, Feb 09, 2023 at 04:59:45PM -0800, Steve Kargl wrote: > > On Thu, Feb 09, 2023 at 02:07:11PM -0800, Steve Kargl wrote: > > > TL:DR: Please disable building flang in devel/llvm16. > > > > > > > > > I was hoping to test the to Fortran compilers included in > > > devel/llvm16. Unfortunately, neither flang16 nor flang-new16 > > > are usable. > > > > This seems to work for a simple program. Have no idea if > > the order of libs is correct. > > > > --- flang16.orig 2023-02-09 16:57:35.384452000 -0800 > > +++ flang16 2023-02-09 16:57:57.163685000 -0800 > > @@ -7,5 +7,9 @@ > > [ -L "$tool" ] && tool=$(/bin/realpath $tool) > > tool=${tool##*/} > > tool="${LLVM_PREFIX}/bin/${tool%${LLVM_SUFFIX}}" > > -LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \ > > - exec "${tool}" "${@}" > > +#LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LLVM_PREFIX}/lib" \ > > +# exec "${tool}" "${@}" > > +exec "${tool}" "${@}" -L${LLVM_PREFIX}/lib \ > > +-lFortranCommon -lFortranDecimal -lFortranEvaluate \ > > +-lFortranLower -lFortranParser -lFortranSemantics \ > > +-lFortran_main -lFortranRuntime -lm > > I'm somewhat minded to either turn it off by default or apply > https://reviews.llvm.org/D143592 locally. There's a contingent that > seems to think flang must be essentially perfect before they make it at > all usable and that seems a backwards to me. > Yes, I'm aware of that exchange. It's the former PGI and NVidia guys hold flang and flang-new back. To be fair, these are the guys doing much of the heavy lifting with the implementation. The above works if one is compile to an executable, e.g., 'flang16 -o z a.f90'. If one compiles to object files as is done with compiling a library, you see flang16 -O2 -pipe -w -c zerrec.f flang: warning: -lFortranCommon: 'linker' input unused flang: warning: -lFortranDecimal: 'linker' input unused flang: warning: -lFortranEvaluate: 'linker' input unused flang: warning: -lFortranLower: 'linker' input unused flang: warning: -lFortranParser: 'linker' input unused flang: warning: -lFortranSemantics: 'linker' input unused flang: warning: -lFortran_main: 'linker' input unused flang: warning: -lFortranRuntime: 'linker' input unused flang: warning: -lm: 'linker' input unused flang: warning: argument unused during compilation: '-L/usr/local/llvm16/lib' On the the bright, the tests for netlib BLAS all pass, and the tests for LAPACK also appear to work. -- Steve