export GYP_GENERATORS="ninja,xcode-ninja"
export GYP_DEFINES="clang=0"
export is_debug=false
export target_cpu="x64"
Build nwjs
cd src
ninja -C out/nw nwjs
But final nwjs build crashed with below backtrace
[0102/151300:WARNING:zip.cc(106)] Failed to open nwjs/src/out/nw/package.nw
[16921:1299:0102/151301:WARNING:persistent_histogram_allocator.cc(502)] Creating the results-histogram inside persistent memory can cause future allocations to crash if that memory is ever released (for testing).
[16921:1299:0102/151301:INFO:startup_browser_creator.cc(740)] loading default app: aafddpmiffkameplnjkglahmbnbgidce
[16924:16899:0102/151301:WARNING:persistent_histogram_allocator.cc(502)] Creating the results-histogram inside persistent memory can cause future allocations to crash if that memory is ever released (for testing).
[16921:1299:0102/151301:WARNING:push_messaging_service_factory.cc(30)] PushMessagingService could not be built because InstanceID is unexpectedly disabled
[16925:1299:0102/151301:FATAL:nw_content_renderer_hooks.cc(48)]
Failed to load node library (error: dlopen(nwjs/src/out/nw/
nwjs.app/Contents/Versions/55.0.2883.87/nwjs Framework.framework/libnode.dylib, 1): image not found)
0 libbase.dylib 0x00000001207e1abe _ZN4base5debug10StackTraceC2Ev + 30
1 libbase.dylib 0x00000001207e1b25 _ZN4base5debug10StackTraceC1Ev + 21
2 libbase.dylib 0x0000000120878750 _ZN7logging10LogMessageD2Ev + 80
3 libbase.dylib 0x0000000120876305 _ZN7logging10LogMessageD1Ev + 21
4 libcontent.dylib 0x0000000128df422f _ZN2nw15LoadNodeSymbolsEv + 495
5 libcontent.dylib 0x00000001288a3a9e _ZN7content12RendererMainERKNS_18MainFunctionParamsE + 430
6 libcontent.dylib 0x0000000128dec527 _ZN7content23RunNamedProcessTypeMainERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_18MainFunctionParamsEPNS_19ContentMainDelegateE + 599
7 libcontent.dylib 0x0000000128dee973 _ZN7content21ContentMainRunnerImpl3RunEv + 2851
8 libcontent.dylib 0x0000000128debdad _ZN7content11ContentMainERKNS_17ContentMainParamsE + 349
9 libnw.dylib 0x000000010dd010e9 ChromeMain + 105
10 nwjs Helper 0x000000010dcc4d8c main + 780
11 nwjs Helper 0x000000010dcc4a74 start + 52
[16921:1299:0102/151301:WARNING:url_request_context_getter.cc(43)] URLRequestContextGetter leaking due to no owning thread.
[16921:1299:0102/151301:WARNING:pref_notifier_impl.cc(24)] Pref observer found at shutdown.
[16921:1299:0102/151301:ERROR:keep_alive_registry.cc(77)] KeepAliveRegistry not empty at destruction time. State:{registered_count_=1, restart_allowed_count_=0, KeepAlives=[APP_CONTROLLER (1)]}
logout
[Process completed]
As bt says Failed to load node library i tried to build the node library but it fails with error "ld: file not found: @rpath/libnw.dylib for architecture x86_64" Below is complete error.
cd src
ninja -C out/Release node
ninja: Entering directory `out/Release'
[1/1] SOLINK libnode.dylib, POSTBUILDS
FAILED: libnode.dylib libnode.dylib.TOC
if [ ! -e libnode.dylib -o ! -e libnode.dylib.TOC ] || otool -l libnode.dylib | grep -q LC_REEXPORT_DYLIB ; then c++ -shared ../nw/nwjs\ Framework.framework/nwjs\ Framework -Wl,-force_load ../nw/obj/v8/libv8_libbase.a -Wl,-force_load ../nw/obj/v8/libv8_libplatform.a -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./ -install_name /usr/local/lib/libnode.dylib -Wl,-rpath,@loader_path/../../../../../../.. -stdlib=libc++ -o libnode.dylib @libnode.dylib.rsp && (export BUILT_FRAMEWORKS_DIR=//nwjs/src/out/Release; export BUILT_PRODUCTS_DIR=//nwjs/src/out/Release; export CONFIGURATION=Release; export DYLIB_INSTALL_NAME_BASE=/usr/local/lib; export EXECUTABLE_NAME=libnode.dylib; export EXECUTABLE_PATH=libnode.dylib; export FULL_PRODUCT_NAME=libnode.dylib; export LD_DYLIB_INSTALL_NAME=/usr/local/lib/libnode.dylib; export MACH_O_TYPE=mh_dylib; export PRODUCT_NAME=node; export PRODUCT_TYPE=com.apple.product-type.library.dynamic; export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk; export SRCROOT=//nwjs/src/out/Release/../../third_party/node; export SOURCE_ROOT="${SRCROOT}"; export TARGET_BUILD_DIR=//nwjs/src/out/Release; export TEMP_DIR="${TMPDIR}"; export XCODE_VERSION_ACTUAL=0720; (cd ../../third_party/node && install_name_tool -change "@executable_path/../Versions/55.0.2883.87/nwjs Framework.framework/nwjs Framework" "@executable_path/../../../nwjs Framework.framework/nwjs Framework" "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"); G=$?; ((exit $G) || rm -rf libnode.dylib) && exit $G) && { otool -l libnode.dylib | grep LC_ID_DYLIB -A 5; nm -gP libnode.dylib | cut -f1-2 -d' ' | grep -v U$; true; } > libnode.dylib.TOC; else c++ -shared ../nw/nwjs\ Framework.framework/nwjs\ Framework -Wl,-force_load ../nw/obj/v8/libv8_libbase.a -Wl,-force_load ../nw/obj/v8/libv8_libplatform.a -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./ -install_name /usr/local/lib/libnode.dylib -Wl,-rpath,@loader_path/../../../../../../.. -stdlib=libc++ -o libnode.dylib @libnode.dylib.rsp && (export BUILT_FRAMEWORKS_DIR=//nwjs/src/out/Release; export BUILT_PRODUCTS_DIR=//nwjs/src/out/Release; export CONFIGURATION=Release; export DYLIB_INSTALL_NAME_BASE=/usr/local/lib; export EXECUTABLE_NAME=libnode.dylib; export EXECUTABLE_PATH=libnode.dylib; export FULL_PRODUCT_NAME=libnode.dylib; export LD_DYLIB_INSTALL_NAME=/usr/local/lib/libnode.dylib; export MACH_O_TYPE=mh_dylib; export PRODUCT_NAME=node; export PRODUCT_TYPE=com.apple.product-type.library.dynamic; export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk; export SRCROOT=//nwjs/src/out/Release/../../third_party/node; export SOURCE_ROOT="${SRCROOT}"; export TARGET_BUILD_DIR=//nwjs/src/out/Release; export TEMP_DIR="${TMPDIR}"; export XCODE_VERSION_ACTUAL=0720; (cd ../../third_party/node && install_name_tool -change "@executable_path/../Versions/55.0.2883.87/nwjs Framework.framework/nwjs Framework" "@executable_path/../../../nwjs Framework.framework/nwjs Framework" "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"); G=$?; ((exit $G) || rm -rf libnode.dylib) && exit $G) && { otool -l libnode.dylib | grep LC_ID_DYLIB -A 5; nm -gP libnode.dylib | cut -f1-2 -d' ' | grep -v U$; true; } > libnode.dylib.tmp && if ! cmp -s libnode.dylib.tmp libnode.dylib.TOC; then mv libnode.dylib.tmp libnode.dylib.TOC ; fi; fi
ld: file not found: @rpath/libnw.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Request you to please suggest what i am missing.
Regards,
Shivani Pahuja