- 论坛徽章:
- 4
|
Wty:修改
Wty:修改的是storage 和tracker 下面的makefile.freebsd
一直编译不过去
有解决的办法吗
不会必须将系统做到6以下把???
happy_fish100:我这边没有bsd7的编译环境。去掉-lc_r后,能否把错误信息重新贴一下啊?你上面贴的貌似不对啊。
Makefile.freebsd中,你进行如下设置
LIB_PATH = -L/usr/local/lib -lpthread
试试能否编译通过。
Wty:你看看错在哪里了 谢谢
storage 下makefile.freebsd
.SUFFIXES: .c .o
COMPILE = $(CC) -Wall -O2 -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD
#COMPILE = $(CC) -Wall -g -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD -D__DEBUG__
INC_PATH = -I../common -I../tracker -I/usr/local/include
LIB_PATH = -L/usr/local/lib -lpthread
TARGET_PATH = /usr/local/bin
COMMON_LIB =
SHARED_OBJS = ../common/hash.o ../common/fdfs_define.o ../common/chain.o \
../common/shared_func.o ../common/ini_file_reader.o \
../common/logger.o ../common/sockopt.o ../common/fdfs_global.o \
../common/fdfs_base64.o \
../tracker/tracker_proto.o tracker_client_thread.o \
storage_global.o storage_func.o storage_service.o \
storage_sync.o
ALL_OBJS = $(SHARED_OBJS)
ALL_PRGS = fdfs_storaged
all: $(ALL_OBJS) $(ALL_PRGS)
.o:
$(COMPILE) -o $@ $< $(SHARED_OBJS) $(COMMON_LIB) $(LIB_PATH) $(INC_PATH)
.c:
$(COMPILE) -o $@ $< $(ALL_OBJS) $(COMMON_LIB) $(LIB_PATH) $(INC_PATH)
.c.o:
$(COMPILE) -c -o $@ $< $(INC_PATH)
install:
cp -f $(ALL_PRGS) $(TARGET_PATH)
clean:
rm -f $(ALL_OBJS) $(ALL_PRGS)
tracker 下makefile.freebsd
.SUFFIXES: .c .o
COMPILE = $(CC) -Wall -O2 -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD
#COMPILE = $(CC) -Wall -g -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD -D__DEBUG__
INC_PATH = -I../common -I../tracker -I/usr/local/include
LIB_PATH = -L/usr/local/lib -lpthread
TARGET_PATH = /usr/local/bin
COMMON_LIB =
SHARED_OBJS = ../common/hash.o ../common/fdfs_define.o ../common/chain.o \
../common/shared_func.o ../common/ini_file_reader.o \
../common/logger.o ../common/sockopt.o ../common/fdfs_global.o \
tracker_proto.o tracker_mem.o tracker_service.o \
tracker_global.o tracker_func.o
ALL_OBJS = $(SHARED_OBJS)
ALL_PRGS = fdfs_trackerd
all: $(ALL_OBJS) $(ALL_PRGS)
.o:
$(COMPILE) -o $@ $< $(SHARED_OBJS) $(COMMON_LIB) $(LIB_PATH) $(INC_PATH)
.c:
$(COMPILE) -o $@ $< $(ALL_OBJS) $(COMMON_LIB) $(LIB_PATH) $(INC_PATH)
.c.o:
$(COMPILE) -c -o $@ $< $(INC_PATH)
install:
cp -f $(ALL_PRGS) $(TARGET_PATH)
clean:
rm -f $(ALL_OBJS) $(ALL_PRGS)
编译出错信息
cc -Wall -O2 -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD -o fdfs_trackerd fdfs_trackerd.c ../common/hash.o ../common/fdfs_define.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o tracker_proto.o tracker_mem.o tracker_service.o tracker_global.o tracker_func.o -L/usr/local/lib -lpthread -I../common -I../tracker -I/usr/local/include
fdfs_trackerd.c: In function 'main':
fdfs_trackerd.c:188: warning: cast to pointer from integer of different size
cc -Wall -O2 -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD -o fdfs_storaged fdfs_storaged.c ../common/hash.o ../common/fdfs_define.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o ../common/fdfs_base64.o ../tracker/tracker_proto.o tracker_client_thread.o storage_global.o storage_func.o storage_service.o storage_sync.o -L/usr/local/lib -lpthread -I../common -I../tracker -I/usr/local/include
fdfs_storaged.c: In function 'main':
fdfs_storaged.c:249: warning: cast to pointer from integer of different size
cc -Wall -O2 -D_FILE_OFFSET_BITS=64 -DOS_FREEBSD -o fdfs_monitor fdfs_monitor.c ../common/hash.o ../common/fdfs_define.o ../common/chain.o ../common/shared_func.o ../common/ini_file_reader.o ../common/logger.o ../common/sockopt.o ../common/fdfs_global.o ../common/fdfs_base64.o ../tracker/tracker_proto.o tracker_client.o client_func.o client_global.o storage_client.o -L/usr/local/lib -lc_r -I../common -I../tracker -I/usr/local/include
fdfs_monitor.c: In function 'main':
fdfs_monitor.c:86: warning: format '%lld' expects type 'long long int', but argument 4 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 7 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 8 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 9 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 10 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 11 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 12 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 13 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 14 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 15 has type 'int64_t'
fdfs_monitor.c:140: warning: format '%lld' expects type 'long long int', but argument 16 has type 'int64_t'
/usr/bin/ld: cannot find -lc_r
*** Error code 1
Stop in /dist/FastDFS/client.
错误好像是一样的 |
|