c - file not recognized: File format not recognized -
when run make file error
"obj/viojournal.o: file not recognized: file format not recognized collect2: ld returned 1 exit status"
and make file follows
how fix problem. using gcc compiler on centos 5.4 linx 64bit machine.
all: libvioft.so fdump syncer cppflags = -i/usr/include/libxml2 -i../clogger -i../marshall -i../ddp \ -i../http -i../xml -i../nfsop -i../include/common -i../restful \ -i../include/onegrid cflags = -g3 -wall -wextra -fpic -dreplication_enabled -djournaling_enabled #cflags = -g3 -wall -wextra -fpic ldflags = -wl,-rpath=\$$origin -wl,-rpath=\$$origin/../clogger \ -wl,-rpath=\$$origin/../marshall -wl,-rpath=\$$origin/../ddp \ -wl,-rpath=\$$origin/../http -wl,-rpath=\$$origin/../xml \ -wl,-rpath=\$$origin/../restful libs = -lpthread -lssl -lxml2 -lbz2 -l../clogger -lclogger \ -l../marshall -lmarshall -l../ddp -lddp -l../nfsop -lnfsop libsources = filefs.c viojournal.c recvreplicaupdate.c syncer.c hostops.c filetable.c updateremoteft.c checkpoint.c #libsources = filefs.c viojournal.c hostops.c filetable.c checkpoint.c container.c locks.c libobjects = $(libsources:%.c=obj/%.o) fttestsources = fttest2.c fttestobjects = $(fttestsources:%.c=obj/%.o) syncersources = syncer.c syncerobjects = $(syncersources:%.c=obj/%.o) #dmpsources = viodump.c hostops.c #dmpobjects = $(dmpsources:%.c=obj/%.o) libvioft.so: $(libobjects) $(cc) $(cflags) -shared -o libvioft.so $(libobjects) fdump: $(fttestobjects) libvioft.so $(cc) $(cflags) $(ldflags) $(libs) -o fdump $(fttestobjects) syncer: $(syncerobjects) libvioft.so $(cc) $(cflags) $(ldflags) $(libs) -o syncer $(syncerobjects) viodump: $(dmpobjects) $(cc) $(cflags) $(ldflags) -lpthread -o viodump $(dmpobjects) clean: rm -rf fttest viodump atar syncer libvioft.so obj install: cp -f libvioft.so ../package/lib # cp -f syncer ../package/bin obj/%.d: %.c $(shell) -ec 'mkdir -p obj && $(cc) -mm $(cppflags) $(cflags) -mt $(@:.d=.o) -mt $@ $< > $@' obj/%.o: %.c $(cc) -c $(cppflags) $(cflags) -o $@ $< include $(libsources:%.c=obj/%.d) include $(tstsources:%.c=obj/%.d) include $(atrsources:%.c=obj/%.d) #include $(dmpsources:%.c=obj/%.d)
it seems object file corrupted somehow. try deleting force rebuilt or @devnull suggests, make clean
.
Comments
Post a Comment