timeplus-io / proton

A streaming SQL engine, a fast and lightweight alternative to ksqlDB and Apache Flink, 🚀 powered by ClickHouse.
https://timeplus.com
Apache License 2.0
1.37k stars 53 forks source link

Clean build of v1.5.12 fails due to v8 #793

Open KVeschgini opened 4 days ago

KVeschgini commented 4 days ago

What's wrong A clean build on M2 Mac using Docker fails due to v8.

How to reproduce

git clone --recurse-submodules git@github.com:timeplus-io/proton.git

cd proton

./docker/packager/packager --package-type binary --docker-image-version clang-16 --proton-build --enable-proton-local --output-dir `pwd`/build_output --compiler clang-16-darwin

Error message Build fails with

ninja: error: 'contrib/v8-cmake/bytecode_builtins_list_generator', needed by 'contrib/v8-cmake/generated/builtins-generated/bytecodes-builtins-list.h', missing and no known rule to make it
yokofly commented 4 days ago

edit: add brew install I probably know something.. sorry about this. the --compiler clang-16-darwin will jump to cross compile, we hard code some build binary for the v8.

would you like to use directly bare metal build instead of docker? https://github.com/timeplus-io/proton/blob/develop/BUILD.md#bare-metal-build-5

the proton server final is a static library. the fresh build basically need about 90 minutes. also you can download the binary or pull the docker or brew install directly to take a try proton.

KVeschgini commented 4 days ago

Thanks, I am aware that the binary exists and I am already using it. I am trying to build proton to be able to work on the source code. The build also fails under wsl and on a ubuntu machine. I will try again, document the process and then make a bug ticket.

yokofly commented 4 days ago

really appreciate your trial. I check the code again, the "docker build for macOS" issue may not have a quick fix. Would you mind trying the bare-metal build instead? the macOS use the dockered low level is based on arm/x86 linux.

Regarding the WSL / Ubuntu build failure, this seems to be an issue. Some of our colleagues already use WSL for their daily development and debugging.

KVeschgini commented 3 days ago

Bare-metal build worked for me after upgrading xcode to version 15.4.

yokofly commented 3 days ago

glad to hear that. There's a current issue with macOS where the stacktrace only works in debug mode, but there's no stacktrace when you throw an exception directly (ClickHouse already has a patch to fix this, but I don't have the time to back port it).

Apart from this problem, macOS also doesn't have jemalloc && sanitizer. thoes are some potential issues we currently encountered.