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

Rebase on top of Node 10 #2

Open
avaer opened this issue Aug 2, 2018 · 4 comments · May be fixed by #5
Open

Rebase on top of Node 10 #2

avaer opened this issue Aug 2, 2018 · 4 comments · May be fixed by #5

Comments

@avaer
Copy link
Owner

avaer commented Aug 2, 2018

We need to rebase this library on top of the latest node. We should make sure to do it off of a known tag, not some random master.

This seems a good candidate.

This was referenced Aug 2, 2018
@Luluno01
Copy link

Luluno01 commented Aug 3, 2018

Actually I have had difficulties in building the shared library (see #1). Any ideas on what kind of changes should be made to eliminate the errors that would probably occur on later versions?

@avaer
Copy link
Owner Author

avaer commented Aug 3, 2018

@Luluno01 We would probably need to:

  • de-Androidify some of the hacks to be general Linux
  • update the Service/boot to node 10 style

Would you be able to try building #5 on your system to see what kind of errors we get?

@Luluno01
Copy link

Luluno01 commented Aug 3, 2018

@modulesio Yes I can give it a try but it may be time-consuming XD

btw, I'm not familiar with pull request so I will need some exrtra time to figure out how it works.

@Luluno01
Copy link

Luluno01 commented Aug 4, 2018

@modulesio I switched to the branch #5 and did the follows.

  1. ./configure --shared
  2. LDFLAGS="-llog" make -j2

And got the following errors

../src/node.cc:3891:7: error: use of undeclared identifier 'trace_enabled'
  if (trace_enabled) {
      ^
../src/node.cc:3917:12: warning: 'SetAutorunMicrotasks' is deprecated [-Wdeprecated-declarations]
  isolate->SetAutorunMicrotasks(false);
           ^
../deps/v8/include/v8.h:7641:3: note: 'SetAutorunMicrotasks' has been explicitly marked deprecated here
  V8_DEPRECATED("Use SetMicrotasksPolicy",
  ^
../deps/v8/include/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated))
                            ^
../src/node.cc:3947:17: error: no matching constructor for initialization of 'node::Environment'
      env = new Environment(isolate_data, localContext);
                ^           ~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/env.h:1006:28: note: candidate constructor not viable: requires 1 argument, but 2 were provided
  DISALLOW_COPY_AND_ASSIGN(Environment);
                           ^
../src/env.h:1006:28: note: candidate constructor not viable: requires 1 argument, but 2 were provided
../src/env.h:588:3: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
  Environment(IsolateData* isolate_data,
  ^
../src/node.cc:3948:34: error: use of undeclared identifier 'thread_local_env'
      CHECK_EQ(0, uv_key_create(&thread_local_env));
                                 ^
../src/node.cc:3949:19: error: use of undeclared identifier 'thread_local_env'
      uv_key_set(&thread_local_env, env);
                  ^
../src/node.cc:3978:31: error: use of undeclared identifier 'LOOP_START'
        PERFORMANCE_MARK(env, LOOP_START);
                              ^
../src/node.cc:3993:27: error: use of undeclared identifier 'LOOP_EXIT'
    PERFORMANCE_MARK(env, LOOP_EXIT);
                          ^
../src/node.cc:4000:18: error: use of undeclared identifier 'thread_local_env'
  uv_key_delete(&thread_local_env);
                 ^
1 warning and 7 errors generated.
make[1]: *** [node_lib.target.mk:223: /data/data/com.termux/files/home/program/src/node-android-lib/out/Release/obj.target/node_lib/src/node.o] Error 1
make[1]: *** Waiting for unfinished jobs....
rm e01b85ed947429ad0a6839ec8c52660bd4716806.intermediate 1dbaf69c9eb1e75e0ef4fca2666d54b2d08923c3.intermediate
make: *** [Makefile:87: node] Error 2

The errors above happened when executing

g++ '-DNODE_ARCH="arm64"' '-DNODE_PLATFORM="linux"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-DNODE_SHARED_MODE' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DNODE_HAVE_SMALL_ICU=1' '-DHAVE_OPENSSL=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DHTTP_PARSER_STRICT=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D_POSIX_C_SOURCE=200112' '-DNGHTTP2_STATICLIB' -I../src -I/data/data/com.termux/files/home/program/src/node-android-lib/out/Release/obj/gen -I/data/data/com.termux/files/home/program/src/node-android-lib/out/Release/obj/gen/include -I/data/data/com.termux/files/home/program/src/node-android-lib/out/Release/obj/gen/src -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/zlib -I../deps/http_parser -I../deps/cares/include -I../deps/uv/include -I../deps/nghttp2/lib/includes -I../deps/openssl/openssl/include  -pthread -Wall -Wextra -Wno-unused-parameter -fPIC -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /data/data/com.termux/files/home/program/src/node-android-lib/out/Release/.deps//data/data/com.termux/files/home/program/src/node-android-lib/out/Release/obj.target/node_lib/src/node.o.d.raw   -c -o /data/data/com.termux/files/home/program/src/node-android-lib/out/Release/obj.target/node_lib/src/node.o ../src/node.cc

Here is my clang version info:

clang version 6.0.1 (tags/RELEASE_601/final)
Target: aarch64--linux-android
Thread model: posix
InstalledDir: /data/data/com.termux/files/usr/bin

Hope these messages would help. I'm looking forward to being able to use the latest Node.js shared library on my android device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants