-
Notifications
You must be signed in to change notification settings - Fork 49
src: fix compilation error in node_crypto_common #220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a workaround … I can’t reproduce the error here – does addaleax/node@7d0e9a5 also resolve this for you? Including one header should not mean having to include another header too
Thanks, it does for compilation error ccache clang++ -Qunused-arguments -o /Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/obj.target/libnode/src/node_quic_socket.o ../src/node_quic_socket.cc '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNODE_ARCH="x64"' '-DNODE_WANT_INTERNALS=1' '-DV8_DEPRECATION_WARNINGS=1' '-DNODE_OPENSSL_SYSTEM_CERT_PATH=""' '-DHAVE_INSPECTOR=1' '-DHAVE_DTRACE=1' '-DNODE_REPORT' '-DNODE_EXPERIMENTAL_QUIC=1' '-D__POSIX__' '-DNODE_USE_V8_PLATFORM=1' '-DNODE_HAVE_I18N_SUPPORT=1' '-DNODE_HAVE_SMALL_ICU=1' '-DNODE_PLATFORM="darwin"' '-DHAVE_OPENSSL=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DNGHTTP2_STATICLIB' '-DNGTCP2_STATICLIB' '-DNGHTTP3_STATICLIB' -I../src -I/Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/obj/gen -I/Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/obj/gen/include -I/Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/obj/gen/src -I../deps/histogram/src -I../deps/v8/include -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common -I../deps/zlib -I../deps/llhttp/include -I../deps/cares/include -I../deps/uv/include -I../deps/nghttp2/lib/includes -I../deps/ngtcp2/lib/includes -I../deps/ngtcp2/crypto/includes -I../deps/nghttp3/lib/includes -I../deps/brotli/c/include -I../deps/openssl/openssl/include -Os -gdwarf-2 -mmacosx-version-min=10.10 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -Werror=undefined-inline -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF /Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/.deps//Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/obj.target/libnode/src/node_quic_socket.o.d.raw -c
In file included from ../src/node_crypto_common.cc:1:
In file included from ../src/env-inl.h:28:
In file included from ../src/env.h:35:
In file included from ../src/handle_wrap.h:27:
In file included from ../src/async_wrap.h:27:
../src/base_object.h:41:10: error: inline function 'node::BaseObject::BaseObject' is not defined [-Werror,-Wundefined-inline]
inline BaseObject(Environment* env, v8::Local<v8::Object> object);
^
../src/node_crypto.h:182:9: note: used here
: BaseObject(env, wrap) {
^
In file included from ../src/node_crypto_common.cc:1:
In file included from ../src/env-inl.h:28:
In file included from ../src/env.h:35:
In file included from ../src/handle_wrap.h:27:
In file included from ../src/async_wrap.h:27:
../src/base_object.h:42:10: error: inline function 'node::BaseObject::~BaseObject' is not defined [-Werror,-Wundefined-inline]
inline ~BaseObject() override;
^
../src/node_crypto.h:181:3: note: used here
SecureContext(Environment* env, v8::Local<v8::Object> wrap)
^
In file included from ../src/node_crypto_common.cc:1:
In file included from ../src/env-inl.h:28:
In file included from ../src/env.h:35:
In file included from ../src/handle_wrap.h:27:
In file included from ../src/async_wrap.h:27:
../src/base_object.h:69:15: error: inline function 'node::BaseObject::MakeWeak' is not defined [-Werror,-Wundefined-inline]
inline void MakeWeak();
^
../src/node_crypto.h:183:5: note: used here
MakeWeak();
^
In file included from ../src/node_crypto_common.cc:1:
In file included from ../src/env-inl.h:28:
In file included from ../src/env.h:35:
In file included from ../src/handle_wrap.h:27:
In file included from ../src/async_wrap.h:27:
../src/base_object.h:56:23: error: inline function 'node::BaseObject::env' is not defined [-Werror,-Wundefined-inline]
inline Environment* env() const;
^
../src/node_crypto.h:189:7: note: used here
env()->isolate()->AdjustAmountOfExternalAllocatedMemory(-kExternalSize);
^
In file included from ../src/node_crypto_common.cc:1:
In file included from ../src/env-inl.h:28:
In file included from ../src/env.h:35:
In file included from ../src/handle_wrap.h:27:
In file included from ../src/async_wrap.h:27:
../src/base_object.h:100:23: error: inline function 'node::BaseObject::OnGCCollect' is not defined [-Werror,-Wundefined-inline]
virtual inline void OnGCCollect();
^
../src/node_crypto.h:463:3: note: used here
KeyObject(Environment* env,
^
5 errors generated.
make[1]: *** [/Users/danielbevenius/work/nodejs/quic/node_quic/out/Release/obj.target/libnode/src/node_crypto_common.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../src/node_quic_socket.cc:1061:15: warning: unused variable 'socket' [-Wunused-variable]
QuicSocket* socket =
^
1 warning generated.
rm 23b9307565d9fe2fcb314bdb403fb6b4b5600dbc.intermediate cca4bbec20be3370a730595aba68a1a175696f85.intermediate
make: *** [node] Error 2 |
@danbev What if you also move the constructors to the |
I also ran into this same error when building using the instructions from #183
|
Sorry about the late reply. I'll take a look at this now. Thanks |
Heads up, this will need to be rebased |
Move destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases.
Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. PR-URL: #220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 2a284ba. |
Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. PR-URL: nodejs#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. PR-URL: #220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. PR-URL: #220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: nodejs/quic#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ```
Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: nodejs/quic#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: #31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: nodejs/quic#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: #31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: nodejs/quic#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: #31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: nodejs/quic#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: #31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Originally landed in the QUIC repo Move constructor and destructors for subclasses of `BaseObject` from node_crypto.h to node_crypto.cc. This removes the need to include base_object-inl.h when using node_crypto.h in some cases. Original review metadata: ``` PR-URL: nodejs/quic#220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> ``` PR-URL: #31872 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Currently, the following compilation error is generated:
This commit includes base_object-inl.h to avoid this error.
Checklist
make -j4 test-only
(UNIX), orvcbuild test
(Windows) passes