Comments (20)
0.9.1 has been released, it works atleast on my 10.8. -DCMAKE_SHARED_LINKER_FLAGS="-undefined dynamic_lookup" did it. Please try it at your end.
from cmake-js.
With latest iojs v1.7.1
on mac 10.10.3
found this error
ld: symbol(s) not found for architecture x86_64
[1/1] Linking CXX shared library Release/addon.node
FAILED: : && /usr/local/bin/clang++ -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -o Release/addon.node -install_name ./build/Release/addon.node CMakeFiles/addon.dir/src/addon.cc.o CMakeFiles/addon.dir/src/async.cc.o CMakeFiles/addon.dir/src/pi_est.cc.o CMakeFiles/addon.dir/src/sync.cc.o && :
Undefined symbols for architecture x86_64:
"v8::HandleScope::CreateHandle(v8::internal::Isolate_, v8::internal::Object_)", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
NanCallback::Call_(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value_) const in async.cc.o
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
"v8::HandleScope::HandleScope(v8::Isolate_)", referenced from:
CalculateAsync(v8::FunctionCallbackInfov8::Value const&) in async.cc.o
NanAsyncWorker::NanAsyncWorker(NanCallback_) in async.cc.o
NanAsyncWorker::WorkComplete() in async.cc.o
PiWorker::HandleOKCallback() in async.cc.o
NanAsyncWorker::HandleErrorCallback() in async.cc.o
NanAsyncWorker::~NanAsyncWorker() in async.cc.o
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
...
"v8::HandleScope::~HandleScope()", referenced from:
CalculateAsync(v8::FunctionCallbackInfov8::Value const&) in async.cc.o
NanAsyncWorker::NanAsyncWorker(NanCallback_) in async.cc.o
NanAsyncWorker::WorkComplete() in async.cc.o
PiWorker::HandleOKCallback() in async.cc.o
NanAsyncWorker::HandleErrorCallback() in async.cc.o
NanAsyncWorker::~NanAsyncWorker() in async.cc.o
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
...
"v8::HandleScope::~HandleScope()", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
NanCallback::Call_(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value_) const in async.cc.o
"v8::FunctionTemplate::GetFunction()", referenced from:
InitAll(v8::Handlev8::Object) in addon.cc.o
"v8::FunctionTemplate::New(v8::Isolate_, void ()(v8::FunctionCallbackInfov8::Value const&), v8::Handlev8::Value, v8::Handlev8::Signature, int)", referenced from:
InitAll(v8::Handlev8::Object) in addon.cc.o
"v8::EscapableHandleScope::Escape(v8::internal::Object__)", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
NanCallback::Call(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value_) const in async.cc.o
"v8::EscapableHandleScope::EscapableHandleScope(v8::Isolate_)", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
NanCallback::Call_(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value_) const in async.cc.o
"v8::V8::DisposeGlobal(v8::internal::Object**)", referenced from:
NanAsyncWorker::NanAsyncWorker(NanCallback_) in async.cc.o
NanAsyncWorker::WorkComplete() in async.cc.o
NanAsyncWorker::~NanAsyncWorker() in async.cc.o
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
"v8::V8::GlobalizeReference(v8::internal::Isolate_, v8::internal::Object**)", referenced from:
NanAsyncWorker::NanAsyncWorker(NanCallback_) in async.cc.o
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
"v8::Number::New(v8::Isolate_, double)", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
CalculateSync(v8::FunctionCallbackInfov8::Value const&) in sync.cc.o
"v8::Object::Get(unsigned int)", referenced from:
NanCallback::Call_(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value_) const in async.cc.o
"v8::Object::New(v8::Isolate_)", referenced from:
NanAsyncWorker::NanAsyncWorker(NanCallback_) in async.cc.o
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
"v8::Object::Set(v8::Handlev8::Value, v8::Handlev8::Value)", referenced from:
InitAll(v8::Handlev8::Object) in addon.cc.o
"v8::Object::Set(unsigned int, v8::Handlev8::Value)", referenced from:
NanCallback::NanCallback(v8::Handlev8::Function const&) in async.cc.o
"v8::String::NewFromUtf8(v8::Isolate_, char const_, v8::String::NewStringType, int)", referenced from:
InitAll(v8::Handlev8::Object) in addon.cc.o
NanAsyncWorker::HandleErrorCallback() in async.cc.o
"v8::Context::Global()", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
NanAsyncWorker::HandleErrorCallback() in async.cc.o
NanAsyncWorker::HandleOKCallback() in async.cc.o
"v8::Isolate::GetCurrent()", referenced from:
InitAll(v8::Handlev8::Object) in addon.cc.o
CalculateAsync(v8::FunctionCallbackInfov8::Value const&) in async.cc.o
NanAsyncWorker::NanAsyncWorker(NanCallback_) in async.cc.o
NanAsyncWorker::WorkComplete() in async.cc.o
PiWorker::HandleOKCallback() in async.cc.o
NanAsyncWorker::HandleErrorCallback() in async.cc.o
NanCallback::Call_(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value_) const in async.cc.o
...
"v8::Isolate::GetCurrentContext()", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
NanAsyncWorker::HandleErrorCallback() in async.cc.o
NanAsyncWorker::HandleOKCallback() in async.cc.o
"v8::Exception::Error(v8::Handlev8::String)", referenced from:
NanAsyncWorker::HandleErrorCallback() in async.cc.o
"node::MakeCallback(v8::Isolate_, v8::Handlev8::Object, v8::Handlev8::Function, int, v8::Handlev8::Value_)", referenced from:
NanCallback::Call_(v8::Isolate_, v8::Handlev8::Object, int, v8::Handlev8::Value*) const in async.cc.o
"v8::Value::Uint32Value() const", referenced from:
CalculateAsync(v8::FunctionCallbackInfov8::Value const&) in async.cc.o
CalculateSync(v8::FunctionCallbackInfov8::Value const&) in sync.cc.o
"_node_module_register", referenced from:
_register_addon() in addon.cc.o
"_uv_default_loop", referenced from:
CalculateAsync(v8::FunctionCallbackInfov8::Value const&) in async.cc.o
"_uv_queue_work", referenced from:
CalculateAsync(v8::FunctionCallbackInfov8::Value const&) in async.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
at ~/.iojs/lib/node_modules/cmake-js/lib/cMake.js:293:28
at ~/.iojs/lib/node_modules/cmake-js/node_modules/cli/cli.js:1079:24
at ChildProcess.exithandler (child_process.js:692:5)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:169:7)
at maybeClose (child_process.js:953:16)
at Socket.<anonymous> (child_process.js:1118:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:166:7)
at Pipe._onclose (net.js:453:12)
from cmake-js.
Thanks, man! What's the result of the following (run this in your module's root folder):
./node_modules/.bin/cmake-js print-configure
from cmake-js.
I'm trying to get a Mac image for VMWare Player, but I'm totally noob with this. Which version is the popular one? Mountain Wolverine or what?
from cmake-js.
Current version of Mac is 10.10.3 OSX Yosemite
http://en.wikipedia.org/wiki/OS_X,
you should use any version above 10.7
The result of
./node_modules/.bin/cmake-js print-configure
cmake /cmake-js-tut-01-module -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/cmake-js-tut-01-module/build/Release" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_JS_INC="/.cmake-js/iojs-x64/v1.7.1/src;/.cmake-js/iojs-x64/v1.7.1/deps/v8/include;/.cmake-js/iojs-x64/v1.7.1/deps/uv/include;/cmake-js-tut-01-module/node_modules/nan" -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++"
Thank you!
from cmake-js.
clang --version
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
clang++ --version
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
iojs --version
v1.7.1
npm --version
2.7.5
from cmake-js.
I think there should be a symbol definied for v8 headers on Mac to define imports. I gotta get a Mac image, and fix this. Thanks.
from cmake-js.
I wasn't able to find a working OSX image above 10.7. Are there any C++/Node.js related issues those prevent me to use 10.5.5 for fixing this?
from cmake-js.
Is it 64bit ? if it is, you can try and see the results, I don't have 10.5.5 at the moment, I am using macbook pro, not the VM..
from cmake-js.
It's x86. I'm tryin to get an x64 image. Till please try something for me. Put the following into the CMakeLists.txt right after the project (addon)
line:
if (CMAKE_SYSTEM_NAME MATCHES Darwin)
if(CMAKE_GENERATOR STREQUAL Xcode)
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -undefined dynamic_lookup")
else(CMAKE_GENERATOR STREQUAL Xcode)
SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-undefined,dynamic_lookup")
endif(CMAKE_GENERATOR STREQUAL Xcode)
endif (CMAKE_SYSTEM_NAME MATCHES Darwin)
Then ./node_modules/.bin/cmake-js rebuild
.
Now, what's the result?
from cmake-js.
Sorry, it is still the same error.
./node_modules/.bin/cmake-js rebuild
info CLEAN
info cmake -E remove_directory "/cmake-js-tut-01-module/build"/.cmake-js/iojs-x64/v1.7.1/src;
info CONFIGURE
info cmake /cmake-js-tut-01-module -GNinja -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/cmake-js-tut-01-module/build/Release" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_JS_INC="/.cmake-js/iojs-x64/v1.7.1/deps/v8/include;/.cmake-js/iojs-x64/v1.7.1/deps/uv/include;/cmake-js-tut-01-module/node_modules/nan" -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++"/cmake-js-tut-01-module/build" --config Release
info BUILD
info cmake --build "
ERR! Command failed: /bin/sh -c cmake --build "~/cmake-js-tut-01-module/build" --config Release
[1/5] Building CXX object CMakeFiles/addon.dir/src/addon.cc.o
[2/5] Building CXX object CMakeFiles/addon.dir/src/async.cc.o
[3/5] Building CXX object CMakeFiles/addon.dir/src/pi_est.cc.o
[4/5] Building CXX object CMakeFiles/addon.dir/src/sync.cc.o
[5/5] Linking CXX shared library Release/addon.node
FAILED: : && /usr/local/bin/clang++ -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -o Release/addon.node -install_name ~/cmake-js-tut-01-module/build/Release/addon.node CMakeFiles/addon.dir/src/addon.cc.o CMakeFiles/addon.dir/src/async.cc.o CMakeFiles/addon.dir/src/pi_est.cc.o CMakeFiles/addon.dir/src/sync.cc.o && :
Undefined symbols for architecture x86_64:
"v8::HandleScope::CreateHandle(v8::internal::Isolate_, v8::internal::Object_)", referenced from:
PiWorker::HandleOKCallback() in async.cc.o
.....
.....
.....
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
from cmake-js.
just tried it again with latest iojs version 1.8.1, same problem..
./node_modules/.bin/cmake-js rebuild
info Downloading distribution files.
http - https://iojs.org/dist/v1.8.1/SHASUMS256.txt
http - https://iojs.org/dist/v1.8.1/iojs-v1.8.1.tar.gz
info CLEAN
info cmake -E remove_directory "/cmake-js-tut-01-module/build"/.cmake-js/iojs-x64/v1.8.1/src;
info CONFIGURE
info cmake /cmake-js-tut-01-module -GNinja -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="/cmake-js-tut-01-module/build/Release" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_JS_INC="/.cmake-js/iojs-x64/v1.8.1/deps/v8/include;/.cmake-js/iojs-x64/v1.8.1/deps/uv/include;/cmake-js-tut-01-module/node_modules/nan" -DCMAKE_C_COMPILER="clang" -DCMAKE_CXX_COMPILER="clang++"/cmake-js-tut-01-module/build" --config Release
info BUILD
info cmake --build "
ERR! Command failed: /bin/sh -c cmake --build "~/cmake-js-tut-01-module/build" --config Release
[1/5] Building CXX object CMakeFiles/addon.dir/src/addon.cc.o
[2/5] Building CXX object CMakeFiles/addon.dir/src/async.cc.o
[3/5] Building CXX object CMakeFiles/addon.dir/src/pi_est.cc.o
[4/5] Building CXX object CMakeFiles/addon.dir/src/sync.cc.o
[5/5] Linking CXX shared library Release/addon.node
FAILED: : && /usr/local/bin/clang++ -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -o Release/addon.node -install_name ~/cmake-js-tut-01-module/build/Release/addon.node CMakeFiles/addon.dir/src/addon.cc.o CMakeFiles/addon.dir/src/async.cc.o CMakeFiles/addon.dir/src/pi_est.cc.o CMakeFiles/addon.dir/src/sync.cc.o && :
Undefined symbols for architecture x86_64:
"v8::HandleScope::CreateHandle(v8::internal::Isolate_, v8::internal::Object_)", referenced from:
from cmake-js.
Hackintosh OSX Mountain Wolverine 10.8.5.7.8.11 x64 installing in progress. :) I'm gonna look into this as soon as it get completed.
from cmake-js.
Good Luck :)
from cmake-js.
Yeah, I need that. Installing Xcode with appropriate commandline tools for not the actual version of OSX is a huge PITA especially for a noob like me. Mac supposed to be an extremelly easy to use stuff, but I think this is not the case. If you don't pay for the most recent version, you funked.
from cmake-js.
I remember when I was a Linux noob and installed a Mint. It was pretty straightforward, after a couple of minutes I had a dev powerhouse with Clang/Ninja/Qt Creator, and no shit happened since.
Just a quick question: can I install a recent (10.10) command line tools to have Clang 3.6, or should I stay with the old one. My system is 10.8, and maximum allowed Xcode version is 4.6.3.
from cmake-js.
Just stick with current XCode tools,
aside from that I am using a package manager for mac it is called homebrew, to install almost all linux/unix based utilities/programs, http://brew.sh/, unfortunately for iojs you can't use it due to conflicts with node, it may get solved in near future.
from cmake-js.
Omfg, finally I have a funked OSX x64 in Virtualbox, and I'm able to reproduce this issue. There is something gotta defined to get ot compile definitely. For today I give up Ive got a hedache. But tomorrow Im gonna fix thos for sure. I gotta compare makefile from node-gyp with makefile from cmake.js, there should be the difference that gyp does to compile v8 headers correctly.
from cmake-js.
Thanks a lot for your efforts, I can confirm now that it is now working on OSX 10.8.
from cmake-js.
Thanks for ur help. You can help me with spreading the word that CMake is already available for node as a native build system. ;)
from cmake-js.
Related Issues (20)
- Electron not auto detected and runtime fail HOT 2
- Failure to parse package.json (containing trailing commas) is not reported HOT 3
- node-datachannel uses cmake-js HOT 1
- Cannot open include file: 'napi.h' HOT 7
- cmake-js v8 ideas HOT 18
- Problem with clang-cl toolchain on windows (and solution) HOT 1
- print-configure doesn't respect -o (specifying build directory)
- Values passed via `--CD` gets incorrectly converted to numbers
- CMake/ninja error: '**/System/Library/Frameworks/CoreAudio.framework/CoreAudio', needed by 'Release/addon.node', missing and no known rule to make it
- Error while executing the `rebuild` command HOT 2
- Builds fail in bash on Windows (PATH vs Path)
- Dull on windows after while HOT 2
- Failing to resolve node_api.h with Microsoft intellisense in Visual Studio Code HOT 2
- Add a c version of win_delay_load_hook
- ERR! OMG There is no Visual C++ compiler installed. Install Visual C++ Build Toolset or Visual Studio.
- use cmake-js without msvc
- include arm64 in release
- Having 'nan' in node_modules causes error with string sub-command FIND
- Consider introducing a CMake module
- compiled addon for nwjs not works
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmake-js.