Skip to content

Template Instantiation Error in system/lib/libcxx/include/__memory/pointer_traits.h #21603

Closed

Description

@SaraBaradaran

I faced the following error when compiling proxy (https://github.com/microsoft/proxy) using Emscripten. It seems there is a bug in system/lib/libcxx/include/__memory/pointer_traits.h header.

version: latest and even 3.1.54

/home/sara/emsdk/upstream/emscripten/cache/sysroot/include/c++/v1/__memory/pointer_traits.h:118:22: error: implicit instantiation of undefined template 'std::__pointer_traits_element_type<std::nullptr_t>'
  118 |     typedef typename __pointer_traits_element_type<pointer>::type    element_type;
      |                      ^

You can reproduce the error using the following commands:

$ git clone https://github.com/microsoft/proxy
$ cd proxy/build
$ emcmake cmake ..
$ emmake cmake --build .

Activity

  1. sbc100 commented on Mar 25, 2024

    @sbc100
    Collaborator

    Our C++ headers come from clang's libc++. Do you happen to know if this issue also occurs with libc++? You can try this by building using -stdlib=libc++.

    If this is an issue was was already fixes in libc++ then this could be fixed when #21530 is fixed

  2. added a commit that references this issue on Apr 3, 2024
    37055c7
  3. added a commit that references this issue on Apr 11, 2024
    d38b2c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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