Skip to content

need libuv patch to build on current Android releases #15117

Closed
@enh

Description

@enh

current Android releases have pthread_barrier_t, so the v8.4.0 build breaks:

../deps/uv/include/pthread-barrier.h:25:9: warning: 'PTHREAD_BARRIER_SERIAL_THREAD' macro redefined [-Wmacro-redefined]
#define PTHREAD_BARRIER_SERIAL_THREAD  0x12345
        ^
/usr/local/google/ndkports/toolchain-arm64/bin/../sysroot/usr/include/pthread.h:68:9: note: previous definition is here
#define PTHREAD_BARRIER_SERIAL_THREAD -1
        ^
In file included from ../deps/uv/src/unix/pthread-barrier.c:17:
../deps/uv/include/pthread-barrier.h:59:3: error: typedef redefinition with different types ('struct pthread_barrier_t' vs
      'struct pthread_barrier_t')
} pthread_barrier_t;
  ^
/usr/local/google/ndkports/toolchain-arm64/bin/../sysroot/usr/include/bits/pthread_types.h:54:3: note: previous definition is here
} pthread_barrier_t;
  ^
In file included from ../deps/uv/src/unix/pthread-barrier.c:17:
../deps/uv/include/pthread-barrier.h:61:5: error: conflicting types for 'pthread_barrier_init'
int pthread_barrier_init(pthread_barrier_t* barrier,
    ^
/usr/local/google/ndkports/toolchain-arm64/bin/../sysroot/usr/include/pthread.h:228:5: note: previous declaration is here
int pthread_barrier_init(pthread_barrier_t*, const pthread_barrierattr_t*, unsigned)
    ^
../deps/uv/src/unix/pthread-barrier.c:23:5: error: conflicting types for 'pthread_barrier_init'
int pthread_barrier_init(pthread_barrier_t* barrier,
    ^
/usr/local/google/ndkports/toolchain-arm64/bin/../sysroot/usr/include/pthread.h:228:5: note: previous declaration is here
int pthread_barrier_init(pthread_barrier_t*, const pthread_barrierattr_t*, unsigned)
    ^
../deps/uv/src/unix/pthread-barrier.c:48:12: error: no member named 'b' in 'pthread_barrier_t'
  barrier->b = b;
  ~~~~~~~  ^
../deps/uv/src/unix/pthread-barrier.c:62:35: error: no member named 'b' in 'pthread_barrier_t'
  if (barrier == NULL || barrier->b == NULL)
                         ~~~~~~~  ^
../deps/uv/src/unix/pthread-barrier.c:65:16: error: no member named 'b' in 'pthread_barrier_t'
  b = barrier->b;
      ~~~~~~~  ^
../deps/uv/src/unix/pthread-barrier.c:100:35: error: no member named 'b' in 'pthread_barrier_t'
  if (barrier == NULL || barrier->b == NULL)
                         ~~~~~~~  ^
../deps/uv/src/unix/pthread-barrier.c:103:16: error: no member named 'b' in 'pthread_barrier_t'
  b = barrier->b;
      ~~~~~~~  ^
../deps/uv/src/unix/pthread-barrier.c:118:21: error: no member named 'b' in 'pthread_barrier_t'
  uv__free(barrier->b);
           ~~~~~~~  ^
../deps/uv/src/unix/pthread-barrier.c:119:12: error: no member named 'b' in 'pthread_barrier_t'
  barrier->b = NULL;
  ~~~~~~~  ^

you either need to upgrade libuv or at least cherrypick this commit: libuv/libuv@7dabd57

(hopefully i've reported this in time to be fixed in time for this October's LTS release; obviously the current LTS release has this problem, as does the "current" 8.4.0 release.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    libuvIssues and PRs related to the libuv dependency or the uv binding.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions