Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TDengine/src/util/src/ttime.c:252:3: 错误:隐式声明函数‘timegm’ [-Werror=implicit-function-declaration] #2023

Closed
sunyikeji opened this issue May 25, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@sunyikeji
Copy link

Performance Issue
最新源码编译问题:
TDengine/src/util/src/ttime.c:252:3: 错误:隐式声明函数‘timegm’ [-Werror=implicit-function-declaration]

Problem Description
gmake[2]: 进入目录“/home/develop/opensource/taosdata/TDengine/build”
/usr/bin/cmake -E cmake_progress_report /home/develop/opensource/taosdata/TDengine/build/CMakeFiles
[ 9%] Building C object src/util/CMakeFiles/tutil.dir/src/ttime.c.o
cd /home/develop/opensource/taosdata/TDengine/build/src/util && /usr/bin/cc -DLINUX -DUSE_LIBICONV -D_LIBC_REENTRANT -D_M_X64 -D_REENTRANT -D__USE_POSIX -g -std=gnu99 -Wall -Werror -fPIC -malign-double -g3 -gdwarf-2 -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -O0 -DDEBUG -I/home/develop/opensource/taosdata/TDengine/src/os/linux/inc -I/home/develop/opensource/taosdata/TDengine/src/inc -I/home/develop/opensource/taosdata/TDengine/src/util/inc -I/home/develop/opensource/taosdata/TDengine/src/common/inc -I/home/develop/opensource/taosdata/TDengine/deps/cJson/inc -I/home/develop/opensource/taosdata/TDengine/deps/lz4/inc -o CMakeFiles/tutil.dir/src/ttime.c.o -c /home/develop/opensource/taosdata/TDengine/src/util/src/ttime.c
/home/develop/opensource/taosdata/TDengine/src/util/src/ttime.c: 在函数‘parseTimeWithTz’中:
/home/develop/opensource/taosdata/TDengine/src/util/src/ttime.c:252:3: 错误:隐式声明函数‘timegm’ [-Werror=implicit-function-declaration]
int64_t seconds = timegm(&tm);
^
cc1: all warnings being treated as errors
gmake[2]: *** [src/util/CMakeFiles/tutil.dir/src/ttime.c.o] 错误 1
gmake[2]: 离开目录“/home/develop/opensource/taosdata/TDengine/build”
gmake[1]: *** [src/util/CMakeFiles/tutil.dir/all] 错误 2
gmake[1]: 离开目录“/home/develop/opensource/taosdata/TDengine/build”
gmake: *** [all] 错误 2

To Reproduce
cd build
cmake ..
cmake --build .

@sunyikeji sunyikeji added the performance Performance-related questions label May 25, 2020
@sunyikeji
Copy link
Author

cd /home/develop/opensource/taosdata/TDengine/build/src/client && /usr/bin/cc -DLINUX -D_LIBC_REENTRANT -D_M_X64 -D_REENTRANT -D__USE_POSIX -Dtaos_EXPORTS -g -std=gnu99 -Wall -Werror -fPIC -malign-double -g3 -gdwarf-2 -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -O0 -DDEBUG -fPIC -I/home/develop/opensource/taosdata/TDengine/src/client/inc -I/home/develop/opensource/taosdata/TDengine/src/client/jni -I/home/develop/opensource/taosdata/TDengine/src/inc -I/home/develop/opensource/taosdata/TDengine/src/util/inc -I/home/develop/opensource/taosdata/TDengine/src/query/inc -I/home/develop/opensource/taosdata/TDengine/src/common/inc -I/src/inc -I/home/develop/opensource/taosdata/TDengine/src/os/linux/inc -I/home/develop/opensource/taosdata/TDengine/deps/jni/linux -I/home/develop/opensource/taosdata/TDengine/deps/lz4/inc -o CMakeFiles/taos.dir/src/tscSQLParser.c.o -c /home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c
In file included from /home/develop/opensource/taosdata/TDengine/src/query/inc/qast.h:24:0,
from /home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c:20:
/home/develop/opensource/taosdata/TDengine/src/util/inc/tskiplist.h:119:3: 错误:未知的类型名‘pthread_rwlock_t’
pthread_rwlock_t *lock;
^
In file included from /home/develop/opensource/taosdata/TDengine/src/query/inc/qExecutor.h:20:0,
from /home/develop/opensource/taosdata/TDengine/src/client/inc/tsclient.h:33,
from /home/develop/opensource/taosdata/TDengine/src/client/inc/tscSecondaryMerge.h:27,
from /home/develop/opensource/taosdata/TDengine/src/client/inc/tscUtil.h:31,
from /home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c:27:
/home/develop/opensource/taosdata/TDengine/src/util/inc/hash.h:57:3: 错误:未知的类型名‘pthread_rwlock_t’
pthread_rwlock_t *lock;
^
/home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c: 在函数‘tscSetTableId’中:
/home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c:698:5: 错误:隐式声明函数‘strdup’ [-Werror=implicit-function-declaration]
oldName = strdup(pTableMetaInfo->name);
^
/home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c:698:15: 错误:隐式声明与内建函数‘strdup’不兼容 [-Werror]
oldName = strdup(pTableMetaInfo->name);
^
/home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c: 在函数‘setTableCondForSTableQuery’中:
/home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c:3557:43: 错误:隐式声明与内建函数‘strdup’不兼容 [-Werror]
pQueryInfo->tagCond.tbnameCond.cond = strdup(str);
^
/home/develop/opensource/taosdata/TDengine/src/client/src/tscSQLParser.c:3606:41: 错误:隐式声明与内建函数‘strdup’不兼容 [-Werror]
pQueryInfo->tagCond.tbnameCond.cond = strdup(str);
^
cc1: all warnings being treated as errors
gmake[2]: *** [src/client/CMakeFiles/taos.dir/src/tscSQLParser.c.o] 错误 1
gmake[2]: 离开目录“/home/develop/opensource/taosdata/TDengine/build”
gmake[1]: *** [src/client/CMakeFiles/taos.dir/all] 错误 2
gmake[1]: 离开目录“/home/develop/opensource/taosdata/TDengine/build”
gmake: *** [all] 错误 2

