WebPlatformForEmbedded / libwpe

General-purpose library specifically developed for the WPE-flavored port of WebKit.
BSD 2-Clause "Simplified" License
49 stars 36 forks source link

Failed to build with libc++: attempt to use a poisoned identifier #115

Closed 12101111 closed 2 years ago

12101111 commented 2 years ago

Caused by 159851d069fee5b1644d995f5c6d55653896edaa

In file included from ../libwpe-1.12.2/src/pasteboard-generic.cpp:30:
/usr/include/c++/v1/cstdlib:116:9: error: attempt to use a poisoned identifier
using ::calloc _LIBCPP_USING_IF_EXISTS;
        ^
/usr/include/c++/v1/cstdlib:117:9: error: attempt to use a poisoned identifier
using ::free _LIBCPP_USING_IF_EXISTS;
        ^
/usr/include/c++/v1/cstdlib:118:9: error: attempt to use a poisoned identifier
using ::malloc _LIBCPP_USING_IF_EXISTS;
        ^
/usr/include/c++/v1/cstdlib:119:9: error: attempt to use a poisoned identifier
using ::realloc _LIBCPP_USING_IF_EXISTS;
        ^
In file included from ../libwpe-1.12.2/src/pasteboard-generic.cpp:32:
In file included from /usr/include/c++/v1/map:535:
In file included from /usr/include/c++/v1/__node_handle:63:
In file included from /usr/include/c++/v1/memory:808:
In file included from /usr/include/c++/v1/__functional_base:23:
/usr/include/c++/v1/new:338:5: error: attempt to use a poisoned identifier
  ::free(__ptr);
    ^
In file included from ../libwpe-1.12.2/src/pasteboard-generic.cpp:32:
In file included from /usr/include/c++/v1/map:535:
In file included from /usr/include/c++/v1/__node_handle:63:
In file included from /usr/include/c++/v1/memory:821:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:35:
In file included from /usr/include/c++/v1/atomic:524:
In file included from /usr/include/c++/v1/__thread/timed_backoff_policy.h:16:
In file included from /usr/include/c++/v1/__threading_support:34:
In file included from /usr/include/pthread.h:30:
/usr/include/sched.h:84:7: error: attempt to use a poisoned identifier
void *calloc(size_t, size_t);
      ^
/usr/include/sched.h:85:6: error: attempt to use a poisoned identifier
void free(void *);
     ^
/usr/include/sched.h:124:36: error: attempt to use a poisoned identifier
#define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n)))
                                   ^
/usr/include/sched.h:125:23: error: attempt to use a poisoned identifier
#define CPU_FREE(set) free(set)
                      ^
9 errors generated.

Compiler: Clang++ 14.0.6, libc++ 14.0.6

aperezdc commented 2 years ago

@12101111 Thanks for reporting this issue. I have been able to reproduce it and I am working on a fix already 😄