Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need libuv patch to build on current Android releases #15117

Closed
enh opened this issue Aug 31, 2017 · 3 comments
Closed

need libuv patch to build on current Android releases #15117

enh opened this issue Aug 31, 2017 · 3 comments
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding.

Comments

@enh
Copy link

enh commented Aug 31, 2017

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.)

@enh
Copy link
Author

enh commented Aug 31, 2017

@DanAlbert (the Android NDK maintainer) asked me to check whether node.js builds out of the box with the current NDK.

@cjihrig
Copy link
Contributor

cjihrig commented Aug 31, 2017

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

That commit has been released in libuv and will be in Node's next libuv update, which is already underway.

@mscdex mscdex added the libuv Issues and PRs related to the libuv dependency or the uv binding. label Aug 31, 2017
@bnoordhuis
Copy link
Member

I'll close this out, will be fixed after the next libuv upgrade.

cjihrig added a commit to cjihrig/node that referenced this issue Sep 6, 2017
Fixes: nodejs#12737
Fixes: nodejs#13581
Fixes: nodejs#15117
PR-URL: nodejs#14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 10, 2017
Fixes: #12737
Fixes: #13581
Fixes: #15117
PR-URL: #14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 11, 2017
Fixes: #12737
Fixes: #13581
Fixes: #15117
PR-URL: #14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 12, 2017
Fixes: #12737
Fixes: #13581
Fixes: #15117
PR-URL: #14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit to addaleax/node that referenced this issue Sep 13, 2017
Fixes: nodejs#12737
Fixes: nodejs#13581
Fixes: nodejs#15117
PR-URL: nodejs#14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 16, 2017
Fixes: #12737
Fixes: #13581
Fixes: #15117
PR-URL: #14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 25, 2017
Fixes: #12737
Fixes: #13581
Fixes: #15117
PR-URL: #14866
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libuv Issues and PRs related to the libuv dependency or the uv binding.
Projects
None yet
Development

No branches or pull requests

4 participants