iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

Failed to execute goal org.apache.thrift.tools:maven-thrift-plugin:0.1.11:compile (generate-thrift-sources-java) on project iotdb-thrift: thrift did not exit cleanly. Review output for more information.

Open CloudWise-Lukemiao opened this issue 4 years ago • 4 comments

今天在使用mvn clean compile -pl server -am -DskipTests 编译iotdb报Failed to execute goal org.apache.thrift.tools:maven-thrift-plugin:0.1.11:compile (generate-thrift-sources-java) on project iotdb-thrift: thrift did not exit cleanly. Review output for more information.导致编译失败。

解决方式:查看/thrift/target/tools/thrift_0.12.0_0.13.0_mac.exe文件大小与pom文件的url地址访问下载的thrift_0.12.0_0.13.0_mac.exe文件大小进行比对,我遇到的就是通过mvn下载的只有2.1M 实际有5.3M。通过浏览器下载完替换为正常的就能编译通过

CloudWise-Lukemiao avatar Jan 07 '21 09:01 CloudWise-Lukemiao

解决方式:查看/thrift/target/tools/thrift_0.12.0_0.13.0_mac.exe文件大小与pom文件的url地址访问下载的thrift_0.12.0_0.13.0_mac.exe文件大小进行比对,我遇到的就是通过mvn下载的只有2.1M 实际有5.3M。通过浏览器下载完替换为正常的就能编译通过

CloudWise-Lukemiao avatar Jan 07 '21 09:01 CloudWise-Lukemiao

Same issue on win10 with v0.13.0. The thrift download url for windows in pom.xml is "http://artfiles.org/apache.org/thrift/${thrift.version}/thrift-${thrift.version}.exe" with ${thrift.version}=0.14.1. While the latest version is 0.16.0, so set thrift.version=0.16.0 and solve the problem.

LeiRui avatar Apr 17 '22 07:04 LeiRui

I do not know whether it is compatible to update thrift 0.14 to 0.16 directly..

Maybe we can use thrift 0.14.2: https://archive.apache.org/dist/thrift/0.14.2/thrift-0.14.2.exe

jixuan1989 avatar Apr 18 '22 01:04 jixuan1989

Same problem on my win10, but with another cause: Missing the "Microsoft Visual C++ {version} Redistributable". I install the "Visual Studio Build Tool" and solve the problem.

The reason is: thrift-{version}.exe is only a "prebuilt Thrift compiler", it depends on some libraries, see here. "Visual Studio Build Tool" can provide these libraries, download it from Microsoft website and install it as follows:

  1. In tag workload, check "Desktop development ... C++", and "MSVC vxxx - VS20xx C++ x64/x86 Build Tool" in right side;
  2. Install.

Then, all is OK.

28723249 avatar Jun 24 '22 04:06 28723249