You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/06/03 08:02:23 UTC

[GitHub] [iotdb] haozewu commented on issue #3315: Compile c++ client on "Tools: Thrift" FAILE

haozewu commented on issue #3315:
URL: https://github.com/apache/iotdb/issues/3315#issuecomment-853669819


   Now I change msvc to vs2019, but still have error.
   Error log looks like this:
   ```
   [INFO] Using local binaries
   -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
   -- Configuring thrift 0.13.0
   -- Setting C++11 as the default language level.
   -- To specify a different C++ language level, set CMAKE_CXX_STANDARD
   -- libevent NOT found.
   -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
   ```
   **Now I think the default thrift compile process make this error because of lacking in libevent and don't find libevent\*.lib in iotdb0.12.0 folder.**
   I find the config in `C:\x\iotdb-0.12.0\compile-tools\thrift\target\thrift-0.13.0\lib\cpp\3rdparty.props`
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     <ImportGroup Label="PropertySheets" />
     <PropertyGroup Label="UserMacros">
       <BOOST_ROOT>$(THIRD_PARTY)\boost\boost_1_47_0</BOOST_ROOT>
       <OPENSSL_ROOT_DIR>$(THIRD_PARTY)\openssl\OpenSSL-Win32</OPENSSL_ROOT_DIR>
       <LIBEVENT_ROOT>$(THIRD_PARTY)\libevent-2.0.21-stable</LIBEVENT_ROOT>
     </PropertyGroup>
     <PropertyGroup />
     <ItemDefinitionGroup />
     <ItemGroup>
       <BuildMacro Include="BOOST_ROOT">
         <Value>$(BOOST_ROOT)</Value>
         <EnvironmentVariable>true</EnvironmentVariable>
       </BuildMacro>
       <BuildMacro Include="OPENSSL_ROOT_DIR">
         <Value>$(OPENSSL_ROOT_DIR)</Value>
         <EnvironmentVariable>true</EnvironmentVariable>
       </BuildMacro>
       <BuildMacro Include="LIBEVENT_ROOT">
         <Value>$(LIBEVENT_ROOT)</Value>
         <EnvironmentVariable>true</EnvironmentVariable>
       </BuildMacro>
     </ItemGroup>
   </Project>
   ```
   **This $(LIBEVENT_ROOT) seems defined in thrift compile process, now I don't know how to change it to the folder which I compiled libevent because it's a temp value.**
   There's also a bat file related to libevent in `C:\x\iotdb-0.12.0\compile-tools\thrift\target\thrift-0.13.0\build\appveyor\build-libevent.bat`. The content is
   ```
   SETLOCAL EnableDelayedExpansion
   
   SET URLFILE=libevent-%LIBEVENT_VERSION%-stable.tar.gz
   SET URL=https://github.com/libevent/libevent/releases/download/release-%LIBEVENT_VERSION%-stable/%URLFILE%
   
   :: Download - support running a local build or a build in appveyor
   CD "%WIN3P%"                                     || EXIT /B
   IF "%APPVEYOR_BUILD_ID%" == "" (
       curl -L -f -o "%URLFILE%" "%URL%"
   ) ELSE (
       appveyor DownloadFile "%URL%"
   )
   7z x "%URLFILE%" -so | 7z x -si -ttar > nul      || EXIT /B
   CD "libevent-%LIBEVENT_VERSION%-stable"          || EXIT /B
   nmake -f Makefile.nmake static_libs              || EXIT /B
   
   :: in libevent 2.0 there is no nmake subdirectory in WIN32-Code, but in 2.1 there is
   mkdir lib                                        || EXIT /B
   move *.lib lib\                                  || EXIT /B
   move WIN32-Code\event2\* include\event2\         || move WIN32-Code\nmake\event2\* include\event2\ || EXIT /B
   move *.h include\                                || EXIT /B
   
   ENDLOCAL
   ```
   This content exec failed or don't exec at all. **So do anyone know how to exec this batch file or how to use libevent\*.lib and \*.h file to skip this error?**


-- 
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