Gem5 – First Running Error

Today I builded Gem5 and tried to run it with my HPC application. First time I do it I got such error.

hatagem5-1

fatal: Object file is a dynamic executable however only static executables are supported! Please recompile your executable as a static binary and try again.

After searching this kind of error, I found someone who got similar one.

HI

I’m trying to run a c application of radix4 on gem5 simulator using SE mode. This is the link to the code:

http://gweep.net/~rocko/FFT/node6.html#SECTION00060000000000000000

i used this command to compile it :
gcc -c -static -Wall  fast_fourier_transform.c -lm -o fast_fourier_transform.o

then i used this command to run it :
build/ARM/gem5.opt configs/example/se.py -c /home/anoir/FFT\ work/FFT_opt_v2/fast_fourier_transform

and i’m getting this error:

gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the –copyright option for details.

gem5 compiled Jun  9 2016 12:22:14
gem5 started Jul  7 2016 18:53:41
gem5 executing on anoir-Lenovo-IdeaPad-Y510P
command line: build/ARM/gem5.opt configs/example/se.py -c ‘/home/anoir/FFT work/FFT_opt_v2/fast_fourier_transform’

Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
fatal: Object file is a dynamic executable however only static executables are supported!
       Please recompile your executable as a static binary and try again.
 @ tick 0
Answer of this mail !!!!!!!!!!!!!!!
Hi,


I’d think that the error is just what Gem5 says:

fatal: Object file is a dynamic executable however only static executables are supported!
       Please recompile your executable as a static binary and try again.

You can check that the executable is static by using file command:

file /home/anoir/FFT\ work/FFT_opt_v2/fast_fourier_transform

And it will tell you if your binary is “statically linked” or “dynamically linked”. If it’s dynamically linked then you should link your program using -static flag. The command line you provided for compilation


gcc -c -static -Wall  fast_fourier_transform.c -lm -o fast_fourier_transform.o
Is only for compilation phase. There should be a linking command that you didn’t provide and -static should be on that command line. This should compile and statically link your program:

gcc -static -Wall fast_fourier_transform.c -lm -o fast_fourier_transform

I handled the problem after I put -static compile command. However, I got another error.