Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uperror: Neon only builds with --release. For tests, try `cargo test --release`. #357
Comments
This comment has been minimized.
This comment has been minimized.
olup
commented
Oct 25, 2018
•
Same here, just run it with the release flag, no ? like |
This comment has been minimized.
This comment has been minimized.
dialogbox
commented
Nov 18, 2018
Similar, but little different here. My Environments % neon version
0.2.0
% node -v
v11.2.0
% npm -v
6.4.1
% rustup show
Default host: x86_64-apple-darwin
stable-x86_64-apple-darwin (default)
rustc 1.30.1 (1433507eb 2018-11-07) Build and run itself is ok. % neon new my-project
...
% cd my-project
% neon build
neon info forcing rebuild for new build settings
neon info running cargo
Updating crates.io index
Compiling version_check v0.1.5
Compiling cfg-if v0.1.6
Compiling libc v0.2.43
Compiling ucd-util v0.1.3
Compiling regex v0.2.11
Compiling lazy_static v1.2.0
Compiling utf8-ranges v1.0.2
Compiling gcc v0.3.55
Compiling neon-build v0.2.0
Compiling semver-parser v0.7.0
Compiling cslice v0.2.0
Compiling regex-syntax v0.5.6
Compiling memchr v2.1.1
Compiling thread_local v0.3.6
Compiling neon v0.2.0
Compiling my-project v0.1.0 (/Users/dialogbox/works/rust/my-project/native)
Compiling semver v0.9.0
Compiling aho-corasick v0.6.9
Compiling neon-runtime v0.2.0
Finished dev [unoptimized + debuginfo] target(s) in 16.84s
neon info generating native/index.node
% node -e 'require("./")'
hello node But, % cd native
% cargo test
Compiling my-project v0.1.0 (/Users/dialogbox/works/rust/my-project/native)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.14epkf1b9s0eu4lx.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.14mgytbfuj2h4z0v.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.1gxpkm8fdjdavua5.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.1wor61c1ey36etk8.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.23e8pyazmgu3e389.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.2b4x87fd6kqn94bu.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.2eyi022e5k1uw0gc.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.2m2teyp6596owcoh.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.2o29w6mw6r2zavyp.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.2qgcxusy3crbrtot.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.3015gbbydlzlhstk.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.3mxkp2jzsftrlj3n.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.3qtj9hj1ouu2pga3.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.3ucmrxxiet7mg5nj.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.466d9pval0vf9hvs.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4arr4zizqwsnr22p.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4cw8aeyq1ax1acuc.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4dxv5hg4hxe9arxs.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4oe4w2qhku5wzzny.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4ot4ygm7vwx4i2ry.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4q5kyru7gzu0bdp6.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.4qaviprejw6vfdt6.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.553dzu3pgi8bk4vh.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.556uoze9yki50qvz.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.7gems98o2bpvo0a.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.f6v5kbadjn7e56z.rcgu.o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.seaa2imba682v2m.rcgu.o" "-o" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/my_project-07ec78272dd7cf7e.1ml3bdzfsnw6ouub.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps" "-L" "/Users/dialogbox/works/rust/my-project/native/target/debug/build/neon-runtime-8bc2027f8ac5020b/out" "-L" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libtest-c2b92ef38bc65339.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libterm-6349508393622615.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-f1e85f00c34fa59c.rlib" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/libneon-a8c3ebd2089333f8.rlib" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/libsemver-c9201ffb83659839.rlib" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/libsemver_parser-a914c88bd9416303.rlib" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/libcslice-07c1a1164871e0f1.rlib" "/Users/dialogbox/works/rust/my-project/native/target/debug/deps/libneon_runtime-6f2797e2fc93d4a1.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-a5984f6fc2a4870f.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-7c9487d161f01b59.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-e146b9b98ab73364.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-acb39784a181deae.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system-89f97a4bae8c89d2.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-cd336d4bb1fade3c.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-d6545438808205eb.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-8aa8397108285683.rlib" "/Users/dialogbox/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-83c21e81fef8188c.rlib" "-lSystem" "-lresolv" "-lpthread" "-lc" "-lm"
= note: Undefined symbols for architecture x86_64:
"v8::V8::ToLocalEmpty()", referenced from:
v8::MaybeLocal<v8::String>::ToLocalChecked() in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::Isolate::ThrowException(v8::Local<v8::Value>)", referenced from:
Nan::ThrowError(v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::ThrowError(char const*) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::HandleScope::~HandleScope()", referenced from:
Nan::Set(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
_Neon_Scope_Exit in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::HandleScope::~HandleScope() in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::External::Value() const", referenced from:
_Neon_Fun_GetDynamicCallback in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::Function::New(v8::Local<v8::Context>, void (*)(v8::FunctionCallbackInfo<v8::Value> const&), v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)", referenced from:
_Neon_Fun_New in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::Isolate::GetCurrentContext()", referenced from:
Nan::Set(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
_Neon_Fun_New in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::Exception::Error(v8::Local<v8::String>)", referenced from:
_Neon_Error_ThrowErrorFromUtf8 in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::ThrowError(char const*) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)", referenced from:
Nan::Set(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::Isolate::GetCurrent()", referenced from:
_Neon_Call_CurrentIsolate in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Neon_ASCII_Key(v8::Local<v8::String>*, unsigned char const*, int) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::Set(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::ThrowError(v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
_Neon_Error_ThrowErrorFromUtf8 in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::ThrowError(char const*) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::HandleScope::HandleScope() in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
...
"v8::External::New(v8::Isolate*, void*)", referenced from:
_Neon_Fun_New in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::HandleScope::HandleScope(v8::Isolate*)", referenced from:
Nan::Set(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
_Neon_Scope_Enter in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::HandleScope::HandleScope() in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int)", referenced from:
Neon_ASCII_Key(v8::Local<v8::String>*, unsigned char const*, int) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
_Neon_String_New in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
_Neon_Error_ThrowErrorFromUtf8 in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
Nan::imp::Factory<v8::String>::New(char const*, int) in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"v8::V8::FromJustIsNothing()", referenced from:
v8::Maybe<bool>::FromJust() const in libneon_runtime-6f2797e2fc93d4a1.rlib(neon.o)
"_node_module_register", referenced from:
my_project::__LOAD_NEON_MODULE::__load_neon_module::h21032fe34cbef846 in my_project-07ec78272dd7cf7e.f6v5kbadjn7e56z.rcgu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: Could not compile `my-project`.
To learn more, run the command again with --verbose.
% cargo test --release
Compiling version_check v0.1.5
Compiling cfg-if v0.1.6
Compiling libc v0.2.43
Compiling lazy_static v1.2.0
Compiling ucd-util v0.1.3
Compiling regex v0.2.11
Compiling utf8-ranges v1.0.2
Compiling gcc v0.3.55
Compiling neon-build v0.2.0
Compiling semver-parser v0.7.0
Compiling cslice v0.2.0
Compiling thread_local v0.3.6
Compiling regex-syntax v0.5.6
Compiling memchr v2.1.1
Compiling neon v0.2.0
Compiling my-project v0.1.0 (/Users/dialogbox/works/rust/my-project/native)
Compiling semver v0.9.0
Compiling aho-corasick v0.6.9
Compiling neon-runtime v0.2.0
Finished release [optimized] target(s) in 21.26s
Running target/release/deps/my_project-cd47d2683dbb12d3
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mlengse commentedSep 15, 2018
environment
step
error message
additional step
result ok
Do i missed some step or configuration?