Thread: sacio.a for intel mac

Started: 2006-08-18 23:44:43
Last activity: 2006-08-21 01:50:47
Topics: SAC Help
Georgia Cua
2006-08-18 23:44:43
Dear sac-help,

I am using an intel mac, and would like to use the input/output
libraries in sacio.a.

However, when I try to compile my fortran code, I get some messages

/usr/bin/ld: warning /Applications/sac/lib/sacio.a archive's cputype
(18, architecture ppc) does not match cputype (7) for specified -arch
flag: i386 (can't load from it)
/usr/bin/ld: Undefined symbols:
_rsac1_
collect2: ld returned 1 exit status

Is there a version of sacio.a that works with the intel mac?

The sac version I am using is:

SEISMIC ANALYSIS CODE [03/01/2005 (Version 100.00)]
Copyright 1995 Regents of the University of California

Thank you,
Georgia Cua

  • Arthur Snoke
    2006-08-18 22:35:13
    IRIS is running some tests on building/running sac on an intel machine, as
    the normal testers do not have access to one.

    A couple of questions:

    1. The sac distribution you cite indicates that it is the original binary
    code for sac 100.0. That was not built on an intel mac, so I am surprised
    you could get it to run. Please clarify exactly what sac binary you are
    running and what platform.

    2. As I think we have commented to the list before (see archives),
    meshing Fortran and gcc is not simple. What version of Fortran are you
    running? The binary with a name like the one you cite was built using gcc
    3. With non-intel macs, the default on 10.4 is gcc 4.0 or 4.0.1. These
    are not compatible with g77 built in conjunction with gcc 3. Please
    clarify the compilers you are using.

    Arthur Snoke

    On Fri, 18 Aug 2006, Georgia Cua wrote:

    Dear sac-help,

    I am using an intel mac, and would like to use the input/output
    libraries in sacio.a.

    However, when I try to compile my fortran code, I get some messages

    /usr/bin/ld: warning /Applications/sac/lib/sacio.a archive's cputype (18,
    architecture ppc) does not match cputype (7) for specified -arch flag: i386
    (can't load from it)
    /usr/bin/ld: Undefined symbols:
    _rsac1_
    collect2: ld returned 1 exit status

    Is there a version of sacio.a that works with the intel mac?

    The sac version I am using is:

    SEISMIC ANALYSIS CODE [03/01/2005 (Version 100.00)]
    Copyright 1995 Regents of the University of California

    Thank you,
    Georgia Cua
    _______________________________________________
    sac-help mailing list
    sac-help<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/sac-help


    • Georgia Cua
      2006-08-19 06:03:24
      Dear Arthur,

      Thanks for your prompt reply.

      I am using the sac binaries that were in 05Mar01.sac.bin.darwin.tar.

      Yes, I had seen from the archives that there were some issues with
      fortran and gcc. I am the following versions of gfortran and gcc

      [guardia:/Applications] georgia% gfortran -v
      Using built-in specs.
      Target: i386-apple-darwin8.7.1
      Configured with: ../gcc-4.2-20060805/configure --enable-languages=c+
      +,fortran,java
      Thread model: posix
      gcc version 4.2.0 20060805 (experimental)

      [guardia:~/Research/PAGER2006_2] georgia% gcc -v
      Using built-in specs.
      Target: i686-apple-darwin8
      Configured with: /private/var/tmp/gcc/gcc-5250.obj~20/src/configure --
      disable-checking -enable-werror --prefix=/usr --mandir=/share/man --
      enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg]
      [^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --
      build=powerpc-apple-darwin8 --with-arch=pentium-m --with-
      tune=prescott --program-prefix= --host=i686-apple-darwin8 --
      target=i686-apple-darwin8
      Thread model: posix
      gcc version 4.0.1 (Apple Computer, Inc. build 5250)


      Thank you,
      Georgia

      On Aug 18, 2006, at 9:35 PM, Arthur Snoke wrote:

      IRIS is running some tests on building/running sac on an intel
      machine, as the normal testers do not have access to one.

      A couple of questions:

      1. The sac distribution you cite indicates that it is the original
      binary code for sac 100.0. That was not built on an intel mac, so
      I am surprised you could get it to run. Please clarify exactly
      what sac binary you are running and what platform.

      2. As I think we have commented to the list before (see archives),
      meshing Fortran and gcc is not simple. What version of Fortran are
      you running? The binary with a name like the one you cite was
      built using gcc 3. With non-intel macs, the default on 10.4 is gcc
      4.0 or 4.0.1. These are not compatible with g77 built in
      conjunction with gcc 3. Please clarify the compilers you are using.

      Arthur Snoke

      On Fri, 18 Aug 2006, Georgia Cua wrote:

      Dear sac-help,

      I am using an intel mac, and would like to use the input/output
      libraries in sacio.a.

      However, when I try to compile my fortran code, I get some messages

      /usr/bin/ld: warning /Applications/sac/lib/sacio.a archive's
      cputype (18, architecture ppc) does not match cputype (7) for
      specified -arch flag: i386 (can't load from it)
      /usr/bin/ld: Undefined symbols:
      _rsac1_
      collect2: ld returned 1 exit status

      Is there a version of sacio.a that works with the intel mac?

      The sac version I am using is:

      SEISMIC ANALYSIS CODE [03/01/2005 (Version 100.00)]
      Copyright 1995 Regents of the University of California

      Thank you,
      Georgia Cua
      _______________________________________________
      sac-help mailing list
      sac-help<at>iris.washington.edu
      http://www.iris.washington.edu/mailman/listinfo/sac-help




      -----------------------------
      Dr. Georgia Cua
      Swiss Seismological Service
      Institute of Geophysics
      ETH Hoenggerberg HPP P
      CH-8093 Zurich
      Switzerland

      Tel: +41-044-633-7574
      Fax: +41-044-633-1065

      georgia.cua<at>sed.ethz.ch
      -----------------------------



      • Kris Walker
        2006-08-18 21:15:46
        Just to add, I don't know of any other gnu fortran compiler for the
        intel mac. I don't think a g77 exists yet. I have managed getting c
        and fortran programs to merge though with gfortran and gcc on the intel
        mac. Sorry I can't help much more than this though.

        kris

        On Aug 18, 2006, at 2:03 PM, Georgia Cua wrote:

        Dear Arthur,

        Thanks for your prompt reply.

        I am using the sac binaries that were in 05Mar01.sac.bin.darwin.tar.

        Yes, I had seen from the archives that there were some issues with
        fortran and gcc. I am the following versions of gfortran and gcc

        [guardia:/Applications] georgia% gfortran -v
        Using built-in specs.
        Target: i386-apple-darwin8.7.1
        Configured with: ../gcc-4.2-20060805/configure
        --enable-languages=c++,fortran,java
        Thread model: posix
        gcc version 4.2.0 20060805 (experimental)

        [guardia:~/Research/PAGER2006_2] georgia% gcc -v
        Using built-in specs.
        Target: i686-apple-darwin8
        Configured with: /private/var/tmp/gcc/gcc-5250.obj~20/src/configure
        --disable-checking -enable-werror --prefix=/usr --mandir=/share/man
        --enable-languages=c,objc,c++,obj-c++
        --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
        --with-gxx-include-dir=/include/c++/4.0.0
        --build=powerpc-apple-darwin8 --with-arch=pentium-m
        --with-tune=prescott --program-prefix= --host=i686-apple-darwin8
        --target=i686-apple-darwin8
        Thread model: posix
        gcc version 4.0.1 (Apple Computer, Inc. build 5250)


        Thank you,
        Georgia

        On Aug 18, 2006, at 9:35 PM, Arthur Snoke wrote:

        IRIS is running some tests on building/running sac on an intel
        machine, as the normal testers do not have access to one.

        A couple of questions:

        1. The sac distribution you cite indicates that it is the original
        binary code for sac 100.0. That was not built on an intel mac, so I
        am surprised you could get it to run. Please clarify exactly what sac
        binary you are running and what platform.

        2. As I think we have commented to the list before (see archives),
        meshing Fortran and gcc is not simple. What version of Fortran are
        you running? The binary with a name like the one you cite was built
        using gcc 3. With non-intel macs, the default on 10.4 is gcc 4.0 or
        4.0.1. These are not compatible with g77 built in conjunction with
        gcc 3. Please clarify the compilers you are using.

        Arthur Snoke

        On Fri, 18 Aug 2006, Georgia Cua wrote:

        Dear sac-help,

        I am using an intel mac, and would like to use the input/output
        libraries in sacio.a.

        However, when I try to compile my fortran code, I get some messages

        /usr/bin/ld: warning /Applications/sac/lib/sacio.a archive's cputype
        (18, architecture ppc) does not match cputype (7) for specified
        -arch flag: i386 (can't load from it)
        /usr/bin/ld: Undefined symbols:
        _rsac1_
        collect2: ld returned 1 exit status

        Is there a version of sacio.a that works with the intel mac?

        The sac version I am using is:

        SEISMIC ANALYSIS CODE [03/01/2005 (Version 100.00)]
        Copyright 1995 Regents of the University of California

        Thank you,
        Georgia Cua
        _______________________________________________
        sac-help mailing list
        sac-help<at>iris.washington.edu
        http://www.iris.washington.edu/mailman/listinfo/sac-help




        -----------------------------
        Dr. Georgia Cua
        Swiss Seismological Service
        Institute of Geophysics
        ETH Hoenggerberg HPP P
        CH-8093 Zurich
        Switzerland

        Tel:  +41-044-633-7574   
        Fax: +41-044-633-1065   

        georgia.cua<at>sed.ethz.ch
        -----------------------------



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

        ================================================================
        Dr. Kristoffer T. Walker http://sail.ucsd.edu/~walker
        Green Scholar email: walker<at>ucsd.edu
        IGPP, Scripps MC 0225 phone: 858-534-0126
        University of California, San Diego fax: 858-534-9873
        La Jolla, CA 92093-0225 room: 2201 Revelle Lab
        ================================================================



        • George Helffrich
          2006-08-19 19:23:38
          Dear All -

          For info on g77 (not gfortran) compilers on intel mac, see

          http://www1.gly.bris.ac.uk/~wookey/MEFTLG/g77.htm

          On Friday, August 18, 2006, at 10:15 pm, Kris Walker wrote:

          Just to add, I don't know of any other gnu fortran compiler for the
          intel mac. I don't think a g77 exists yet. I have managed getting c
          and fortran programs to merge though with gfortran and gcc on the
          intel mac. Sorry I can't help much more than this though.

          kris

          On Aug 18, 2006, at 2:03 PM, Georgia Cua wrote:

          Dear Arthur,

          Thanks for your prompt reply.

          I am using the sac binaries that were in 05Mar01.sac.bin.darwin.tar.

          Yes, I had seen from the archives that there were some issues with
          fortran and gcc. I am the following versions of gfortran and gcc

          [guardia:/Applications] georgia% gfortran -v
          Using built-in specs.
          Target: i386-apple-darwin8.7.1
          Configured with: ../gcc-4.2-20060805/configure
          --enable-languages=c++,fortran,java
          Thread model: posix
          gcc version 4.2.0 20060805 (experimental)

          [guardia:~/Research/PAGER2006_2] georgia% gcc -v
          Using built-in specs.
          Target: i686-apple-darwin8
          Configured with: /private/var/tmp/gcc/gcc-5250.obj~20/src/configure
          --disable-checking -enable-werror --prefix=/usr --mandir=/share/man
          --enable-languages=c,objc,c++,obj-c++
          --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
          --with-gxx-include-dir=/include/c++/4.0.0
          --build=powerpc-apple-darwin8 --with-arch=pentium-m
          --with-tune=prescott --program-prefix= --host=i686-apple-darwin8
          --target=i686-apple-darwin8
          Thread model: posix
          gcc version 4.0.1 (Apple Computer, Inc. build 5250)


          Thank you,
          Georgia

          On Aug 18, 2006, at 9:35 PM, Arthur Snoke wrote:

          IRIS is running some tests on building/running sac on an intel
          machine, as the normal testers do not have access to one.

          A couple of questions:

          1. The sac distribution you cite indicates that it is the original
          binary code for sac 100.0. That was not built on an intel mac, so I
          am surprised you could get it to run. Please clarify exactly what
          sac binary you are running and what platform.

          2. As I think we have commented to the list before (see archives),
          meshing Fortran and gcc is not simple. What version of Fortran are
          you running? The binary with a name like the one you cite was built
          using gcc 3. With non-intel macs, the default on 10.4 is gcc 4.0 or
          4.0.1. These are not compatible with g77 built in conjunction with
          gcc 3. Please clarify the compilers you are using.

          Arthur Snoke

          On Fri, 18 Aug 2006, Georgia Cua wrote:

          Dear sac-help,

          I am using an intel mac, and would like to use the input/output
          libraries in sacio.a.

          However, when I try to compile my fortran code, I get some messages

          /usr/bin/ld: warning /Applications/sac/lib/sacio.a archive's
          cputype (18, architecture ppc) does not match cputype (7) for
          specified -arch flag: i386 (can't load from it)
          /usr/bin/ld: Undefined symbols:
          _rsac1_
          collect2: ld returned 1 exit status

          Is there a version of sacio.a that works with the intel mac?

          The sac version I am using is:

          SEISMIC ANALYSIS CODE [03/01/2005 (Version 100.00)]
          Copyright 1995 Regents of the University of California

          Thank you,
          Georgia Cua
          _______________________________________________
          sac-help mailing list
          sac-help<at>iris.washington.edu
          http://www.iris.washington.edu/mailman/listinfo/sac-help




          -----------------------------
          Dr. Georgia Cua
          Swiss Seismological Service
          Institute of Geophysics
          ETH Hoenggerberg HPP P
          CH-8093 Zurich
          Switzerland

          Tel:  +41-044-633-7574   
          Fax: +41-044-633-1065   

          georgia.cua<at>sed.ethz.ch
          -----------------------------



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

          ================================================================
          Dr. Kristoffer T. Walker http://sail.ucsd.edu/~walker
          Green Scholar email: walker<at>ucsd.edu
          IGPP, Scripps MC 0225 phone: 858-534-0126
          University of California, San Diego fax: 858-534-9873
          La Jolla, CA 92093-0225 room: 2201 Revelle Lab
          ================================================================


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



      • Arthur Snoke
        2006-08-19 19:53:57
        Georgia,

        Before I get to your question/situation, please share where you got your
        gfortran compiler from. I am told that this version is the first one that
        has "acceptably fast" I/O.

        1. I am told that applications written for a PPC can run on the Intel
        mac. The translation is done using "Rosetta." Applications will probably
        run much slower, but they will run. Hence you are able to run the PPC
        compiled version of sac 100.0 from March 2005 on your intel mac.

        Version 100.1 that came out in July 2005 has command-line editing using
        the libedit package. Libedit has at least one dynamically loaded library.
        It would be interesting to see if that version, compiled on a PPC, could
        run on the intel mac. That version can be gotten from IRIS by the same
        procedure as you got 100.0.

        2. I do not think the emulation capabilities goes to the extent of
        libraries, like sacio.a. That is, sacio.a built on a PPC cannot be used
        to build programs on an intel mac. In addition to the endian difference,
        one has to use a Fortran compiler configured with a gcc 3 compiler, as
        that binary version of sac 100.0 was built using gcc 3. George Hellfrich
        sent a link to a URL that should allow you to build a g77 that is
        configured with gcc 3, but that will not help you until you get a sacio.a
        library built on an intel mac.

        3. An earlier posting reported failure in an attempt to build sac from
        sources on an intel mac. Researchers at IRIS are looking into this.

        4. I have a PPC with 10.4.7. I am using gcc 3.3 and g77 configured with
        gcc 3.4.6. I am told that g77 will not be supported in the future so that
        one will eventually need to go to gfortran. Hence my question above about
        the source of gfortran configured with gcc 4.2 (experimental). I think
        there is no getting around the fact that one needs a sacio.a built
        with the same level of gcc (3 or 4) as your Fortran compiler -- and with
        the same endian.

        Not sure how much help this is. If you or anyone else see flaws with what
        I have written, please share.

        Arthur

        • Georgia Cua
          2006-08-21 01:50:47
          Dear Arthur and others who've posted on my question regarding intel
          mac, fortran, and sac,

          Thanks very much for the recent posts on this topic.

          It is very useful for me to know that sacio.a should not work on the
          intel mac. (As I wasn't sure whether the problems were with the
          compilers I was using.)

          I will try sac version 100.1, and will write the list about whether
          it works or not on the intel mac.

          I got my gfortran compiler from http://hpc.sourceforge.net.

          The installation instructions are pretty straighforward (just
          download and untar).

          It did not work for me immediately upon installation. At first, I got
          the following errors:

          gfortran hello.f90
          /usr/bin/ld: Undefined symbols:
          ___dso_handle
          collect2: ld returned 1 exit status

          I googled these errors, and tried updating my cctools, as suggested
          in the help listings on this site: http://gcc.gnu.org/ml/gcc-bugs/
          2006-04/msg00895.html.

          There is a link for cctools for darwin on: http://gcc.gnu.org/ml/gcc/
          2006-03/msg00507.html

          gfortran seemed to work for me after this (or at least, compiled a
          simple hello world program)

          Thanks again,
          Georgia



          On Aug 19, 2006, at 6:53 PM, Arthur Snoke wrote:

          Georgia,

          Before I get to your question/situation, please share where you got
          your gfortran compiler from. I am told that this version is the
          first one that has "acceptably fast" I/O.

          1. I am told that applications written for a PPC can run on the
          Intel mac. The translation is done using "Rosetta." Applications
          will probably run much slower, but they will run. Hence you are
          able to run the PPC compiled version of sac 100.0 from March 2005
          on your intel mac.

          Version 100.1 that came out in July 2005 has command-line editing
          using the libedit package. Libedit has at least one dynamically
          loaded library. It would be interesting to see if that version,
          compiled on a PPC, could run on the intel mac. That version can be
          gotten from IRIS by the same procedure as you got 100.0.

          2. I do not think the emulation capabilities goes to the extent of
          libraries, like sacio.a. That is, sacio.a built on a PPC cannot be
          used to build programs on an intel mac. In addition to the endian
          difference, one has to use a Fortran compiler configured with a gcc
          3 compiler, as that binary version of sac 100.0 was built using gcc
          3. George Hellfrich sent a link to a URL that should allow you to
          build a g77 that is configured with gcc 3, but that will not help
          you until you get a sacio.a library built on an intel mac.

          3. An earlier posting reported failure in an attempt to build sac
          from sources on an intel mac. Researchers at IRIS are looking into
          this.

          4. I have a PPC with 10.4.7. I am using gcc 3.3 and g77
          configured with gcc 3.4.6. I am told that g77 will not be
          supported in the future so that one will eventually need to go to
          gfortran. Hence my question above about the source of gfortran
          configured with gcc 4.2 (experimental). I think there is no
          getting around the fact that one needs a sacio.a built with the
          same level of gcc (3 or 4) as your Fortran compiler -- and with the
          same endian.

          Not sure how much help this is. If you or anyone else see flaws
          with what I have written, please share.

          Arthur



          -----------------------------
          Dr. Georgia Cua
          Swiss Seismological Service
          Institute of Geophysics
          ETH Hoenggerberg HPP P
          CH-8093 Zurich
          Switzerland

          Tel: +41-044-633-7574
          Fax: +41-044-633-1065

          georgia.cua<at>sed.ethz.ch
          -----------------------------



02:48:07 v.22510d55