autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linking to Fortran libraries from C fails with suncc and sunf90


From: Ralf Wildenhues
Subject: Re: linking to Fortran libraries from C fails with suncc and sunf90
Date: Thu, 20 Jan 2011 20:05:33 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Jeff,

thanks for the bug report.

* Daily, Jeff A wrote on Thu, Jan 20, 2011 at 07:46:06PM CET:
> Our software is a mostly C, with some Fortran and a C++ binding.  We
> use AC_F77_LIBRARY_LDFLAGS.  configure fails with "linking to Fortran
> libraries from C fails" because " /usr/bin/ld: cannot find -lmtsk".
> The result of the AC_F77_LIBRARY_LDFLAGS test appears at the end of
> this email.  The library is located in
> /opt/oracle/solstudio12.2/prod/lib/compilers/rtlibs/usr/lib/amd64
> which is found in the -Y argument in the verbose linking output:
> -Y 
> "/opt/oracle/solstudio12.2/prod/lib/compilers/rtlibs/usr/lib/amd64:/opt/oracle/solstudio12.2/lib/amd64:/opt/oracle/solstudio12.2/prod/lib/amd64:/lib64:/usr/lib64"

The _AC_FC_LIBRARY_LDFLAGS macro in fortran.m4 should probably treat
-Y like it does -YP, changing it to -L in the process.

Can you submit a patch (to the -patches list)?  You're in the best
position to test it.  Can you also try to ensure that one of the
Autoconf testsuite Fortran tests exposes this if $F77, $FFLAGS and/or
$FC, $FCFLAGS are suitably set in the environment so this library is
pulled in?  In git master, the Fortran tests are
  make check TESTSUITEFLAGS='303-329'

(we should probably use AT_KEYWORDS a bit more).

If you need help, feel free to report back with what you have.

Thanks,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]