Merge pull request #25727 from taosdata/fix/xftan/TD-29988-3.0
fix: build fails on macOS and Windows
This commit is contained in:
commit
56a1e7e01f
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
# xz
|
# xz
|
||||||
|
|
||||||
if (${TD_LINUX})
|
|
||||||
ExternalProject_Add(xz
|
ExternalProject_Add(xz
|
||||||
GIT_REPOSITORY https://github.com/xz-mirror/xz.git
|
GIT_REPOSITORY https://github.com/xz-mirror/xz.git
|
||||||
GIT_TAG v5.4.4
|
GIT_TAG v5.4.4
|
||||||
|
@ -13,5 +11,4 @@ ExternalProject_Add(xz
|
||||||
BUILD_COMMAND ""
|
BUILD_COMMAND ""
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
TEST_COMMAND ""
|
TEST_COMMAND ""
|
||||||
)
|
)
|
||||||
endif()
|
|
|
@ -2,7 +2,6 @@
|
||||||
# zlib
|
# zlib
|
||||||
|
|
||||||
|
|
||||||
if (${TD_LINUX})
|
|
||||||
ExternalProject_Add(zlib
|
ExternalProject_Add(zlib
|
||||||
GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git
|
GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git
|
||||||
GIT_TAG v1.2.11
|
GIT_TAG v1.2.11
|
||||||
|
@ -14,4 +13,3 @@ ExternalProject_Add(zlib
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
TEST_COMMAND ""
|
TEST_COMMAND ""
|
||||||
)
|
)
|
||||||
endif()
|
|
||||||
|
|
|
@ -250,6 +250,10 @@ target_include_directories(
|
||||||
|
|
||||||
# zlib
|
# zlib
|
||||||
set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in")
|
set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in")
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=deprecated-non-prototype")
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=deprecated-non-prototype")
|
||||||
|
endif(${TD_DARWIN})
|
||||||
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
zlibstatic
|
zlibstatic
|
||||||
|
|
|
@ -270,7 +270,7 @@ typedef struct SStoreMeta {
|
||||||
int32_t (*putCachedTableList)(void* pVnode, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload,
|
int32_t (*putCachedTableList)(void* pVnode, uint64_t suid, const void* pKey, int32_t keyLen, void* pPayload,
|
||||||
int32_t payloadLen, double selectivityRatio);
|
int32_t payloadLen, double selectivityRatio);
|
||||||
|
|
||||||
void* (*storeGetIndexInfo)();
|
void* (*storeGetIndexInfo)(void *pVnode);
|
||||||
void* (*getInvertIndex)(void* pVnode);
|
void* (*getInvertIndex)(void* pVnode);
|
||||||
// support filter and non-filter cases. [vnodeGetCtbIdList & vnodeGetCtbIdListByFilter]
|
// support filter and non-filter cases. [vnodeGetCtbIdList & vnodeGetCtbIdListByFilter]
|
||||||
int32_t (*getChildTableList)(void* pVnode, int64_t suid, SArray* list);
|
int32_t (*getChildTableList)(void* pVnode, int64_t suid, SArray* list);
|
||||||
|
|
|
@ -22,7 +22,11 @@ extern "C" {
|
||||||
|
|
||||||
typedef wchar_t TdWchar;
|
typedef wchar_t TdWchar;
|
||||||
typedef int32_t TdUcs4;
|
typedef int32_t TdUcs4;
|
||||||
|
#if !defined(DISALLOW_NCHAR_WITHOUT_ICONV) && defined(DARWIN)
|
||||||
|
#include "iconv.h"
|
||||||
|
#else
|
||||||
typedef void *iconv_t;
|
typedef void *iconv_t;
|
||||||
|
#endif
|
||||||
typedef enum { M2C = 0, C2M } ConvType;
|
typedef enum { M2C = 0, C2M } ConvType;
|
||||||
|
|
||||||
// If the error is in a third-party library, place this header file under the third-party library header file.
|
// If the error is in a third-party library, place this header file under the third-party library header file.
|
||||||
|
|
|
@ -23,13 +23,6 @@ target_link_libraries(
|
||||||
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
PRIVATE os util common transport monitor nodes parser command planner catalog scheduler function qcom geometry
|
||||||
)
|
)
|
||||||
|
|
||||||
if(TD_DARWIN_ARM64)
|
|
||||||
target_link_libraries(
|
|
||||||
taos
|
|
||||||
PRIVATE "-arch x86_64"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TD_WINDOWS)
|
if(TD_WINDOWS)
|
||||||
INCLUDE_DIRECTORIES(jni/windows)
|
INCLUDE_DIRECTORIES(jni/windows)
|
||||||
INCLUDE_DIRECTORIES(jni/windows/win32)
|
INCLUDE_DIRECTORIES(jni/windows/win32)
|
||||||
|
|
|
@ -738,7 +738,7 @@ static int32_t hbGetUserAuthInfo(SClientHbKey *connKey, SHbParam *param, SClient
|
||||||
_return:
|
_return:
|
||||||
releaseTscObj(connKey->tscRid);
|
releaseTscObj(connKey->tscRid);
|
||||||
if (code) {
|
if (code) {
|
||||||
tscError("hb got user auth info failed since %s", terrstr(code));
|
tscError("hb got user auth info failed since %s", tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -37,7 +37,7 @@ static void smProcessWriteQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO
|
||||||
dTrace("msg:%p, get from snode-write queue", pMsg);
|
dTrace("msg:%p, get from snode-write queue", pMsg);
|
||||||
int32_t code = sndProcessWriteMsg(pMgmt->pSnode, pMsg, NULL);
|
int32_t code = sndProcessWriteMsg(pMgmt->pSnode, pMsg, NULL);
|
||||||
if (code < 0) {
|
if (code < 0) {
|
||||||
dGError("snd, msg:%p failed to process write since %s", pMsg, terrstr(code));
|
dGError("snd, msg:%p failed to process write since %s", pMsg, tstrerror(code));
|
||||||
if (pMsg->info.handle != NULL) {
|
if (pMsg->info.handle != NULL) {
|
||||||
tmsgSendRsp(pMsg);
|
tmsgSendRsp(pMsg);
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ static void smProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
|
||||||
dTrace("msg:%p, get from snode-stream queue", pMsg);
|
dTrace("msg:%p, get from snode-stream queue", pMsg);
|
||||||
int32_t code = sndProcessStreamMsg(pMgmt->pSnode, pMsg);
|
int32_t code = sndProcessStreamMsg(pMgmt->pSnode, pMsg);
|
||||||
if (code < 0) {
|
if (code < 0) {
|
||||||
dGError("snd, msg:%p failed to process stream msg %s since %s", pMsg, TMSG_INFO(pMsg->msgType), terrstr(code));
|
dGError("snd, msg:%p failed to process stream msg %s since %s", pMsg, TMSG_INFO(pMsg->msgType), tstrerror(code));
|
||||||
smSendRsp(pMsg, terrno);
|
smSendRsp(pMsg, terrno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void vmProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
if (terrno != 0) code = terrno;
|
if (terrno != 0) code = terrno;
|
||||||
dGError("vgId:%d, msg:%p failed to process stream msg %s since %s", pVnode->vgId, pMsg, TMSG_INFO(pMsg->msgType),
|
dGError("vgId:%d, msg:%p failed to process stream msg %s since %s", pVnode->vgId, pMsg, TMSG_INFO(pMsg->msgType),
|
||||||
terrstr(code));
|
tstrerror(code));
|
||||||
vmSendRsp(pMsg, code);
|
vmSendRsp(pMsg, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
|
||||||
case QUERY_QUEUE:
|
case QUERY_QUEUE:
|
||||||
code = vnodePreprocessQueryMsg(pVnode->pImpl, pMsg);
|
code = vnodePreprocessQueryMsg(pVnode->pImpl, pMsg);
|
||||||
if (code) {
|
if (code) {
|
||||||
dError("vgId:%d, msg:%p preprocess query msg failed since %s", pVnode->vgId, pMsg, terrstr(code));
|
dError("vgId:%d, msg:%p preprocess query msg failed since %s", pVnode->vgId, pMsg, tstrerror(code));
|
||||||
} else {
|
} else {
|
||||||
dGTrace("vgId:%d, msg:%p put into vnode-query queue", pVnode->vgId, pMsg);
|
dGTrace("vgId:%d, msg:%p put into vnode-query queue", pVnode->vgId, pMsg);
|
||||||
taosWriteQitem(pVnode->pQueryQ, pMsg);
|
taosWriteQitem(pVnode->pQueryQ, pMsg);
|
||||||
|
@ -219,13 +219,13 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
|
||||||
if (!vmDataSpaceSufficient(pVnode)) {
|
if (!vmDataSpaceSufficient(pVnode)) {
|
||||||
terrno = TSDB_CODE_NO_ENOUGH_DISKSPACE;
|
terrno = TSDB_CODE_NO_ENOUGH_DISKSPACE;
|
||||||
code = terrno;
|
code = terrno;
|
||||||
dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code));
|
dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, tstrerror(code));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pMsg->msgType == TDMT_VND_SUBMIT && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) {
|
if (pMsg->msgType == TDMT_VND_SUBMIT && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) {
|
||||||
terrno = TSDB_CODE_VND_NO_WRITE_AUTH;
|
terrno = TSDB_CODE_VND_NO_WRITE_AUTH;
|
||||||
code = terrno;
|
code = terrno;
|
||||||
dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code));
|
dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, tstrerror(code));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pMsg->msgType != TDMT_VND_ALTER_CONFIRM && pVnode->disable) {
|
if (pMsg->msgType != TDMT_VND_ALTER_CONFIRM && pVnode->disable) {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
# vnode
|
# vnode
|
||||||
add_subdirectory(src/tqCommon)
|
add_subdirectory(src/tqCommon)
|
||||||
add_library(vnode STATIC "")
|
add_library(vnode STATIC "")
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
target_compile_options(vnode PRIVATE -Wno-error=single-bit-bitfield-constant-conversion)
|
||||||
|
endif(${TD_DARWIN})
|
||||||
set(
|
set(
|
||||||
VNODE_SOURCE_FILES
|
VNODE_SOURCE_FILES
|
||||||
"src/vnd/vnodeOpen.c"
|
"src/vnd/vnodeOpen.c"
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
aux_source_directory(src EXECUTOR_SRC)
|
aux_source_directory(src EXECUTOR_SRC)
|
||||||
|
|
||||||
add_library(executor STATIC ${EXECUTOR_SRC})
|
add_library(executor STATIC ${EXECUTOR_SRC})
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
target_compile_options(executor PRIVATE -Wno-error=deprecated-non-prototype)
|
||||||
|
endif(${TD_DARWIN})
|
||||||
|
|
||||||
target_link_libraries(executor
|
target_link_libraries(executor
|
||||||
PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry
|
PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry
|
||||||
|
|
|
@ -484,7 +484,7 @@ int32_t doInitAggInfoSup(SAggSupporter* pAggSup, SqlFunctionCtx* pCtx, int32_t n
|
||||||
|
|
||||||
if (!osTempSpaceAvailable()) {
|
if (!osTempSpaceAvailable()) {
|
||||||
code = TSDB_CODE_NO_DISKSPACE;
|
code = TSDB_CODE_NO_DISKSPACE;
|
||||||
qError("Init stream agg supporter failed since %s, key:%s, tempDir:%s", terrstr(code), pKey, tsTempDir);
|
qError("Init stream agg supporter failed since %s, key:%s, tempDir:%s", tstrerror(code), pKey, tsTempDir);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -549,7 +549,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
||||||
|
|
||||||
if (!pInfo->pCur || !pInfo->pSchema) {
|
if (!pInfo->pCur || !pInfo->pSchema) {
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
qError("sysTableScanUserCols failed since %s", terrstr(terrno));
|
qError("sysTableScanUserCols failed since %s", terrstr());
|
||||||
blockDataDestroy(pDataBlock);
|
blockDataDestroy(pDataBlock);
|
||||||
pInfo->loadInfo.totalRows = 0;
|
pInfo->loadInfo.totalRows = 0;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -842,7 +842,7 @@ void udfdGetFuncBodyPath(const SUdf *udf, char *path) {
|
||||||
int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) {
|
int32_t udfdSaveFuncBodyToFile(SFuncInfo *pFuncInfo, SUdf *udf) {
|
||||||
if (!osDataSpaceAvailable()) {
|
if (!osDataSpaceAvailable()) {
|
||||||
terrno = TSDB_CODE_NO_DISKSPACE;
|
terrno = TSDB_CODE_NO_DISKSPACE;
|
||||||
fnError("udfd create shared library failed since %s", terrstr(terrno));
|
fnError("udfd create shared library failed since %s", terrstr());
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,7 @@ target_include_directories(
|
||||||
PUBLIC "${TD_SOURCE_DIR}/include/libs/monitorfw"
|
PUBLIC "${TD_SOURCE_DIR}/include/libs/monitorfw"
|
||||||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
||||||
)
|
)
|
||||||
|
if(${TD_DARWIN})
|
||||||
|
target_compile_options(monitorfw PRIVATE -Wno-error=deprecated-pragma)
|
||||||
|
endif(${TD_DARWIN})
|
||||||
target_link_libraries(monitorfw os util common transport)
|
target_link_libraries(monitorfw os util common transport)
|
||||||
|
|
|
@ -463,7 +463,7 @@ _DEL_WAL:
|
||||||
pSyncNode->snapshottingIndex, lastApplyIndex);
|
pSyncNode->snapshottingIndex, lastApplyIndex);
|
||||||
} else {
|
} else {
|
||||||
sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64,
|
sNError(pSyncNode, "wal snapshot begin error since:%s, index:%" PRId64 ", last apply index:%" PRId64,
|
||||||
terrstr(terrno), pSyncNode->snapshottingIndex, lastApplyIndex);
|
terrstr(), pSyncNode->snapshottingIndex, lastApplyIndex);
|
||||||
atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID);
|
atomic_store_64(&pSyncNode->snapshottingIndex, SYNC_INDEX_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ static void shellWriteHistory();
|
||||||
static void shellPrintError(TAOS_RES *tres, int64_t st);
|
static void shellPrintError(TAOS_RES *tres, int64_t st);
|
||||||
static bool shellIsCommentLine(char *line);
|
static bool shellIsCommentLine(char *line);
|
||||||
static void shellSourceFile(const char *file);
|
static void shellSourceFile(const char *file);
|
||||||
static bool shellGetGrantInfo();
|
static bool shellGetGrantInfo(char* buf);
|
||||||
|
|
||||||
static void shellCleanup(void *arg);
|
static void shellCleanup(void *arg);
|
||||||
static void *shellCancelHandler(void *arg);
|
static void *shellCancelHandler(void *arg);
|
||||||
|
|
Loading…
Reference in New Issue