标题: okapis:fastDFS 1.8在64位freebsd7.0下编译出错 [打印本页] 作者: happy_fish100 时间: 2009-02-21 09:54 标题: okapis:fastDFS 1.8在64位freebsd7.0下编译出错 okapis:freebsd6.*可以正常编译通过,在7.0下编译出错,
错误信息如下:
# ./make.sh -f Makefile.freebsd
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 -lc_r -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
/usr/bin/ld: cannot find -lc_r
*** Error code 1
Stop in /dist/FastDFS/tracker.
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 -lc_r -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
/usr/bin/ld: cannot find -lc_r
*** Error code 1
Stop in /dist/FastDFS/storage.
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作者: happy_fish100 时间: 2009-02-21 09:57 标题: 动态库的问题 happy_fish100:我在FreeBSD 4.11上测试通过的。看来BSD 7上没有动态库libc_r.so了。你试试修改一下Makefile,将-lc_r 删除后试试能否编译通过。
okapis:还是编译出错
删除以后 依然编译不通过
happy_fish100:什么出错信息呢,能否贴上来看看?
okapis:错误信息和上次是一样的
这个全部的出错信息 freebsd6编译通过
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 -lc_r -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
/usr/bin/ld: cannot find -lc_r
*** Error code 1
Stop in /dist/FastDFS/tracker.
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 -lc_r -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
/usr/bin/ld: cannot find -lc_r
*** Error code 1
Stop in /dist/FastDFS/storage.
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
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