Skip to content

common: fix missing fstream header - #25385

Closed
wgottwalt wants to merge 1 commit into
ggml-org:masterfrom
wgottwalt:master
Closed

wgottwalt wants to merge 1 commit into
ggml-org:masterfrom
wgottwalt:master

Conversation

@wgottwalt

Copy link
Copy Markdown
Contributor

llama.cpp.git/common/common.h:867:6: error: ‘ifstream’ in namespace ‘std’ does not name a type
867 | std::ifstream fs_open_ifstream(const std::string & fname, std::ios_base::openmode mode);
| ^~~~~~~~
llama.cpp.git/common/common.h:17:1: note: ‘std::ifstream’ is defined in header ‘’; this is probably fixable by adding ‘#include ’
16 | #include
+++ |+#include
17 |

With the upcoming GCC 17, C++ headers are cleaned up further and include less unnecessary headers. fstream needs to be included here now.

llama.cpp.git/common/common.h:867:6: error: ‘ifstream’ in namespace ‘std’ does not name a type
  867 | std::ifstream fs_open_ifstream(const std::string & fname, std::ios_base::openmode mode);
      |      ^~~~~~~~
llama.cpp.git/common/common.h:17:1: note: ‘std::ifstream’ is defined in header ‘<fstream>’; this is probably fixable by adding ‘#include <fstream>’
   16 | #include <algorithm>
  +++ |+#include <fstream>
   17 |

With the upcoming GCC 17, C++ headers are cleaned up further and include
less unnecessary headers. fstream needs to be included here now.
@wgottwalt
wgottwalt requested a review from a team as a code owner July 7, 2026 05:59
@ggml-gh-bot

ggml-gh-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

Hi @wgottwalt, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • PR Template not respected: Please respect the template when creating a new pull request. Make sure to fill out all required sections.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@ngxson

ngxson commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

#25220

@ngxson ngxson closed this Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants