[SAC-HELP] Conflict between trigonometric functions and SAC library on MAC OS X

Juan M Gomez gomez at geociencias.unam.mx
Sat Apr 28 12:43:25 PDT 2007



    Hi there,

     I'm working on a MAC OS X, tiger, V10.4.9
Processor 1.33 GHz  PowerPC G4.

   I'm writing a program to change format from SAC to ASCII.
My problem is when I use a trigonometric function, even if this function
is required from SAC, there is a complain until compilation because of a
conflict with sacio.a.

   For example, if I use into my program the following expression:

     ang_inc=asin(rp*vel)/(6371.5-depth_s)
  

The compilation tells me:

c-mendozas-ibook-g4:~/CMendoza/SRC gomez$ make
g77  sac2ptelmod.o -lm -o /Users/gomez/Bin/sac2ptelmod
/Users/gomez/Sac/lib/sacio.a
/usr/bin/ld: multiple definitions of symbol _fmax
/usr/lib/system/libmathCommon.A.dylib(single module) definition of _fmax
/Users/gomez/Sac/lib/sacio.a(math.o) definition of _fmax in section
(__TEXT,__text)
/usr/bin/ld: multiple definitions of symbol _fmin
/usr/lib/system/libmathCommon.A.dylib(single module) definition of _fmin
/Users/gomez/Sac/lib/sacio.a(math.o) definition of _fmin in section
(__TEXT,__text)
collect2: ld returned 1 exit status
make: *** [sac2ptelmod] Error 1

    If I cancel this line my program woks. Any comment about that? Is the
problem my MAC, the compiler GNU compiler, my fortran, the sacio.a library?


    Thanks for your help.


      JuanM







More information about the sac-help mailing list