You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/04/14 09:45:05 UTC

[GitHub] [incubator-doris] xwj924195077 opened a new issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope

xwj924195077 opened a new issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope 
URL: https://github.com/apache/incubator-doris/issues/3317
 
 
   本地环境和docker镜像编译be都出现了如下问题:
   
   1、【系统信息】:
   gcc: version 7.3.1 20180303
   system: CentOS Linux release 7.7.1908 (Core)
   lsb_release:  core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
   vim-common: vim-common-7.4.629-6.el7.x86_64
   
   2、【操作步骤】:
   
   1、拉去docker环境镜像, docker pull apachedoris/doris-dev:build-env
   2、 在本地下载源码   git clone https://github.com/apache/incubator-doris.git
   3、进入docker容器
    docker run -it --name doris-dev-test11 -v /path/to/incubator-doris/:/var/local/incubator-doris/ apachedoris/doris-dev:build-env
   4、执行 sh build.sh --be --clean,此时会报错build.sh: line 41: /var/local/thirdparty/build-thirdparty.sh: No such file or directory
   5、执行cp thirdparty/*.sh //var/local/thirdparty,上述错误解决
   
   3、【开始编译】:
   
   1、编译到be的udf模块时报错:
   [  0%] Generating ir cross compile metadata.
   Generating IR description files
   [  0%] Built target gen_ir_descriptions
   Scanning dependencies of target Exprs
   [  0%] Building CXX object src/udf/CMakeFiles/Udf.dir/udf.cpp.o
   [  0%] Building CXX object src/agent/CMakeFiles/Agent.dir/agent_server.cpp.o
   [  0%] Building CXX object src/exprs/CMakeFiles/Exprs.dir/base64.cpp.o
   [  0%] Building CXX object src/exprs/CMakeFiles/Exprs.dir/encryption_functions.cpp.o
   [  0%] Building CXX object src/udf/CMakeFiles/Udf.dir/udf_ir.cpp.o
   [  0%] Linking CXX static library libUdf.a
   [  0%] Built target Udf
   Scanning dependencies of target Common
   [  0%] Building CXX object src/common/CMakeFiles/Common.dir/daemon.cpp.o
   [  0%] Building CXX object src/exprs/CMakeFiles/Exprs.dir/aggregate_functions.cpp.o
   [  0%] Building CXX object src/common/CMakeFiles/Common.dir/status.cpp.o
   [  0%] Building CXX object src/common/CMakeFiles/Common.dir/resource_tls.cpp.o
   [  1%] Building CXX object src/common/CMakeFiles/Common.dir/logconfig.cpp.o
   [  1%] Building CXX object src/agent/CMakeFiles/Agent.dir/heartbeat_server.cpp.o
   /root/incubator-doris-0.11.0-rc01/be/src/common/logconfig.cpp: In function ‘bool doris::init_glog(const char*, bool)’:
   /root/incubator-doris-0.11.0-rc01/be/src/common/logconfig.cpp:68:5: error: ‘FLAGS_log_filenum_quota’ was not declared in this scope
        FLAGS_log_filenum_quota = config::sys_log_roll_num;
        ^~~~~~~~~~~~~~~~~~~~~~~
   /root/incubator-doris-0.11.0-rc01/be/src/common/logconfig.cpp:99:9: error: ‘FLAGS_log_split_method’ was not declared in this scope
            FLAGS_log_split_method = "day";
            ^~~~~~~~~~~~~~~~~~~~~~
   /root/incubator-doris-0.11.0-rc01/be/src/common/logconfig.cpp:102:9: error: ‘FLAGS_log_split_method’ was not declared in this scope
            FLAGS_log_split_method = "hour";
            ^~~~~~~~~~~~~~~~~~~~~~
   /root/incubator-doris-0.11.0-rc01/be/src/common/logconfig.cpp:105:9: error: ‘FLAGS_log_split_method’ was not declared in this scope
            FLAGS_log_split_method = "size";
            ^~~~~~~~~~~~~~~~~~~~~~
   make[2]: *** [src/common/CMakeFiles/Common.dir/logconfig.cpp.o] Error 1
   make[1]: *** [src/common/CMakeFiles/Common.dir/all] Error 2
   
   
   2、执行  cat be/build/CMakeFiles/CMakeError.log 查看错误日志
   Determining if the pthread_create exist failed with the following output:
   Change Dir: /root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp
   
   Run Build Command:"/usr/bin/gmake" "cmTC_eef17/fast"
   /usr/bin/gmake -f CMakeFiles/cmTC_eef17.dir/build.make CMakeFiles/cmTC_eef17.dir/build
   gmake[1]: Entering directory `/root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp'
   Building C object CMakeFiles/cmTC_eef17.dir/CheckSymbolExists.c.o
   /opt/rh/devtoolset-7/root/usr/bin/../bin/gcc    -o CMakeFiles/cmTC_eef17.dir/CheckSymbolExists.c.o   -c /root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
   Linking C executable cmTC_eef17
   /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eef17.dir/link.txt --verbose=1
   /opt/rh/devtoolset-7/root/usr/bin/../bin/gcc      -rdynamic CMakeFiles/cmTC_eef17.dir/CheckSymbolExists.c.o  -o cmTC_eef17
   CMakeFiles/cmTC_eef17.dir/CheckSymbolExists.c.o: In function `main':
   CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
   collect2: error: ld returned 1 exit status
   gmake[1]: *** [cmTC_eef17] Error 1
   gmake[1]: Leaving directory `/root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp'
   gmake: *** [cmTC_eef17/fast] Error 2
   
   File /root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
   /* */
   #include <pthread.h>
   
   int main(int argc, char** argv)
   {
     (void)argv;
   #ifndef pthread_create
     return ((int*)(&pthread_create))[argc];
   #else
     (void)argc;
     return 0;
   #endif
   }
   
   Determining if the function pthread_create exists in the pthreads failed with the following output:
   Change Dir: /root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp
   
   Run Build Command:"/usr/bin/gmake" "cmTC_ee1f7/fast"
   /usr/bin/gmake -f CMakeFiles/cmTC_ee1f7.dir/build.make CMakeFiles/cmTC_ee1f7.dir/build
   gmake[1]: Entering directory `/root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp'
   Building C object CMakeFiles/cmTC_ee1f7.dir/CheckFunctionExists.c.o
   /opt/rh/devtoolset-7/root/usr/bin/../bin/gcc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_ee1f7.dir/CheckFunctionExists.c.o   -c /usr/local/share/cmake-3.12/Modules/CheckFunctionExists.c
   Linking C executable cmTC_ee1f7
   /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ee1f7.dir/link.txt --verbose=1
   /opt/rh/devtoolset-7/root/usr/bin/../bin/gcc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_ee1f7.dir/CheckFunctionExists.c.o  -o cmTC_ee1f7 -lpthreads
   
   - /opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: cannot find -lpthreads
   
   collect2: error: ld returned 1 exit status
   gmake[1]: *** [cmTC_ee1f7] Error 1
   gmake[1]: Leaving directory `/root/incubator-doris-0.11.0-rc01/be/build/CMakeFiles/CMakeTmp'
   gmake: *** [cmTC_ee1f7/fast] Error 2
   
   
   Ok
   
   
   通过分析日志了解到,可能是gcc7 不支持lpthreads,尝试将gcc的版本降到 5.x、6.x,但是依然报同样的问题
   
   
   麻烦帮忙看一下,谢谢!
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xwj924195077 commented on issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope and x86_64-redhat-linux/7/ld: cannot find -lpthreads

