On Tue, Dec 17, 2019 at 11:07:43AM -0500, Brian Callahan wrote:
> Hi Ingo --
> 
> On 2019-12-17 10:52, Ingo Feinerer wrote:
> > On Fri, Dec 13, 2019 at 11:28:50AM +0100, Martin Reindl wrote:
> > > On Thu, Dec 12, 2019 at 02:16:24PM +0100, Ingo Feinerer wrote:
> > > > update math/R 3.6.1 -> 3.6.2
> > > [...]
> > > > Works for me on amd64.
> > > +1 on arm64 with my Rscripts.
> > > 
> > > But does this need extra WANTLIBs?
> > > 
> > > R-3.6.2(math/R):
> > > Missing: flang.2 from flang-8.0.1.20191107 
> > > (/usr/local/lib/R/modules/lapack.so)
> > > Missing: flangrti.5 from flang-8.0.1.20191107 
> > > (/usr/local/lib/R/modules/lapack.so)
> > > Missing: pgmath.4 from libpgmath-8.0.1.20191107 
> > > (/usr/local/lib/R/modules/lapack.so)
> > > Extra:  c++.3 c++abi.1
> > > WANTLIB += flang flangrti pgmath
> > > *** Error 1 in target 'port-lib-depends-check' (ignored)
> > R uses flang on arm64 (changed in math/R by bcallah@ on 2019-05-08):
> > 
> > MODULES = fortran
> > 
> > .if ${MACHINE_ARCH:Maarch64}
> > MODFORTRAN_COMPILER = flang
> > .else
> > MODFORTRAN_COMPILER = gfortran
> > .endif
> > 
> > Fortunately, infrastructure/mk/fortran.port.mk sets MODFORTRAN_WANTLIB
> > according to the value of MODFORTRAN_COMPILER (either gfortran or flang).
> > 
> > So I just added MODFORTRAN_WANTLIB to WANTLIB. amd64 is still happy with 
> > this
> > and I think it addresses your observation on arm64 (I don't have an arm64
> > system to test).
> > 
> > @martin or @bcallah: could you please confirm this?
> 
> I don't have access to my arm64 machine until Thursday; I can check then.
> 
> Alternatively, we can probably switch arm64 to
> using gfortran if that makes life easier for
> people. The decision to use flang for arm64
> dates back to when the only fortran compiler on
> arm64 was flang. But I don't think that's the
> case any more. I can cook up something if that's
> the direction we choose to go.
> 
> Anyhow, I'll check on Thursday if no one else
> beats me to it and get back to you.

With gfortran, R needs some extra -fPIC love I think. That's probably why you
switched it to flang.

>From my point of view, it is better to set MODFORTRAN_WANTLIB for now and
stick to flang on arm64. I can confirm port-lib-depends-check is happy on
arm64 with the MODFORTRAN_WANTLIB addition.

-m

Reply via email to