You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if is32bit:
if MACH == 'i686' or MACH == 'i386' or MACH == 'x86':
TARGET_ARCH='x86'
else:
TARGET_ARCH='arm'
else:
TARGET_ARCH='' 这一句改为如下
TARGET_ARCH='arm64'
编译好awtk再去编译awtk-nodejs
然后想运行demo,就看到如下错误了
fanzhiri@fanzhirideAir awtk-nodejs % node demos/button.js
/Users/fanzhiri/GitHub/awtk-nodejs/node_modules/bindings/bindings.js:121
throw e;
^
Error: dlopen(/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node, 1): no suitable image found. Did find:
/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node: mach-o, but wrong architecture
/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node: mach-o, but wrong architecture
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at bindings (/Users/fanzhiri/GitHub/awtk-nodejs/node_modules/bindings/bindings.js:112:48)
at Object. (/Users/fanzhiri/GitHub/awtk-nodejs/awtk.js:1:31)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
The text was updated successfully, but these errors were encountered:
Error: dlopen(/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node, 0x0001): tried: '/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/awtk.node' (no such file), '/usr/lib/awtk.node' (no such file)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at bindings (/Users/fanzhiri/GitHub/awtk-nodejs/node_modules/bindings/bindings.js:117:48)
at Object. (/Users/fanzhiri/GitHub/awtk-nodejs/awtk.js:1:31)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
我先修改了awtk/awtk_config.py中TARGET_ARCH
if is32bit:
if MACH == 'i686' or MACH == 'i386' or MACH == 'x86':
TARGET_ARCH='x86'
else:
TARGET_ARCH='arm'
else:
TARGET_ARCH='' 这一句改为如下
TARGET_ARCH='arm64'
编译好awtk再去编译awtk-nodejs
然后想运行demo,就看到如下错误了
fanzhiri@fanzhirideAir awtk-nodejs % node demos/button.js
/Users/fanzhiri/GitHub/awtk-nodejs/node_modules/bindings/bindings.js:121
throw e;
^
Error: dlopen(/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node, 1): no suitable image found. Did find:
/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node: mach-o, but wrong architecture
/Users/fanzhiri/GitHub/awtk-nodejs/build/Release/awtk.node: mach-o, but wrong architecture
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at bindings (/Users/fanzhiri/GitHub/awtk-nodejs/node_modules/bindings/bindings.js:112:48)
at Object. (/Users/fanzhiri/GitHub/awtk-nodejs/awtk.js:1:31)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
The text was updated successfully, but these errors were encountered: