Talk:SDCard Testing

From OLPC
Revision as of 13:28, 14 May 2012 by 84.176.188.209 (talk) (Created page with 'Flashbench does not compile on 12.04 64bit: <blockquote> flashbench/dev.c:35: undefined reference to `clock_gettime' collect2: ld returned 1 exit status </blockquote> To fix th…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Flashbench does not compile on 12.04 64bit:

flashbench/dev.c:35: undefined reference to `clock_gettime' collect2: ld returned 1 exit status

To fix this, the flag -lrt has to go at the end of the linking line of flashbench, ie

diff --git a/Makefile b/Makefile index 8fbd119..4c04f5e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC  := gcc -CFLAGS := -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-paramet -LDFLAGS := -lrt +CFLAGS := -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-paramet +LDFLAGS :=

all: flashbench erase

@@ -8,7 +8,7 @@ dev.o: dev.c dev.h vm.o: vm.c vm.h dev.h flashbench.o: flashbench.c vm.h dev.h

-flashbench: flashbench.o dev.o vm.o +flashbench: flashbench.o dev.o vm.o -lrt

erase: erase.o