-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
我的系统是:
root@raspberry:/home/TDengine/debug# uname -a Linux raspberry 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
我的gcc是:
root@raspberry:/home/TDengine/debug# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/8/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=i686-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-targets=all --enable-multiarch --disable-werror --with-arch-32=i686 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 8.3.0 (Debian 8.3.0-6)
我的cmake是:
`root@raspberry:/home/TDengine/debug# cmake --version
cmake version 3.13.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).`
我下载了最新源码,然后执行
mkdir debug && cd debug cmake .. -DCPUTYPE=aarch32 && cmake --build .
各种报错:
`In file included from /home/TDengine/src/os/inc/os.h:54,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osDir.h:25:38: error: unknown type name ‘mode_t’
int taosMkDir(const char pathname, mode_t mode);
^~~~~~
/home/TDengine/src/os/inc/osDir.h:27:43: error: unknown type name ‘int32_t’
void taosRemoveOldLogFiles(char rootDir, int32_t keepDays);
^~~~~~~
/home/TDengine/src/os/inc/osDir.h:28:1: error: unknown type name ‘int32_t’
int32_t taosCompressFile(char srcFileName, char destFileName);
^~~~~~~
In file included from /home/TDengine/src/os/inc/os.h:55,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osFile.h:23:1: error: unknown type name ‘ssize_t’
ssize_t taosTReadImp(int fd, void buf, size_t count);
^~~~~~~
/home/TDengine/src/os/inc/osFile.h:23:41: error: unknown type name ‘size_t’
ssize_t taosTReadImp(int fd, void buf, size_t count);
^~~~~~
/home/TDengine/src/os/inc/osFile.h:23:41: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osFile.h:1:1:
+#include <stddef.h>
/
/home/TDengine/src/os/inc/osFile.h:23:41:
ssize_t taosTReadImp(int fd, void buf, size_t count);
^~~~~~
/home/TDengine/src/os/inc/osFile.h:24:1: error: unknown type name ‘ssize_t’
ssize_t taosTWriteImp(int fd, void buf, size_t count);
^~~~~~~
/home/TDengine/src/os/inc/osFile.h:24:42: error: unknown type name ‘size_t’
ssize_t taosTWriteImp(int fd, void buf, size_t count);
^~~~~~
/home/TDengine/src/os/inc/osFile.h:24:42: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osFile.h:26:1: error: unknown type name ‘ssize_t’
ssize_t taosTSendFileImp(int dfd, int sfd, off_t offset, size_t size);
^~~~~~~
/home/TDengine/src/os/inc/osFile.h:26:44: error: unknown type name ‘off_t’
ssize_t taosTSendFileImp(int dfd, int sfd, off_t offset, size_t size);
^~~~~
/home/TDengine/src/os/inc/osFile.h:26:59: error: unknown type name ‘size_t’
ssize_t taosTSendFileImp(int dfd, int sfd, off_t offset, size_t size);
^~~~~~
/home/TDengine/src/os/inc/osFile.h:26:59: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osFile.h:27:26: error: unknown type name ‘FILE’
int taosFSendFileImp(FILE out_file, FILE in_file, int64_t offset, int32_t count);
^~~~
/home/TDengine/src/os/inc/osFile.h:27:26: note: ‘FILE’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
/home/TDengine/src/os/inc/osFile.h:1:1:
+#include <stdio.h>
/
/home/TDengine/src/os/inc/osFile.h:27:26:
int taosFSendFileImp(FILE out_file, FILE in_file, int64_t offset, int32_t count);
^~~~
/home/TDengine/src/os/inc/osFile.h:27:42: error: unknown type name ‘FILE’
int taosFSendFileImp(FILE out_file, FILE in_file, int64_t offset, int32_t count);
^~~~
/home/TDengine/src/os/inc/osFile.h:27:42: note: ‘FILE’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
/home/TDengine/src/os/inc/osFile.h:27:57: error: unknown type name ‘int64_t’
int taosFSendFileImp(FILE out_file, FILE* in_file, int64_t* offset, int32_t count);
^~~~~~~
/home/TDengine/src/os/inc/osFile.h:27:74: error: unknown type name ‘int32_t’
int taosFSendFileImp(FILE* out_file, FILE* in_file, int64_t* offset, int32_t count);
^~~~~~~
/home/TDengine/src/os/inc/osFile.h:54:1: error: unknown type name ‘int32_t’
int32_t taosFileRename(char *fullPath, char *suffix, char delimiter, char **dstPath);
^~~~~~~
In file included from /home/TDengine/src/os/inc/osMemory.h:19,
from /home/TDengine/src/os/inc/os.h:58,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osString.h:45:3: error: unknown type name ‘int64_t’
int64_t tsosStr2int64(char *str);
^~~~~~~
/home/TDengine/src/os/inc/osString.h:49:1: error: unknown type name ‘int32_t’
int32_t taosUcs4ToMbs(void *ucs4, int32_t ucs4_max_len, char *mbs);
^~~~~~~
/home/TDengine/src/os/inc/osString.h:49:35: error: unknown type name ‘int32_t’
int32_t taosUcs4ToMbs(void *ucs4, int32_t ucs4_max_len, char *mbs);
^~~~~~~
/home/TDengine/src/os/inc/osString.h:50:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t *len);
^~~~
_Bool
/home/TDengine/src/os/inc/osString.h:50:34: error: unknown type name ‘size_t’
bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t len);
^~~~~~
/home/TDengine/src/os/inc/osString.h:50:34: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osString.h:1:1:
+#include <stddef.h>
/
/home/TDengine/src/os/inc/osString.h:50:34:
bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t *len);
^~~~~~
/home/TDengine/src/os/inc/osString.h:50:62: error: unknown type name ‘int32_t’
bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t *len);
^~~~~~~
/home/TDengine/src/os/inc/osString.h:50:84: error: unknown type name ‘size_t’
bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t *len);
^~~~~~
/home/TDengine/src/os/inc/osString.h:50:84: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osString.h:52:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosValidateEncodec(const char *encodec);
^~~~
_Bool
In file included from /home/TDengine/src/os/inc/os.h:58,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osMemory.h:31:53: error: unknown type name ‘bool’; did you mean ‘_Bool’?
void taosSetAllocMode(int mode, const char *path, bool autoDump);
^~~~
_Bool
/home/TDengine/src/os/inc/osMemory.h:34:20: error: unknown type name ‘size_t’
void * taosTMalloc(size_t size);
^~~~~~
/home/TDengine/src/os/inc/osMemory.h:34:20: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osMemory.h:20:1:
+#include <stddef.h>
/home/TDengine/src/os/inc/osMemory.h:34:20:
void * taosTMalloc(size_t size);
^~~~~~
/home/TDengine/src/os/inc/osMemory.h:35:20: error: unknown type name ‘size_t’
void * taosTCalloc(size_t nmemb, size_t size);
^~~~~~
/home/TDengine/src/os/inc/osMemory.h:35:20: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osMemory.h:35:34: error: unknown type name ‘size_t’
void * taosTCalloc(size_t nmemb, size_t size);
^~~~~~
/home/TDengine/src/os/inc/osMemory.h:35:34: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osMemory.h:36:32: error: unknown type name ‘size_t’
void * taosTRealloc(void ptr, size_t size);
^~~~~~
/home/TDengine/src/os/inc/osMemory.h:36:32: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osMemory.h:38:1: error: unknown type name ‘size_t’
size_t taosTSizeof(void ptr);
^~~~~~
/home/TDengine/src/os/inc/osMemory.h:38:1: note: ‘size_t’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
In file included from /home/TDengine/src/os/inc/os.h:59,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osRand.h:24:1: error: unknown type name ‘uint32_t’
uint32_t taosRand(void);
^~~~~~~~
/home/TDengine/src/os/inc/osRand.h:25:29: error: unknown type name ‘int32_t’
void taosRandStr(char str, int32_t size);
^~~~~~~
/home/TDengine/src/os/inc/osRand.h:26:1: error: unknown type name ‘uint32_t’
uint32_t taosSafeRand(void);
^~~~~~~~
In file included from /home/TDengine/src/os/inc/os.h:60,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osSemphone.h:24:18: error: unknown type name ‘sem_t’; did you mean ‘tsem_t’?
#define tsem_t sem_t
^~~~~
/home/TDengine/src/os/inc/osSemphone.h:26:17: note: in expansion of macro ‘tsem_t’
int tsem_wait(tsem_t sem);
^~~~~~
/home/TDengine/src/os/inc/osSemphone.h:32:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosCheckPthreadValid(pthread_t thread);
^~~~
_Bool
/home/TDengine/src/os/inc/osSemphone.h:32:28: error: unknown type name ‘pthread_t’
bool taosCheckPthreadValid(pthread_t thread);
^~~~~~~~~
/home/TDengine/src/os/inc/osSemphone.h:33:1: error: unknown type name ‘int64_t’
int64_t taosGetPthreadId();
^~~~~~~
/home/TDengine/src/os/inc/osSemphone.h:34:23: error: unknown type name ‘pthread_t’
void taosResetPthread(pthread_t *thread);
^~~~~~~~~
/home/TDengine/src/os/inc/osSemphone.h:35:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosComparePthread(pthread_t first, pthread_t second);
^~~~
_Bool
/home/TDengine/src/os/inc/osSemphone.h:35:25: error: unknown type name ‘pthread_t’
bool taosComparePthread(pthread_t first, pthread_t second);
^~~~~~~~~
/home/TDengine/src/os/inc/osSemphone.h:35:42: error: unknown type name ‘pthread_t’
bool taosComparePthread(pthread_t first, pthread_t second);
^~~~~~~~~
In file included from /home/TDengine/src/os/inc/os.h:61,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osSocket.h:70:1: error: unknown type name ‘uint32_t’
uint32_t taosInetAddr(char *ipAddr);
^~~~~~~~
/home/TDengine/src/os/inc/osSocket.h:71:33: error: ‘struct in_addr’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
const char *taosInetNtoa(struct in_addr ipInt);
^~~~~~~
In file included from /home/TDengine/src/os/inc/os.h:63,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osSysinfo.h:25:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetProcIO(float *readKB, float *writeKB);
^~~~
_Bool
/home/TDengine/src/os/inc/osSysinfo.h:26:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetBandSpeed(float *bandSpeedKb);
^~~~
_Bool
/home/TDengine/src/os/inc/osSysinfo.h:27:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetDisk();
^~~~
_Bool
/home/TDengine/src/os/inc/osSysinfo.h:28:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetCpuUsage(float *sysCpuUsage, float *procCpuUsage) ;
^~~~
_Bool
/home/TDengine/src/os/inc/osSysinfo.h:29:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetProcMemory(float *memoryUsedMB) ;
^~~~
_Bool
/home/TDengine/src/os/inc/osSysinfo.h:30:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetSysMemory(float *memoryUsedMB);
^~~~
_Bool
/home/TDengine/src/os/inc/osSysinfo.h:34:1: error: unknown type name ‘bool’; did you mean ‘_Bool’?
bool taosGetSystemUid(char *uid);
^~~~
_Bool
In file included from /home/TDengine/src/os/inc/os.h:64,
from /home/TDengine/src/os/src/linux/linuxEnv.c:17:
/home/TDengine/src/os/inc/osTime.h: In function ‘taosGetTimestampMs’:
/home/TDengine/src/os/inc/osTime.h:39:18: error: storage size of ‘systemTime’ isn’t known
struct timeval systemTime;
^~~~~~~~~~
/home/TDengine/src/os/inc/osTime.h:40:3: error: implicit declaration of function ‘gettimeofday’ [-Werror=implicit-function-declaration]
gettimeofday(&systemTime, NULL);
^~~~~~~~~~~~
/home/TDengine/src/os/inc/osTime.h:40:29: error: ‘NULL’ undeclared (first use in this function)
gettimeofday(&systemTime, NULL);
^~~~
/home/TDengine/src/os/inc/osTime.h:40:29: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osTime.h:25:1:
+#include <stddef.h>
/home/TDengine/src/os/inc/osTime.h:40:29:
gettimeofday(&systemTime, NULL);
^~~~
/home/TDengine/src/os/inc/osTime.h:40:29: note: each undeclared identifier is reported only once for each function it appears in
/home/TDengine/src/os/inc/osTime.h:39:18: error: unused variable ‘systemTime’ [-Werror=unused-variable]
struct timeval systemTime;
^~~~~~~~~~
/home/TDengine/src/os/inc/osTime.h: In function ‘taosGetTimestampUs’:
/home/TDengine/src/os/inc/osTime.h:46:18: error: storage size of ‘systemTime’ isn’t known
struct timeval systemTime;
^~~~~~~~~~
/home/TDengine/src/os/inc/osTime.h:47:29: error: ‘NULL’ undeclared (first use in this function)
gettimeofday(&systemTime, NULL);
^~~~
/home/TDengine/src/os/inc/osTime.h:47:29: note: ‘NULL’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
/home/TDengine/src/os/inc/osTime.h:46:18: error: unused variable ‘systemTime’ [-Werror=unused-variable]
struct timeval systemTime;
^~~~~~~~~~
/home/TDengine/src/os/src/linux/linuxEnv.c: In function ‘osInit’:
/home/TDengine/src/os/src/linux/linuxEnv.c:31:5: error: implicit declaration of function ‘strcpy’ [-Werror=implicit-function-declaration]
strcpy(configDir, "/etc/taos");
^~~~~~
/home/TDengine/src/os/src/linux/linuxEnv.c:31:5: error: incompatible implicit declaration of built-in function ‘strcpy’ [-Werror]
/home/TDengine/src/os/src/linux/linuxEnv.c:31:5: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
/home/TDengine/src/os/src/linux/linuxEnv.c:19:1:
+#include <string.h>
/home/TDengine/src/os/src/linux/linuxEnv.c:31:5:
strcpy(configDir, "/etc/taos");
^~~~~~
/home/TDengine/src/os/src/linux/linuxEnv.c:33:3: error: incompatible implicit declaration of built-in function ‘strcpy’ [-Werror]
strcpy(tsDataDir, "/var/lib/taos");
^~~~~~
/home/TDengine/src/os/src/linux/linuxEnv.c:33:3: note: include ‘<string.h>’ or provide a declaration of ‘strcpy’
cc1: all warnings being treated as errors
make[2]: *** [src/os/src/linux/CMakeFiles/os.dir/build.make:66: src/os/src/linux/CMakeFiles/os.dir/linuxEnv.c.o] Error 1
make[2]: Leaving directory '/home/TDengine/debug'
make[1]: *** [CMakeFiles/Makefile2:650: src/os/src/linux/CMakeFiles/os.dir/all] Error 2
make[1]: Leaving directory '/home/TDengine/debug'
make: *** [Makefile:155: all] Error 2`