autoconf
[Top][All Lists]
Advanced

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

linking to Fortran libraries from C fails with suncc and sunf90


From: Daily, Jeff A
Subject: linking to Fortran libraries from C fails with suncc and sunf90
Date: Thu, 20 Jan 2011 10:46:06 -0800

I wanted to discuss this before reporting as a bug in case I'm doing something 
wrong.

I had a user request support for Oracle Solaris Studio compilers, so I 
installed them to try them out.  I downloaded the latest 12.2 and installed it 
to /opt/oracle/solstudio12.2 on my x86_64 RHEL5 workstation.  The compilers I 
used are suncc, sunCC and sunf90 for the C, C++ and Fortran 90 compilers, 
respectively.

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 man page for /usr/bin/ld claims -Y is supported for Solaris compatibility, 
so why is it not parsed out into FLIBS?



config.log for AC_F77_LIBRARY_LDFLAGS:

configure:13457: checking for Fortran 77 libraries of sunf90
configure:13480: sunf90 -o conftest -v conftest.f -lm
### f90: Note: NLSPATH = 
/opt/oracle/solstudio12.2/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/opt/oracle/solstudio12.2/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
###     command line files and options (expanded):
### -o conftest -v conftest.f -lm
/opt/oracle/solstudio12.2/prod/bin/f90comp -m3 -ev -dq -xall -xivdep=loop -H 
"/opt/oracle/solstudio12.2/prod/bin/f90 -v -lm " 
-I/opt/oracle/solstudio12.2/prod/include/f95/amd64 
-p/opt/oracle/solstudio12.2/prod/lib/modules/amd64 -xarch=amd64 -y-xarch=amd64 
-xmemalign=1i -iorounding=processor-defined -xhasc=yes -xcache=generic 
-y-xcache=generic -y-xassume_control=optimize -xassume_control=optimize -fstore 
-y-xdbggen=no%stabs+dwarf2 -y-xdbggen=incl -y-fbe 
-y/opt/oracle/solstudio12.2/prod/bin/fbe -y-fsr=34 -y-verbose -y-comdat 
-y-xarch=amd64 -y-comdat -y-xthreadvar=no%dynamic -y-o -yconftest.o -y-s 
conftest.f
/opt/oracle/solstudio12.2/prod/bin/fbe -s -o conftest.o -xarch=amd64 
-xmodel=small -warn=%none -Qy /tmp/yabekxuSWF 
rm /tmp/yabekxuSWF
### f90: Note: LD_LIBRARY_PATH = 
/home/d3n000/ga/openmpi-1.4.3-amd/local/lib:/home/d3n000/ga/local/lib:/home/d3n000/ga/ga-dev/bld_openmpi_shared/lib
### f90: Note: LD_LIBRARY_PATH_64 = (null)
### f90: Note: LD_RUN_PATH     = (null)
### f90: Note: LD_OPTIONS      = (null)
/usr/bin/ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker 
/lib64/ld-linux-x86-64.so.2 --enable-new-dtags 
/opt/oracle/solstudio12.2/prod/lib/amd64/crti.o 
/opt/oracle/solstudio12.2/prod/lib/amd64/crt1x.o 
/opt/oracle/solstudio12.2/prod/lib/amd64/values-xi.o conftest.o -lm -o conftest 
-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"
 -Qy 
"-R/opt/oracle/solstudio12.2/prod/lib/compilers/rtlibs/usr/lib/amd64:/opt/oracle/solstudio12.2/lib/amd64"
 -lfai -lfui -lfsu -lsunquad -lmtsk -lpthread -lm -lc 
/opt/oracle/solstudio12.2/prod/lib/amd64/libc_supp.a 
/opt/oracle/solstudio12.2/prod/lib/amd64/crtn.o
rm conftest.o
configure:13654: result:  -lm -lfai -lfui -lfsu -lsunquad -lmtsk -lpthread 
/opt/oracle/solstudio12.2/prod/lib/amd64/libc_supp.a



reply via email to

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