Github user randerzander commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/13
  
    @benqiu2016 @apiri saw that this got committed to master.
    
    Unfortunately, I'm getting build errors that strcpy and strtok are not 
members of 'std'. Including some build environment info and the errors produced.
    
    [root@d0a671fc9da1 nifi-minifi-cpp]# gcc --version
    gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    [root@d0a671fc9da1 nifi-minifi-cpp]# g++ --version
    g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    [root@d0a671fc9da1 nifi-minifi-cpp]# yum install -y boost-devel 
libxml2-devel
    Loaded plugins: fastestmirror, ovl
    Loading mirror speeds from cached hostfile
     * base: mirrors.umflint.edu
     * extras: mirror.trouble-free.net
     * updates: mirrors.centos.webair.com
    Package boost-devel-1.53.0-25.el7.x86_64 already installed and latest 
version
    Package libxml2-devel-2.9.1-6.el7_2.3.x86_64 already installed and latest 
version
    Nothing to do
    [root@d0a671fc9da1 nifi-minifi-cpp]# make
    mkdir -p ./build
    mkdir -p ./target
    make -C thirdparty/uuid
    make[1]: Entering directory `/nifi-minifi-cpp/thirdparty/uuid'
    gcc -g -Wall -rdynamic  -O0 -ggdb -g3 -fexceptions -Wno-write-strings 
-fvisibility=hidden -fPIC -I.. ./tst_uuid.c  libuuid.a -o ./tst_uuid
    make[1]: Leaving directory `/nifi-minifi-cpp/thirdparty/uuid'
    g++ -Os -fexceptions -fpermissive -Wno-write-strings -std=c++11 -fPIC -Wall 
-g -Wno-unused-private-field -I./inc -I./src -I./test -I./thirdparty 
-I/usr/include/libxml2 -I./thirdparty/yaml-cpp-yaml-cpp-0.5.3/include -o 
build/ExecuteProcess.o -c src/ExecuteProcess.cpp
    src/ExecuteProcess.cpp: In member function 'virtual void 
ExecuteProcess::onTrigger(ProcessContext*, ProcessSession*)':
    src/ExecuteProcess.cpp:101:2: error: 'strcpy' is not a member of 'std'
      std::strcpy(cstr, _fullCommand.c_str());
      ^
    src/ExecuteProcess.cpp:101:2: note: suggested alternative:
    In file included from ./inc/TimeUtil.h:25:0,
                     from src/ExecuteProcess.cpp:20:
    /usr/include/string.h:125:14: note:   'strcpy'
     extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
                  ^
    src/ExecuteProcess.cpp:102:12: error: 'strtok' is not a member of 'std'
      char *p = std::strtok (cstr, " ");
                ^
    src/ExecuteProcess.cpp:102:12: note: suggested alternative:
    In file included from ./inc/TimeUtil.h:25:0,
                     from src/ExecuteProcess.cpp:20:
    /usr/include/string.h:344:14: note:   'strtok'
     extern char *strtok (char *__restrict __s, const char *__restrict __delim)
                  ^
    src/ExecuteProcess.cpp:108:7: error: 'strtok' is not a member of 'std'
       p = std::strtok(NULL, " ");
           ^
    src/ExecuteProcess.cpp:108:7: note: suggested alternative:
    In file included from ./inc/TimeUtil.h:25:0,
                     from src/ExecuteProcess.cpp:20:
    /usr/include/string.h:344:14: note:   'strtok'
     extern char *strtok (char *__restrict __s, const char *__restrict __delim)
                  ^
    src/ExecuteProcess.cpp:198:49: warning: comparison between signed and 
unsigned integer expressions [-Wsign-compare]
           if (numRead == (sizeof(buffer) - totalRead))
                                                     ^


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to