pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.77k stars 21.33k forks source link

compilation error #757

Open jihwanK opened 6 years ago

jihwanK commented 6 years ago

Hi, I just tried to run a makefile but I got this errors:

gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o
cc1: error: invalid option argument '-Ofast'
cc1: warning: unrecognized command line option "-Wno-unused-result"
make: *** [obj/gemm.o] Error 1
AmmarkoV commented 6 years ago

Open your Makefile in root directory and change line OPTS=-Ofast to OPTS=-O0

Also out of curiosity what gcc version are you using ( what is the output of gcc --version ? )

loary commented 6 years ago

Also encountered this problem, my GCC is 4.4.7, the modified make other problems: gcc -Iinclude/ -Isrc/ -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -O0 -c ./src/gemm.c -o obj/gemm.o Putting child 0x011c7f20 (obj/gemm.o) PID 16820 on the chain. Live child 0x011c7f20 (obj/gemm.o) PID 16820 In file included from ./src/utils.h:5, from ./src/gemm.c:2: include/darknet.h:495: error: redefinition of typedef ‘network’ compilation terminated due to -Wfatal-errors. Reaping losing child 0x011c7f20 PID 16820 make: *** [obj/gemm.o] Error 1

yhx0105 commented 5 years ago

oh! I also met the probelm,Did you solve it?

baimin1 commented 5 years ago

me too . I fix it by using:

yum groupinstall "Development Tools"

then gcc (GCC) 4.8.2 can do it.