StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9.06k stars 1.82k forks source link

Cannot instal thrift@0.13.0 and cannot build Starrocks in fe module #52928

Open maggie-zhu opened 1 week ago

maggie-zhu commented 1 week ago

Steps to reproduce the behavior (Required)

1.brew install alberttwong/thrift/thrift@0.13 Then it will fail with the error like : Error: openssl@1.1 has been disabled because it is not supported upstream! It was disabled on 2024-10-24.

2.If I just install like : brew install thrift, then I will install the version 0.21.0 However when I try to build Starrocks, it will fail like target/generated-sources/thrift/com/starrocks/thrift/FrontendService.java:[4989,90] wrong number of type arguments; required 2

Expected behavior (Required)

Real behavior (Required)

StarRocks version (Required)

kevincai commented 1 week ago

if you are trying to build old versions that is still using thrift 0.13.0 on mac, either build from source code or leverage our official dev-env image available on docker hub: https://hub.docker.com/r/starrocks/dev-env-ubuntu

maggie-zhu commented 1 week ago

Hi @kevincai , I just pulled the code to local and in the main branch. How can I use the docker? And if I run 'mvn install -DskipTests', there are so many errors. image

kevincai commented 1 week ago

use ./build.sh --fe instead

you can use starrocks/dev-env-ubuntu:latest docker image, just map the starrocks source code and the $HOME/.m2 directory into the docker container. run builds in the docker env. and edit code in IDEA.

maggie-zhu commented 4 days ago

Hi @kevincai, since I cannot install thrift 0.13. I install the Thrift version 0.21.0. I can run ./build.sh --fe image But the project in the idea still cannot download the mvn dependencies. I try to run 'mvn install -DskipTests' in the fe folder. It will show the following error. The code still has so many errors and cannot download the dependency. image

maggie-zhu commented 4 days ago

Also, I have tried build the fe module in the docker container. Also mount the docker container with the local code directory. In the contaner, I saw the job build successfully.

image

But the code in idea still have many errors. Can you help with this @kevincai

image
kevincai commented 4 days ago

refresh the IDEA maven project, let it reload the generated thrift package under fe/fe-core/target/generated-sources/thrift.

If the IDEA can't recognise the folder automatically, you can mark the folder as "Generated source root"

lmagic233 commented 4 days ago

@maggie-zhu You should use Thrift 0.20 instead of 0.21, since the type parameters of class org.apache.thrift.ProcessFunction has changed in Thrift 0.21, which doesn't agree with StarRocks' definitions.

You can uninstall Thrift 0.21 and reinstall 0.20 by running brew install cartman-kai/thrift/thrift@0.20.