Skip to content

implicit instantiation of undefined templates with wasi-sdk-21 #378

Closed
@sparker-arm

Description

@sparker-arm

I've been building wasi-sdk from source, for a few years, and running benchmarks on a variety of runtimes on x64 and aarch64 platforms. I'm currently building wasi-sdk on ubuntu 22.04 with the system GCC 11.4.

Today, I've tried to update my benchmarking suite to use wasi-sdk-21 and I'm not having much joy, I get errors like this when compiling my C++ benchmarks:

error: implicit instantiation of undefined template 'std::basic_ofstream<char>'
  495 |   std::ofstream output_file;
      |                 ^
wasi-sdk/share/wasi-sysroot/include/c++/v1/__fwd/fstream.h:26:28: note: template is declared here
   26 | class _LIBCPP_TEMPLATE_VIS basic_ofstream;

The two benchmarks that I've looked into are targeting -std=c++11.

Do you know what's changed between 20 and 21 that could cause this..? I'm assuming that I've missed something but I'm also somewhat suspicious of libc++ here as there's an open ticket which look like it could be related.

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions