-
Notifications
You must be signed in to change notification settings - Fork 65
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
编译时报错:除以0 #121
Comments
Hi @Francis-zlh 能提供一下具体的 repro steps 吗 |
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging 我尝试过把static constexpr size_type bits_per_block = std::numeric_limits<block_type>::digits;修改为 |
麻烦提供一下 gcc 版本 |
使用过13.2.0和10.3.0均报错 |
我们目前用的 11.2~11.4,你试一下 |
inks@links-virtual-machine: Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging 我更换了gcc11.4以后依然有这个问题😂 |
Interesting, 请问一下你的 OS 信息还有 gcc 是怎么安装的 |
我不太明白OS信息是如何安装的,gcc是通过下载gcc的release后通过下述命令安装 |
就是你 linux 用的是哪个发行版?比如 Ubuntu 22.04, Centos 8 这样 |
ubuntu 20.04 |
请用包管理器来安装 gcc sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt install gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 --slave /usr/bin/cpp cpp /usr/bin/cpp-11; 然后确定一下 gcc -v 返回的是 11 |
非常感谢您的帮助,现在已经编译成功。 |
自己编译 gcc 容易缺东西,比如 libstdc++ 之类的 |
./yacl/base/dynamic_bitset.h:2294:20: error: division by zero is not a constant expression
2294 | constexpr size_t init_val_required_blocks = u128_bits_number / bits_per_block;
The text was updated successfully, but these errors were encountered: