-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple M1 编译报错 #393
Labels
Comments
observer和obclient编译都成功了,执行SQL错误是因为你的SQL确实有问题,比如当前不支持show databases命令。 |
看报错信息是由于lambda中某些变量没有捕获导致的,可以把 ranges::for_each 改成 for 写法,或者把lambda的参数捕获改成 &,比如 ranges::for_each(buffer_pools, [](DiskBufferPool *buffer_pool) {
Frame *frame = nullptr;
ASSERT_EQ(RC::SUCCESS, buffer_pool->allocate_page(&frame));
ASSERT_EQ(RC::SUCCESS, buffer_pool->unpin_page(frame));
}); 改成: ranges::for_each(buffer_pools, [&](DiskBufferPool *buffer_pool) { // [] 变成了 [&]
Frame *frame = nullptr;
ASSERT_EQ(RC::SUCCESS, buffer_pool->allocate_page(&frame));
ASSERT_EQ(RC::SUCCESS, buffer_pool->unpin_page(frame));
}); |
再另外的一台m1 电脑上编译,也没有此问题,忽略掉好了。感谢回复~ |
llvm的clang18报错,是需要降低版本吗?
|
我用clang16编译没有遇到你说的问题,clang18反而不兼容这个语法了? |
我在一个环境上也重现了你的问题,但与Mac或clang无关,除了需要头文件,还需要引用 头文件,真是不可思议。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Question
环境信息( 工具版本均符合文档要求):
编译步骤:
git clone https://github.com/oceanbase/miniob.git
cd miniob
sudo bash build.sh init
--这一步okbash build.sh
--这一步报错./observer
./obclient
, 执行基本的show/select报错,不确定是否为编译的问题编译过程中打印信息如下:
执行sudo bash build.sh init 的输出(看起来没有error):
output.md
执行bash build.sh报fatal error: too many errors emitted, stopping now [-ferror-limit=]
The text was updated successfully, but these errors were encountered: