[Top][All Lists]

[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 

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, 

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:

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 = 
###     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 " 
-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 
/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 = 
### 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/ --enable-new-dtags 
/opt/oracle/solstudio12.2/prod/lib/amd64/values-xi.o conftest.o -lm -o conftest 
 -lfai -lfui -lfsu -lsunquad -lmtsk -lpthread -lm -lc 
rm conftest.o
configure:13654: result:  -lm -lfai -lfui -lfsu -lsunquad -lmtsk -lpthread 

reply via email to

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