hjimce / darknet_mobilenet

mobilenet 与darknet yolo
Other
94 stars 52 forks source link

MAKE ERROR #3

Open BoXiao123 opened 7 years ago

BoXiao123 commented 7 years ago

Hi, @hjimce ,thanks to your amazing work. When I tried to make the darknet_mobilenet, I encountered the following issue: make: Warning: File 'libdarknet.so' has modification time 28073 s in the future gcc -Iinclude/ -Isrc/ -Wall -Wfatal-errors -fPIC -Ofast -c ./src/gemm.c -o obj/gemm.o gcc -Iinclude/ -Isrc/ -Wall -Wfatal-errors -fPIC -Ofast -c ./src/utils.c -o obj/utils.o ./src/utils.c: In function ‘fgetl’: ./src/utils.c:311:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(&line[curr], readsize, fp); ^ gcc -Iinclude/ -Isrc/ -Wall -Wfatal-errors -fPIC -Ofast -c ./src/cuda.c -o obj/cuda.o gcc -Iinclude/ -Isrc/ -Wall -Wfatal-errors -fPIC -Ofast -c ./src/deconvolutional_layer.c -o obj/deconvolutional_layer.o gcc -Iinclude/ -Isrc/ -Wall -Wfatal-errors -fPIC -Ofast -c ./src/depthwise_convolutional_layer.c -o obj/depthwise_convolutional_layer.o ./src/depthwise_convolutional_layer.c: In function ‘test_depthwise_convolutional_layer’: ./src/depthwise_convolutional_layer.c:325:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode for (int i = 0; i < net.n; ++i) { ^ compilation terminated due to -Wfatal-errors. Makefile:82: recipe for target 'obj/depthwise_convolutional_layer.o' failed make: *** [obj/depthwise_convolutional_layer.o] Error 1

Could you give me some suggestion?

BoXiao123 commented 7 years ago

I changed my g++ version from 4.9 to 5.0 and fixed this error. However, I had a new error during making: obj/classifier.o: In function threat_classifier': classifier.c:(.text+0x462b): undefined reference totimersub' obj/classifier.o: In function gun_classifier': classifier.c:(.text+0x4bec): undefined reference totimersub' obj/classifier.o: In function demo_classifier': classifier.c:(.text+0x4f92): undefined reference totimersub' collect2: error: ld returned 1 exit status Makefile:75: recipe for target 'darknet' failed make: *** [darknet] Error 1

sivagnanamn commented 6 years ago

@BoXiao123 timersub function was used by the author to calculate the difference between the start time & end time during prediction. You can comment out that line if you do not need the time taken (or) you can write a small function to find the time difference by yourself.