Thread: Library sacio.a in LINUX 64 bits

Started: 2007-04-18 02:30:07
Last activity: 2007-04-19 17:16:39
Topics: SAC Help
Juan Gomez
2007-04-18 02:30:07

Hi there,

Some people has succeeded to compile programs by adding -m32 when
the need to use sacio.a library.

I have tried to do it, but my compiler shows an incompatibility
between X64 and i386. Could someone suggest me how to fix my problem?

I'm adding the compiler message and the Makefile.

Thanks,

JuanM

Compilation message

g77 -g -fno-underscoring -c sacnab2007.f
g77 sacnab2007.o -lm -m32
-o /home/gomez/Bin/sacnab2007 /usr/local/Sac/lib/sacio.a
/usr/bin/ld: aviso: the input file architecture i386:x86-64
'sacnab2007.o' is not compatible with the output i386



Makefile
#######################################
SACLIB=/usr/local/Sac/lib/sacio.a
BIN = /home/gomez/Bin/sacnab2007
FFLAGS= $(FLOAT) -m32 -o

sacnab2007: sacnab2007.o
g77 sacnab2007.o -lm $(FFLAGS) $(BIN) $(SACLIB)

%.o: %.f
g77 -g -fno-underscoring -c $*.f


  • Frederik Tilmann
    2007-04-19 17:16:39
    Juan

    I think you have to give the -m32 option for all previous compilation
    steps (generation of .o files) as well.

    Frederik


    Juan M Gomez Gonzalez wrote:
    Hi there,

    Some people has succeeded to compile programs by adding -m32 when
    the need to use sacio.a library.

    I have tried to do it, but my compiler shows an incompatibility
    between X64 and i386. Could someone suggest me how to fix my problem?

    I'm adding the compiler message and the Makefile.

    Thanks,

    JuanM

    Compilation message

    g77 -g -fno-underscoring -c sacnab2007.f
    g77 sacnab2007.o -lm -m32
    -o /home/gomez/Bin/sacnab2007 /usr/local/Sac/lib/sacio.a
    /usr/bin/ld: aviso: the input file architecture i386:x86-64
    'sacnab2007.o' is not compatible with the output i386


    Makefile
    #######################################
    SACLIB=/usr/local/Sac/lib/sacio.a
    BIN = /home/gomez/Bin/sacnab2007
    FFLAGS= $(FLOAT) -m32 -o

    sacnab2007: sacnab2007.o
    g77 sacnab2007.o -lm $(FFLAGS) $(BIN) $(SACLIB)

    %.o: %.f
    g77 -g -fno-underscoring -c $*.f

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



    --
    Frederik Tilmann
    Bullard Laboratories Tel. +44 1223 765545
    Department of Earth Sciences Fax. +44 1223 360779
    University of Cambridge email: tilmann<at>esc.cam.ac.uk
    Madingley Road
    Cambridge CB3 0EZ
    UK




11:31:10 v.01697673