@sangshuduo
Copy link
Contributor

Please let us know what your platform is and what version your compiler is. Thanks.

1 similar comment
@sangshuduo
Copy link
Contributor

Please let us know what your platform is and what version your compiler is. Thanks.

@sunyikeji
Copy link
Author

CentOS Linux release 7.6.1810 (Core)
3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright © 2015 Free Software Foundation, Inc.

@sangshuduo
Copy link
Contributor

@sunyikeji may I know which branch and last commit id?

@sunyikeji
Copy link
Author

git branch -a

  • develop
    remotes/origin/1.6
    remotes/origin/HEAD -> origin/develop
    remotes/origin/beta/v1.6.5.3
    remotes/origin/beta/v1.6.6.2
    remotes/origin/bug/td-225
    remotes/origin/bugfix/bailongma
    remotes/origin/coverity_scan
    remotes/origin/develop
    remotes/origin/develop_lihui
    remotes/origin/enhance/sequence
    remotes/origin/feature/change commit log implementation #1259
    remotes/origin/feature/2.0tsdb
    remotes/origin/feature/add-insert-test-to-2.0
    remotes/origin/feature/add-tag-and-alter-table-cases
    remotes/origin/feature/add_tbname_in_tsdb
    remotes/origin/feature/affectrows
    remotes/origin/feature/blm-bugfix
    remotes/origin/feature/changshuaiqiang/testcase
    remotes/origin/feature/crash_gen
    remotes/origin/feature/dockerfile
    remotes/origin/feature/dropdnode
    remotes/origin/feature/fixbinary
    remotes/origin/feature/lastrow
    remotes/origin/feature/liaohj
    remotes/origin/feature/liaohj_v2
    remotes/origin/feature/msync
    remotes/origin/feature/pytest-output-sql-command-to-file
    remotes/origin/feature/query
    remotes/origin/feature/rate
    remotes/origin/feature/subscribe
    remotes/origin/feature/tagschema
    remotes/origin/feature/tbname
    remotes/origin/feature/td154
    remotes/origin/feature/tliu
    remotes/origin/feature/tliufixbug
    remotes/origin/filterComboTest
    remotes/origin/hotfix/生成visualstudio解决方案出错 #521
    remotes/origin/hotfix/TSDB error: too many sessions on server导致无法使用 #523
    remotes/origin/hotfix/blm_prometheus
    remotes/origin/hotfix/boundary
    remotes/origin/hotfix/chang
    remotes/origin/hotfix/duplicate_key
    remotes/origin/hotfix/fix-TD-160
    remotes/origin/hotfix/fix_valgrind_warning
    remotes/origin/hotfix/grant
    remotes/origin/hotfix/heartbeat
    remotes/origin/hotfix/mem_leak
    remotes/origin/hotfix/mgmt
    remotes/origin/hotfix/move_header
    remotes/origin/hotfix/refactor_tsdb_h
    remotes/origin/hotfix/sangshuduo/add-case-to-test-insert-then-import
    remotes/origin/hotfix/sangshuduo/remove-extra-case-list-output
    remotes/origin/hotfix/sync
    remotes/origin/hotfix/taos-tools
    remotes/origin/hotfix/tcpClient
    remotes/origin/hotfix/xyl
    remotes/origin/liaohj_2
    remotes/origin/master
    remotes/origin/newmaster/lihui
    remotes/origin/patch/exception
    remotes/origin/patch/exiting
    remotes/origin/patch/td-317
    remotes/origin/patch/td-376
    remotes/origin/querytest
    remotes/origin/release/v1.6.5.4
    remotes/origin/release/v1.6.5.5
    remotes/origin/release/v1.6.5.6
    remotes/origin/release/v1.6.5.7
    remotes/origin/revert-2008-feature/mqtt
    remotes/origin/v1.6.5.8
    remotes/origin/v1.6.5.9

commit ad590b0
Merge: 282d298 77ef030
Author: Shengliang Guan slguan@taosdata.com
Date: Mon May 25 09:59:37 2020 +0800

Merge pull request #2022 from taosdata/hotfix/sync

getFileInfo bug

commit 77ef030
Author: Jeff Tao jhtao@taosdata.com
Date: Mon May 25 01:41:05 2020 +0000

getFileInfo bug

@sangshuduo sangshuduo added bug Something isn't working and removed performance Performance-related questions labels May 25, 2020
@sangshuduo
Copy link
Contributor

@sunyikeji thanks for your enthusiastic report. we will evaluate supporting earlier glibc like what CentOS 7 use.

1 similar comment
@sangshuduo
Copy link
Contributor

@sunyikeji thanks for your enthusiastic report. we will evaluate supporting earlier glibc like what CentOS 7 use.

@sangshuduo
Copy link
Contributor

@sunyikeji please git pull develop branch and check if it works now. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants