Thread: Sac i/o problem with fortran

Started: 2011-02-05 22:22:39
Last activity: 2011-02-06 02:42:48
Topics: SAC Help
Aubreya Adams
2011-02-05 22:22:39
Hello,
I have recently upgrade from a PowerPC to an Intel Mac (10.6.6) and am trying to recompile some fortran codes that call upon sac i/o functions. When I try to compile the codes, I get following warning about the sac library and resulting errors:
ld: warning: in /usr/bin/sac/lib/sacio.a, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_getfhv_", referenced from:
_MAIN__ in cc7sScyY.o
_MAIN__ in cc7sScyY.o
_MAIN__ in cc7sScyY.o
_MAIN__ in cc7sScyY.o
_MAIN__ in cc7sScyY.o
_MAIN__ in cc7sScyY.o
"_rsac1_", referenced from:
_MAIN__ in cc7sScyY.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
In all other aspects, sac seems to be working fine on my new computer. Do any of you have insights into how I might address this problem?
Thank you,
Aubreya Adams
  • Arthur Snoke
    2011-02-05 23:56:47
    The gcc in OS 10.6 has a default of 64 bits, in contrast with the 32 bit
    default for earlier Mac OS. Hence, when we released 101.4, we provided
    two Mac binaries, one a "fat" binary that works on PPC and i386 macs but
    is 32 bit so has compatibility problems on 10.6, and one that is built on
    10.6 but not downward compatible. If you build SAC from sources on 10.6,
    it will interface with the 64 bit gcc -- and Fortran routines that are
    native 64 bits or have been built with the -m64 compiler option. I
    recently upgraded my gfortran from a 2009 version that had a default -m32
    to one that has the -m64 default.


    On Sat, 5 Feb 2011, Aubreya Adams wrote:

    Hello,I have recently upgrade from a PowerPC to an Intel Mac (10.6.6)
    and am trying to recompile some fortran codes that call upon sac i/o
    functions.  When I try to compile the codes, I get following warning
    about the sac library and resulting errors: ld: warning: in
    /usr/bin/sac/lib/sacio.a, file was built for unsupported file format
    which is not the architecture being linked (i386) Undefined symbols:
    "_getfhv_", referenced from:     _MAIN__ in cc7sScyY.o     _MAIN__ in
    cc7sScyY.o     _MAIN__ in cc7sScyY.o     _MAIN__ in cc7sScyY.o
    _MAIN__ in cc7sScyY.o     _MAIN__ in cc7sScyY.o   "_rsac1_", referenced
    from:     _MAIN__ in cc7sScyY.o ld: symbol(s) not found collect2: ld
    returned 1 exit status In all other aspects, sac seems to be working
    fine on my new computer.  Do any of you have insights into how I might
    address this problem? Thank you, Aubreya Adams


    • Aubreya Adams
      2011-02-06 02:42:48
      As you advised, I downloaded a compiler with the -m64 default, and that resolved the problem.
      Thank you for your help!

      On Feb 5, 2011, at 2:56 PM, Arthur Snoke wrote:

      The gcc in OS 10.6 has a default of 64 bits, in contrast with the 32 bit default for earlier Mac OS. Hence, when we released 101.4, we provided two Mac binaries, one a "fat" binary that works on PPC and i386 macs but is 32 bit so has compatibility problems on 10.6, and one that is built on 10.6 but not downward compatible. If you build SAC from sources on 10.6, it will interface with the 64 bit gcc -- and Fortran routines that are native 64 bits or have been built with the -m64 compiler option. I recently upgraded my gfortran from a 2009 version that had a default -m32 to one that has the -m64 default.


      On Sat, 5 Feb 2011, Aubreya Adams wrote:

      Hello,I have recently upgrade from a PowerPC to an Intel Mac (10.6.6) and am trying to recompile some fortran codes that call upon sac i/o functions. When I try to compile the codes, I get following warning about the sac library and resulting errors: ld: warning: in /usr/bin/sac/lib/sacio.a, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols:
      "_getfhv_", referenced from: _MAIN__ in cc7sScyY.o _MAIN__ in cc7sScyY.o _MAIN__ in cc7sScyY.o _MAIN__ in cc7sScyY.o
      _MAIN__ in cc7sScyY.o _MAIN__ in cc7sScyY.o "_rsac1_", referenced from: _MAIN__ in cc7sScyY.o ld: symbol(s) not found collect2: ld returned 1 exit status In all other aspects, sac seems to be working fine on my new computer. Do any of you have insights into how I might address this problem? Thank you, Aubreya Adams




19:35:32 v.22510d55