compilation issues.

Forums

Hello,
I am getting linking problems after al the compilations have taken place. Specifically, I get the following message upon running make:
Any help would be appreciated.

g77 -O3 -s -fomit-frame-pointer -Wall -falign-functions=4 \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-w -c rmeasure.f
g77 -O3 -s -fomit-frame-pointer -Wall -falign-functions=4 \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-w -c iof.f
gcc -O3 -DPROTOTYPE -Dalliant -D_FILE_OFFSET_BITS=64 \
-D_LARGEFILE_SOURCE -w -c ioc.c
g77 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
rmeasure.o iof.o ioc.o -o rmeasure.exe
rmeasure.o: In function `MAIN__':
rmeasure.f:(.text+0x1116b): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x11237): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x1123e): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x113e3): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x113fa): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x1142c): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x11462): relocation truncated to fit: R_X86_64_32S against `.bss'
rmeasure.f:(.text+0x11a82): relocation truncated to fit: R_X86_64_32 against `.bss'
rmeasure.f:(.text+0x11aec): relocation truncated to fit: R_X86_64_32 against `.bss'
iof.o: In function `teste2_':
iof.f:(.text+0x87): relocation truncated to fit: R_X86_64_32 against symbol `endian_' defined in COMMON section in iof.o
iof.f:(.text+0xb3): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
make: *** [rmeasure.exe] Error 1

A similar problem was discussed in the previous post: The problem you experience most likely has to do with insufficient memory on your machine. Open the file rmeasure.f and locate the line

PARAMETER (NN1=1000,NBIN=100)

near the top.

Change the value for NN1 (here 1000) to a smaller value (for example 500). NN1 must be equal to or bigger than the dimensions of your structure you want to run the program on. Then recompile.

This problem will go away in a future release of rmeasure, when the memory allocation is done dynamically.

I've got the same error message, I solved it without changing the value for NN1, but using the fortran option -mcmodel=medium while compiling (I've used gfortran-4.2, Linux).

cheers,
Mauro

this is my makefile:

rmeasure.exe: rmeasure.o iof.o ioc.o
gfortran-4.2 -D_FILE_OFFSET_BITS=64 -mcmodel=medium -D_LARGEFILE_SOURCE \
rmeasure.o iof.o ioc.o -o rmeasure
\rm *.o

rmeasure.o: rmeasure.f
gfortran-4.2 -O3 -s -mcmodel=medium -fomit-frame-pointer -Wall -falign-functions=4 \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-w -c rmeasure.f

iof.o: iof.f
gfortran-4.2 -O3 -s -mcmodel=medium -fomit-frame-pointer -Wall -falign-functions=4 \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-w -c iof.f

ioc.o: ioc.c
gcc -O3 -DPROTOTYPE -Dalliant -D_FILE_OFFSET_BITS=64 \
-D_LARGEFILE_SOURCE -w -c ioc.c