Skip to content

Build failure on current Cygwin, probably caused by force-fed c++98 mode #247

@HBBroeker

Description

@HBBroeker

Current git HEAD fails to build on current Cygwin, because fdopen() is not found. That's because configure.ac injects --std=c++98 into the CXXFLAGS, which has two effects: first, it nails the language version to C++98, which I'll assume is what you want it to do. But secondly it also turns off all non-ISO-C++ language and library features. As a result, POSIX libc functions like fdopen() are no longer visible to the compiled code, and that fails the build of src/util/temp_file.cc.

I see three possible solutions:

  1. don't inject any --std at all --- the default state of that option is most likely better anyway
  2. if you really have to, inject --std=gnu++98 instead, which will not have the unwieldy side effect of turning off all language and library extensions
  3. if you're absolutely sure it has to be --std=c++98, at least consider adding a mechanism like autoconf's standard AC_USE_SYSTEM_EXTENSIONS that re-enable the extensions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions