Dear PGI developers,
I am trying to compile a 32-bit application on a 64-bit machine. For the fortran files I do not have any problem, but I do have problems for the C files (I have only two C files). The compilation runs OK when I do not use any “–m32” specification flags, i.e. “gcc –v –m32” or “pgcc –tp k8-32”; but as you might know, I get a “SEGMENTATION FAULT” error message when running the executables.
Then, I tried to incorporate “-m32” specification flags for either the gcc or the pgcc compilers. But at this point, the compilation stops with the following error message:
/usr/bin/ld: warning: i386 architecture of input file
.//libzindo.a(xalloc.o)' is incompatible with i386:x86-64 output .//libzindo.a(matrix.o): In function matrix_’:
matrix.o(.text+0x419): undefined reference to `xalloc_’
make: *** [zindo1] Error 2
My Makefile archive is very simple, but I just cannot make to work for my two C files.
Make file for maintaining INDO on the SUN
FC = pgf90
FFLAGS = -fast
FFLAGS2 = -fast
CC = pgcc -tp k8-32
CFLAGS = -fast
#CC = gcc -v -m32
#CFLAGS = -O3 -v -m32
LDFLAGS = -L./
PGM = zindo1
FLIB = zindo
MAINO = zindo.o
I am using a PGI 5.1 compiler on an AMD opteron processor. Any ideas or comments will be greatly appreciated.