Deeplocal / fruit-genie

77 stars 15 forks source link

Add a note/faq about possible install prerequisites on osx Mojave #4

Open notwaldorf opened 5 years ago

notwaldorf commented 5 years ago

Using node v10.8.0 (npm v6.2.0) on Mac Mojave, I originally had this error installing:

Expand for full error message > midi@0.9.5 install /Users/noms/Code/fruit-genie/fruit_genie_controller/node_modules/midi > node-gyp rebuild CXX(target) Release/obj.target/midi/src/node-midi.o ../src/node-midi.cpp:105:27: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations] std::string name(*v8::String::Utf8Value(info[0].As())); ^ /Users/noms/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here V8_DEPRECATED("Use Isolate version", ^ /Users/noms/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated)) ^ ../src/node-midi.cpp:211:18: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations] Nan::MakeCallback(input->handle(), emitFunction, 3, info); ^ ../../nan/nan.h:1024:3: note: 'MakeCallback' has been explicitly marked deprecated here NAN_DEPRECATED inline v8::Local MakeCallback( ^ ../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED' # define NAN_DEPRECATED __attribute__((deprecated)) ^ ../src/node-midi.cpp:293:27: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations] std::string name(*v8::String::Utf8Value(info[0].As())); ^ /Users/noms/.node-gyp/10.8.0/include/node/v8.h:2851:5: note: 'Utf8Value' has been explicitly marked deprecated here V8_DEPRECATED("Use Isolate version", ^ /Users/noms/.node-gyp/10.8.0/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED' declarator __attribute__((deprecated)) ^ 3 warnings generated. SOLINK_MODULE(target) Release/midi.node ld: malformed file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks//CoreMIDI.framework/CoreMIDI.tbd:4:18: error: unknown enumerated scalar platform: zippered ^~~~~~~~ file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks//CoreMIDI.framework/CoreMIDI.tbd' clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Release/midi.node] Error 1

After googling around and finding this answer, the solution seems to be to run this:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Do you want me to send a PR to add this as a prerequisite or in an FAQ or something?