-
Notifications
You must be signed in to change notification settings - Fork 4.2k
removed stdc++fs #3097
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
removed stdc++fs #3097
Conversation
The flag was added in ggml-org/llama.cpp#12094 cc @ericcurtin We should recommend to upgrade the compiler when the issue appears again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have to keep dl
:
target_link_libraries(ggml PRIVATE dl)
@hbuxiaofei does this work for you? Maybe you can put in a little conditional to add the flag for your centos8 case I wouldn't block on @hbuxiaofei responding, we should favour the newest distros, centos8 is a bit long in the tooth for llama.cpp |
Maybe the centos8 solution is upgrade the compiler like @ggerganov says, I think you can do that by installing one of the Developer Toolsets |
Ignore my approval, need the dl |
Can you provide logs and the exact steps to get the error? It links fine on The linker command used is:
Aside from the lack of logs, I'm not opposed to this change as the build still succeeds with it. |
Great, I just added the dl. |
Why drop
-lstdc++fs
from whisper.cpp’s CMakeLists?The extra library vanished from modern GCC – beginning with GCC 13 the standalone
libstdc++fs
archive was removed; the symbols are now built into the normal C++ runtime, so the linker flag causes hard failures on any tool-chain ≥ 13 (/usr/bin/ld: cannot find -lstdc++fs
).C++17 made it obsolete – since GCC 9,
std::filesystem
is a fully-standard header in<filesystem>
and no longer lives in<experimental/filesystem>
, so no explicit link option is required.Keeping the flag blocks Flatpak and cross-arch builds – many Flatpak runners (e.g. GNOME 48) already ship GCC 14; the flag currently breaks both x86-64 and aarch64 sandbox builds of whisper.cpp.
Upstream consensus – other OSS projects (LLVM, CMake, Dolphin Emu, etc.) have removed the flag for exactly the same reason.
No functional downside – when using older GCC (< 9) the flag is still unnecessary because those versions fall back to the static archive automatically when
std::filesystem
symbols are unresolved.