Posted by GitBox <gi...@apache.org>.
xwj924195077 commented on issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope   and   x86_64-redhat-linux/7/ld: cannot find -lpthreads
URL: https://github.com/apache/incubator-doris/issues/3317#issuecomment-613765144
 
 
   OK,thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] xwj924195077 closed issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope and x86_64-redhat-linux/7/ld: cannot find -lpthreads

Posted by GitBox <gi...@apache.org>.
xwj924195077 closed issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope   and   x86_64-redhat-linux/7/ld: cannot find -lpthreads
URL: https://github.com/apache/incubator-doris/issues/3317
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] imay commented on issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope and x86_64-redhat-linux/7/ld: cannot find -lpthreads

Posted by GitBox <gi...@apache.org>.
imay commented on issue #3317: 编译be ‘FLAGS_log_split_method’ was not declared in this scope   and   x86_64-redhat-linux/7/ld: cannot find -lpthreads
URL: https://github.com/apache/incubator-doris/issues/3317#issuecomment-613410637
 
 
   @xwj924195077 
   1. should pull env1.2`docker pull apachedoris/doris-dev:build-env-1.2`
   
   2. When you build Doris in docker, your command `docker run -it --name doris-dev-test11 -v /path/to/incubator-doris/:/var/local/incubator-doris/ apachedoris/doris-dev:build-env` your volume map override Doris's installed third-party. You can map to another path other than **/var/local/**

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org