[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jul 26 11:50:43 1993 
Subject:Linking NAG with SC0.0 Fortran using LD_LIBRARY_PATH 
From:Anthony Worrall 
Volume-ID:930726.02 

I am having a problem linking the NAG libraries into pop11 using
Suns Sparc Compiler fortran. I want to get the linker to pickup the
version of the nag and fortran libraries via the LD_LIBRARY_PATH
environmental variable LD_LIBRARY_PATH. (This is so uses can opt to use
the newer SC2.0 version).

When I have /usr/lang/SC0.0 in my LDLIBRARY_PATH I get the following behavour.


'/usr/lang/SC0.0'><systranslate('LD_LIBRARY_PATH') -> systranslate('LD_LIBRARY_PATH');
: lib external_facet_model
;;; LOADING LIB external_facet_model
: lib nag_e04ccf
;;; LOADING LIB nag_e04ccf
ld: /usr/lang/SC0.0/libm.a(float_decim.o): _quadruple_to_decimal: multiply
         defined
ld: /usr/lang/SC0.0/libm.a(econvert.o): _econvert: multiply defined
ld: /usr/lang/SC0.0/libm.a(econvert.o): _fconvert: multiply defined
ld: /usr/lang/SC0.0/libm.a(double_decim.o): _binary_to_decimal_fraction:
         multiply defined
ld: /usr/lang/SC0.0/libm.a(double_decim.o): _decimal_round: multiply defined
ld: /usr/lang/SC0.0/libm.a(double_decim.o): _double_to_decimal: multiply
         defined
ld: /usr/lang/SC0.0/libm.a(double_decim.o): _binary_to_decimal_integer:
         multiply defined

;;; MISHAP - ERRORS IN EXTERNAL LOAD LINK (see above)
;;; FILE     :  /home/holbein/views/external_facet_model/lib/nag_e004ccf.p   LINE
         NUMBER:  24
;;; DOING    :  external_do_load external_load external section compile
         search subsystem_libcompile loadlib compile pop_setpop_compiler

If I modify the file nag_e04ccf.p (see bellow) and use explict names for
the libraries (ie '/usr/lang/SC0.0/libnag.a' and '/usr/lang/SC0.0/libF77.a')
it works. It looks to me as though pop11 has /usr/lib/libm.a allready linked
in although it does not appear on the output from external_show().

Any ideas on how I can let the user decide which version of a library to load
with out causing the this symbol name clash?


Anthony


===== nag_e04ccf.p ================================================================
         

section;

uses newexternal;

external declare nag_e04ccf in fortran;
      SUBROUTINE E04CCF(N,X,FMIN,EPS,N1,PDSTAR,PSTAR,PBAR,STEP,Y,P,FUNCT,MONIT,MAXIT,IFAIL)
      DOUBLE PRECISION  EPS, FMIN
      INTEGER           IFAIL, MAXIT, N, N1
      DOUBLE PRECISION  P(N1,N), PBAR(N), PDSTAR(N), PSTAR(N), STEP(N), X(N), Y(N1)
      EXTERNAL          FUNCT, MONIT
      END
endexternal;

external load nag_e04ccf;
	'-lnag' '-lF77' '-lm'
endexternal;

global vars nag = true;

endsection;