Hi all,
First off I'm new both to the forum and using gcc and gfortran, so I excuse for the newbie questions...
I'm trying to compile a UNIX program, specifically PEST (http://www.pesthomepage.org/Downloads.php for those interested), for OS X 10.6.3 using gfortran from gcc 4.3. I've been trying and failing now for a couple of days and I'm completely stuck at a problem related to the archtecture of files. I'm first using a c preprocessor, which is included in the source code, and then trying to compile the source. It returns the following error:
ld: warning: in pest.o, file is not of required architecture
ld: warning: in pestsub1.o, file is not of required architecture
ld: warning: in pestsub2.o, file is not of required architecture
... ...
I've tried to add -m32 flags to the gfortran command but it still returns the same errors as well as:
ld: warning: in /opt/local/lib/gcc43/gcc/x86_64-apple-darwin10/4.3.4/libgfortranbegin.a, file is not of required architecture
ld: warning: in /opt/local/lib/gcc43/libgfortran.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/gcc43/libgcc_s.10.5.dylib, missing required architecture i386 in file
ld: warning: in /opt/local/lib/gcc43/gcc/x86_64-apple-darwin10/4.3.4/libgcc.a, file is not of required architecture
From what I understand gfortran 4.3 is unable to work with 32 bit given the missing arch in the lib files, is that right? But why does the error of the .o files having bad arch appear both with flag -m32 and -m64? Is it possible at all to compile this source on OS X?
The flags used for the preprocessor is: -DUNIX -DFLUSHFILE -DSLEEP
and:
FFLAGS=-m64/32 -c -O0 -static
LDFLAGS=-m64/32
Any tips are welcome and appreciated!
Thanks
reeka
First off I'm new both to the forum and using gcc and gfortran, so I excuse for the newbie questions...
I'm trying to compile a UNIX program, specifically PEST (http://www.pesthomepage.org/Downloads.php for those interested), for OS X 10.6.3 using gfortran from gcc 4.3. I've been trying and failing now for a couple of days and I'm completely stuck at a problem related to the archtecture of files. I'm first using a c preprocessor, which is included in the source code, and then trying to compile the source. It returns the following error:
ld: warning: in pest.o, file is not of required architecture
ld: warning: in pestsub1.o, file is not of required architecture
ld: warning: in pestsub2.o, file is not of required architecture
... ...
I've tried to add -m32 flags to the gfortran command but it still returns the same errors as well as:
ld: warning: in /opt/local/lib/gcc43/gcc/x86_64-apple-darwin10/4.3.4/libgfortranbegin.a, file is not of required architecture
ld: warning: in /opt/local/lib/gcc43/libgfortran.dylib, file is not of required architecture
ld: warning: in /opt/local/lib/gcc43/libgcc_s.10.5.dylib, missing required architecture i386 in file
ld: warning: in /opt/local/lib/gcc43/gcc/x86_64-apple-darwin10/4.3.4/libgcc.a, file is not of required architecture
From what I understand gfortran 4.3 is unable to work with 32 bit given the missing arch in the lib files, is that right? But why does the error of the .o files having bad arch appear both with flag -m32 and -m64? Is it possible at all to compile this source on OS X?
The flags used for the preprocessor is: -DUNIX -DFLUSHFILE -DSLEEP
and:
FFLAGS=-m64/32 -c -O0 -static
LDFLAGS=-m64/32
Any tips are welcome and appreciated!
Thanks
reeka