Thread: SAC i/o routines

Started: 2012-04-04 20:04:20
Last activity: 2012-04-05 03:22:06
Topics: SAC Help
WEBER, RENEE C. (MSFC-ZP13)
2012-04-04 20:04:20
Hi,

I am attempting to use the SAC input/output libraries to compile a Fortran77 code for reading and filtering SAC data. I seem to be having trouble linking to the libraries:

g77 -C -ffixed-line-length-0 -I/usr/local/sac/include -L/usr/local/sac/lib -lsacio filtersac.f -o filtersac
ld: warning: in /usr/local/sac/lib/libsacio.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_rsac1_", referenced from:
_MAIN__ in cc0Tk2Cf.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I'm running OS10.6.8 on a MacBookPro, 64-bit intel core i7. Do I need to re-compile these libraries myself? If so, how do I obtain the source code?

I should note, everything else in SAC seems to be running fine, I can read/plot/write/etc.

Thanks,

Renee Weber, Ph.D.
NASA Marshall Space Flight Center
320 Sparkman Drive
Huntsville, AL 35805
(office) 256.961.7705
renee.c.weber<at>nasa.gov



  • Chad Trabant
    2012-04-04 18:25:22

    Hi Renee,

    You can request the source code along with binaries using the request link from this page:
    http://www.iris.edu/software/sac/

    Alternatively, you could try compiling your fortran to a 64-bit executable. This can be as easy as adding the "-m64" option to your compile command if it's supported by your version of g77.

    regards,
    Chad

    On Apr 4, 2012, at 11:04 AM, WEBER, RENEE C. (MSFC-ZP13) wrote:

    Hi,

    I am attempting to use the SAC input/output libraries to compile a Fortran77 code for reading and filtering SAC data. I seem to be having trouble linking to the libraries:

    g77 -C -ffixed-line-length-0 -I/usr/local/sac/include -L/usr/local/sac/lib -lsacio filtersac.f -o filtersac
    ld: warning: in /usr/local/sac/lib/libsacio.a, file was built for unsupported file format which is not the architecture being linked (i386)
    Undefined symbols:
    "_rsac1_", referenced from:
    _MAIN__ in cc0Tk2Cf.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    I'm running OS10.6.8 on a MacBookPro, 64-bit intel core i7. Do I need to re-compile these libraries myself? If so, how do I obtain the source code?

    I should note, everything else in SAC seems to be running fine, I can read/plot/write/etc.

    Thanks,

    Renee Weber, Ph.D.
    NASA Marshall Space Flight Center
    320 Sparkman Drive
    Huntsville, AL 35805
    (office) 256.961.7705
    renee.c.weber<at>nasa.gov


    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help



  • Arthur Snoke
    2012-04-05 03:22:06
    At the time v101.3b was released, MAC OS was 32 bit. Your OS 10.6 is 64
    bit. If you request the binaries for v101.5c SAC 64 bit, your libraries
    will be 64-bit and will not give those errors.

    I am not sure which Fortran compiler you are using, but I use the same OS
    you do, and I found it worthwhile to convert from g77 to gfortran.

    On Wed, 4 Apr 2012, WEBER, RENEE C. (MSFC-ZP13) wrote:

    Hi,

    I am attempting to use the SAC input/output libraries to compile a
    Fortran77 code for reading and filtering SAC data. I seem to be having
    trouble linking to the libraries:

    g77 -C -ffixed-line-length-0 -I/usr/local/sac/include
    -L/usr/local/sac/lib -lsacio filtersac.f -o filtersac
    ld: warning: in /usr/local/sac/lib/libsacio.a, file was built for unsupported file format which is not the architecture being linked (i386)
    Undefined symbols:
    "_rsac1_", referenced from:
    _MAIN__ in cc0Tk2Cf.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

    I'm running OS10.6.8 on a MacBookPro, 64-bit intel core i7. Do I need
    to re-compile these libraries myself? If so, how do I obtain the source
    code?

    I should note, everything else in SAC seems to be running fine, I can
    read/plot/write/etc.

Page built 05:18:59 | v.b'59d0d2