[GH-ISSUE #87] [Build error] Build failed on Ubuntu22.04/Docker following the guide #49

Closed
opened 2026-10-26 09:44:10 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @6607changchun on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/87

I started a container of Ubuntu:22.04 on WSL2, and build 3FS following the guide. But the compiler complained about consteval error.

Here is the related log:

In file included from /3fs/third_party/folly/folly/CancellationToken.cpp:17:
In file included from /3fs/third_party/folly/folly/CancellationToken.h:365:
In file included from /3fs/third_party/folly/folly/CancellationToken-inl.h:23:
In file included from /usr/include/glog/logging.h:40:
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2360:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
        static constexpr unsigned fractional_width = {_S_fractional_width()};
                                                      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2360:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2315:2: note: declared here
        _S_fractional_width()

Other environment infomation:
Clang 14.0
Host Nixos 24.11 on WSL2

I will try clang-17 later and paste the result.

Originally created by @6607changchun on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/deepseek-ai/3FS/issues/87 I started a container of Ubuntu:22.04 on WSL2, and build 3FS following the guide. But the compiler complained about `consteval` error. Here is the related log: ``` In file included from /3fs/third_party/folly/folly/CancellationToken.cpp:17: In file included from /3fs/third_party/folly/folly/CancellationToken.h:365: In file included from /3fs/third_party/folly/folly/CancellationToken-inl.h:23: In file included from /usr/include/glog/logging.h:40: /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2360:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression static constexpr unsigned fractional_width = {_S_fractional_width()}; ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2360:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2315:2: note: declared here _S_fractional_width() ``` Other environment infomation: Clang 14.0 Host Nixos 24.11 on WSL2 I will try clang-17 later and paste the result.
Author
Owner

@HelloPtr commented on GitHub (Mar 4, 2025):

i have the same problem

<!-- gh-comment-id:2697419214 --> @HelloPtr commented on GitHub (Mar 4, 2025): i have the same problem
Author
Owner

@6607changchun commented on GitHub (Mar 4, 2025):

Quick Reply:
I changed to clang-18, and it seems that everything is well. But I modified dome codes:

CMakeLists.txt(top level): remove '-fcoroutine-ts'.
remove -Werror
some compiler errors.(easy to fix)

The progress completes 30%, and I will paste the following result later.

<!-- gh-comment-id:2697591842 --> @6607changchun commented on GitHub (Mar 4, 2025): Quick Reply: I changed to clang-18, and it seems that everything is well. But I modified dome codes: CMakeLists.txt(top level): remove '-fcoroutine-ts'. remove -Werror some compiler errors.(easy to fix) The progress completes 30%, and I will paste the following result later.
Author
Owner

@6607changchun commented on GitHub (Mar 4, 2025):

Compilation complete, but some modifications are made. I'm not sure whether these modifications preserve the semantic, as some of them are probable breaking changes. I haven't tested the binaries, and have no idea about it works.

Here are my patches for references, of which some modifications are absolutely redundant.

0001-build-change-to-clang-18.patch
0001-build-clickhouse-change-to-clang-18.patch
0001-build-folly-change-to-clang-18.patch
0001-build-jemalloc-change-to-clang-18.patch
0001-build-leveldb-change-to-clang-18.patch
0001-build-rocksdb-change-to-clang-18.patch

Anyway, it works on my computer.

<!-- gh-comment-id:2698301313 --> @6607changchun commented on GitHub (Mar 4, 2025): Compilation complete, but some modifications are made. I'm not sure whether these modifications preserve the semantic, as some of them are probable breaking changes. I haven't tested the binaries, and have no idea about it works. Here are my patches for references, of which some modifications are absolutely redundant. [0001-build-change-to-clang-18.patch](https://github.com/user-attachments/files/19074471/0001-build-change-to-clang-18.patch) [0001-build-clickhouse-change-to-clang-18.patch](https://github.com/user-attachments/files/19074474/0001-build-clickhouse-change-to-clang-18.patch) [0001-build-folly-change-to-clang-18.patch](https://github.com/user-attachments/files/19074473/0001-build-folly-change-to-clang-18.patch) [0001-build-jemalloc-change-to-clang-18.patch](https://github.com/user-attachments/files/19074472/0001-build-jemalloc-change-to-clang-18.patch) [0001-build-leveldb-change-to-clang-18.patch](https://github.com/user-attachments/files/19074475/0001-build-leveldb-change-to-clang-18.patch) [0001-build-rocksdb-change-to-clang-18.patch](https://github.com/user-attachments/files/19074476/0001-build-rocksdb-change-to-clang-18.patch) Anyway, it works on my computer.
Author
Owner

@6607changchun commented on GitHub (Mar 5, 2025):

Compilation complete, but some modifications are made. I'm not sure whether these modifications preserve the semantic, as some of them are probable breaking changes. I haven't tested the binaries, and have no idea about it works.

Here are my patches for references, of which some modifications are absolutely redundant.

0001-build-change-to-clang-18.patch 0001-build-clickhouse-change-to-clang-18.patch 0001-build-folly-change-to-clang-18.patch 0001-build-jemalloc-change-to-clang-18.patch 0001-build-leveldb-change-to-clang-18.patch 0001-build-rocksdb-change-to-clang-18.patch

Anyway, it works on my computer.

A hotfix: modification of executor.setNumthreads() is wrong. It is supposed to be preserved.

<!-- gh-comment-id:2699442317 --> @6607changchun commented on GitHub (Mar 5, 2025): > Compilation complete, but some modifications are made. I'm not sure whether these modifications preserve the semantic, as some of them are probable breaking changes. I haven't tested the binaries, and have no idea about it works. > > Here are my patches for references, of which some modifications are absolutely redundant. > > [0001-build-change-to-clang-18.patch](https://github.com/user-attachments/files/19074471/0001-build-change-to-clang-18.patch) [0001-build-clickhouse-change-to-clang-18.patch](https://github.com/user-attachments/files/19074474/0001-build-clickhouse-change-to-clang-18.patch) [0001-build-folly-change-to-clang-18.patch](https://github.com/user-attachments/files/19074473/0001-build-folly-change-to-clang-18.patch) [0001-build-jemalloc-change-to-clang-18.patch](https://github.com/user-attachments/files/19074472/0001-build-jemalloc-change-to-clang-18.patch) [0001-build-leveldb-change-to-clang-18.patch](https://github.com/user-attachments/files/19074475/0001-build-leveldb-change-to-clang-18.patch) [0001-build-rocksdb-change-to-clang-18.patch](https://github.com/user-attachments/files/19074476/0001-build-rocksdb-change-to-clang-18.patch) > > Anyway, it works on my computer. A hotfix: modification of `executor.setNumthreads()` is wrong. It is supposed to be preserved.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#49
No description provided.