2 qq343675979 qq343675979 于 2013.12.05 23:08 提问

安装淘宝 TFS出现一些异常能帮忙看下吗谢谢

就是最后一个步骤

进入 tfs 目录
[root@locatfs local]# cd tfs/
[root@locatfs local]# chmod +x .sh
[root@locatfs local]# ./build.sh init
[root@locatfs local]# ./configure --prefix=/usr/local/tfs --without-tcmalloc
到这里都没问题

接下来 运行 make 的时候就出现问题了
Making all in src
make[1]: Entering directory /root/tfs-2.6.0/src'
Making all in common
make[2]: Entering directory
/root/tfs-2.6.0/src/common'
Making all in mysql_cluster
make[3]: Entering directory /root/tfs-2.6.0/src/common/mysql_cluster'
if g++ -DPACKAGE_NAME=\"tfs\" -DPACKAGE_TARNAME=\"tfs\" -DPACKAGE_VERSION=\"2.6.0\" -DPACKAGE_STRING=\"tfs\ 2.6.0\" -DPACKAGE_BUGREPORT=\"duolong@taobao.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"tfs\" -DVERSION=\"2.6.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_LIBC=1 -DHAVE_LIBDL=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBRT=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -DTFS_DS_FALLOCATE=0 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_ARPA_INET_H=1 -DHAVE_FCNTL_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_NETDB_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DTIME_WITH_SYS_TIME=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_STDLIB_H=1 -DHAVE_REALLOC=1 -DRETSIGTYPE=void -DHAVE_FDATASYNC=1 -DHAVE_FTRUNCATE=1 -DHAVE_GETHOSTBYNAME=1 -DHAVE_GETPAGESIZE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_MEMSET=1 -DHAVE_MKDIR=1 -DHAVE_MUNMAP=1 -DHAVE_RMDIR=1 -DHAVE_SOCKET=1 -DHAVE_STRCASECMP=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOUL=1 -DHAVE_STRTOULL=1 -DHAVE_TZSET=1 -DHAVE_MYSQL=1 -I. -I. -Wall -I../../../src -I/usr/local/include/tbsys -I/usr/local/include/tbnet -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -g -D__STDC_LIMIT_MACROS -Wall -Werror -Wextra -Wunused-parameter -Wformat -Wconversion -Wdeprecated -MT database_pool.o -MD -MP -MF ".deps/database_pool.Tpo" -c -o database_pool.o database_pool.cpp; \
then mv -f ".deps/database_pool.Tpo" ".deps/database_pool.Po"; else rm -f ".deps/database_pool.Tpo"; exit 1; fi
In file included from database_pool.cpp:16:
database_pool.h:18:19: error: tbsys.h: No such file or directory
database_pool.h:19:19: error: Mutex.h: No such file or directory
In file included from database_pool.h:20,
from database_pool.cpp:16:
../../../src/common/internal.h:34:19: error: tbnet.h: No such file or directory
In file included from database_pool.cpp:20:
mysql_database_helper.h:18:19: error: mysql.h: No such file or directory
../../../src/common/internal.h:471: error: ‘tbnet’ has not been declared
../../../src/common/internal.h:471: error: ISO C++ forbids declaration of ‘DataBuffer’ with no type
../../../src/common/internal.h:471: error: expected ‘;’ before ‘data_’
../../../src/common/internal.h: In member function ‘void tfs::common::TimeStat::start()’:
../../../src/common/internal.h:1211: error: ‘tbsys’ has not been declared
../../../src/common/internal.h: In member function ‘void tfs::common::TimeStat::end()’:
../../../src/common/internal.h:1212: error: ‘tbsys’ has not been declared
database_pool.h: At global scope:
database_pool.h:51: error: ‘tbutil’ has not been declared
database_pool.h:51: error: ISO C++ forbids declaration of ‘Mutex’ with no type
database_pool.h:51: error: expected ‘;’ before ‘mutex_’
mysql_database_helper.h:54: error: ISO C++ forbids declaration of ‘MYSQL_STMT’ with no type
mysql_database_helper.h:54: error: expected ‘;’ before ‘*’ token
mysql_database_helper.h:55: error: ‘MYSQL_BIND’ does not name a type
mysql_database_helper.h:65: error: ‘MYSQL’ does not name a type
mysql_database_helper.h:71: error: ‘MYSQL_STMT’ has not been declared
mysql_database_helper.h:81: error: ‘tbutil’ has not been declared
mysql_database_helper.h:81: error: ISO C++ forbids declaration of ‘Mutex’ with no type
mysql_database_helper.h:81: error: expected ‘;’ before ‘mutex_’
database_pool.cpp: In destructor ‘tfs::common::DataBasePool::~DataBasePool()’:
database_pool.cpp:36: error: ‘ERROR’ was not declared in this scope
database_pool.cpp:36: error: ‘TBSYS_LOG’ was not declared in this scope
database_pool.cpp: In member function ‘bool tfs::common::DataBasePool::init_pool(int32_t, const char*, const char*, const char*)’:
database_pool.cpp:65: error: ‘DEBUG’ was not declared in this scope
database_pool.cpp:66: error: ‘TBSYS_LOG’ was not declared in this scope
database_pool.cpp: In member function ‘bool tfs::common::DataBasePool::destroy_pool()’:
database_pool.cpp:90: error: ‘mysql_thread_end’ was not declared in this scope
database_pool.cpp: In member function ‘tfs::common::MysqlDatabaseHelper* tfs::common::DataBasePool::get()’:
database_pool.cpp:98: error: ‘ERROR’ was not declared in this scope
database_pool.cpp:98: error: ‘TBSYS_LOG’ was not declared in this scope
database_pool.cpp:105: error: ‘tbutil’ has not been declared
database_pool.cpp:105: error: expected
;' before ‘lock’
database_pool.cpp:123: error: ‘WARN’ was not declared in this scope
database_pool.cpp:123: error: ‘TBSYS_LOG’ was not declared in this scope
database_pool.cpp: In member function ‘void tfs::common::DataBasePool::release(tfs::common::MysqlDatabaseHelper
)’:
database_pool.cpp:132: error: ‘tbutil’ has not been declared
database_pool.cpp:132: error: expected ;' before ‘lock’
database_pool.cpp:143: error: ‘ERROR’ was not declared in this scope
database_pool.cpp:143: error: ‘TBSYS_LOG’ was not declared in this scope
make[3]: *** [database_pool.o] Error 1
make[3]: Leaving directory
/root/tfs-2.6.0/src/common/mysql_cluster'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /root/tfs-2.6.0/src/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
/root/tfs-2.6.0/src'
make: *** [all-recursive] Error 1
接下来就都是报错 能帮忙看下吗谢谢

3个回答

ft4729710
ft4729710   2015.04.14 13:37
已采纳

楼主解决了么?
我也报错。。。
make[3]: *** [install-pkgdata_dataDATA] Error 1
make[3]: Leaving directory /usr/local/tfs/scripts/ha'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory
/usr/local/tfs/scripts/ha'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/tfs/scripts'
make: *** [install-recursive] Error 1

qq_24636905
qq_24636905   2015.07.27 12:04

我也出现这错误了 咋整?

hijack00
hijack00   Rxr 2016.09.03 13:07

安装tfs之前需要先安装tb-common-utils,里面有tbnet和tbsys两个依赖库,此外,官方建议的编译器是gcc 4.1.2,使用高版本gcc可能会报语法错误。可以参考官方wiki或者网上博客

Csdn user default icon
上传中...
上传图片
插入图片