#365

native build failed on windows 11 with nodejs v24.18.0

Openra9faelopened 2mo ago
dev\github\test
❯ native init my_app
created Native SDK app at my_app (native)

Next steps:
  cd my_app
  native dev

dev\github\test
❯ cd .\my_app\

github\test\my_app via  v24.18.0
❯ native dev
native dev: building and running my-app (Debug) 鈥?hot reload arms in Debug builds

run
└─ run exe my-app
   └─ compile exe my-app Debug native
      └─ WriteFile core.zig
         └─ run exe corewire (core_shim.zig)
            └─ run C:\Program Files\nodejs\node.exe (libmy_app_core.a) failure
file:///C:/Users/renfei/AppData/Roaming/npm/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/backend/cc.js:1165
                    throw new Error(`${driver.argv.join(" ")} failed compiling ${src} for the library archive.\n` +
                          ^

Error: clang failed compiling C:\Users\renfei\AppData\Local\Temp\native-external-core-7IyN9x\core_facade.lib.ll for the library archive.
This is a scriptc bug (generated/runtime C should always compile) unless the compiler itself is missing/broken.


    at compileOne (file:///C:/Users/renfei/AppData/Roaming/npm/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/backend/cc.js:1165:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async compileLibArchive (file:///C:/Users/renfei/AppData/Roaming/npm/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/backend/cc.js:1176:35)
    at async compileLibrary (file:///C:/Users/renfei/AppData/Roaming/npm/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/index.js:1520:5)
    at async main (file:///C:/Users/renfei/AppData/Roaming/npm/node_modules/@native-sdk/cli/node_modules/scriptc/dist/main.js:165:24)
    at async file:///C:/Users/renfei/AppData/Roaming/npm/node_modules/@native-sdk/cli/node_modules/scriptc/dist/main.js:332:24

Node.js v24.18.0
error: process exited with error code 1
failed command: "C:\\Program Files\\nodejs\\node.exe" ".\\.native/build\\../sdk\\packages\\core\\scripts\\run_external_core_compiler.mjs" --stage ".\\.native\\build\\.zig-cache\\o\\9ea96f1abc68fc09268a6f748edbf39a\\stage" --name my_app_core --manifest ".\\.native/build\\../sdk\\packages\\core\\package.json" --frontend-sidecar ".\\.native\\build\\.zig-cache\\o\\1e376547b2a3c70d8f8d04ac185994d2\\core.contract.json" --out-archive "D:\\dev\\github\\test\\my_app\\.native\\build\\.zig-cache\\o\\13941a453ed8255431449ca541915426\\libmy_app_core.a" --out-sidecar "D:\\dev\\github\\test\\my_app\\.native\\build\\.zig-cache\\o\\13941a453ed8255431449ca541915426\\core.contract.json" --host-platform x86_64-windows-gnu --target-platform x86_64-windows-gnu --zig-exe "C:\\Users\\renfei\\scoop\\apps\\zig\\0.16.0\\zig.exe" --compiler-js "C:\\Users\\renfei\\AppData\\Roaming\\npm\\node_modules\\@native-sdk\\cli\\node_modules\\scriptc\\dist\\main.js"

Build Summary: 5/11 steps succeeded (1 failed)
run transitive failure
└─ run exe my-app transitive failure
   └─ compile exe my-app Debug native transitive failure
      ├─ WriteFile core.zig transitive failure
      │  └─ run exe corewire (core_shim.zig) transitive failure
      │     └─ run C:\Program Files\nodejs\node.exe (libmy_app_core.a) failure
      └─ run C:\Program Files\nodejs\node.exe (libmy_app_core.a) (+2 more reused dependencies)

error: the following build command failed with exit code 1:
.native\build\.zig-cache\o\b00e6081a53860b7497e68d80e4b5c7a\build.exe C:\Users\renfei\scoop\apps\zig\0.16.0\zig.exe C:\Users\renfei\scoop\apps\zig\0.16.0\lib .native/build .native\build\.zig-cache C:\Users\renfei\AppData\Local\zig --seed 0xb340494b -Zd65e17c4648d55e1 --prefix D:\dev\github\test\my_app\zig-out run -Doptimize=Debug
native dev: `zig build` step failed (exit code 1)
if the errors above name missing std members, the code may use pre-0.16 Zig idioms - run `native skills get zig` or see https://native-sdk.dev/zig

Activity

3
ra9fael2mo ago

Build failed on Ubuntu24.04 too.

Downloads/tmp/my_app via  v24.15.0
❯ native dev
native dev: building and running my-app (Debug) — hot reload arms in Debug builds
run
└─ run exe my-app
   └─ compile exe my-app Debug native
      └─ run /home/rf/.local/share/fnm/node-versions/v24.15.0/installation/bin/node (libmy_app_core.a) failure
file:///home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/backend/cc.js:1165
                    throw new Error(`${driver.argv.join(" ")} failed compiling ${src} for the library archive.\n` +
                          ^

Error: clang failed compiling /tmp/native-external-core-FF5d6B/core_facade.lib.ll for the library archive.
This is a scriptc bug (generated/runtime C should always compile) unless the compiler itself is missing/broken.


    at compileOne (file:///home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/backend/cc.js:1165:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
    at async compileLibArchive (file:///home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/backend/cc.js:1176:35)
    at async compileLibrary (file:///home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/@scriptc/compiler/dist/index.js:1520:5)
    at async main (file:///home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/scriptc/dist/main.js:165:24)
    at async file:///home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/scriptc/dist/main.js:332:24

Node.js v24.15.0
error: process exited with error code 1
failed command: /home/rf/.local/share/fnm/node-versions/v24.15.0/installation/bin/node ./.native/build/../../../../../.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/packages/core/scripts/run_external_core_compiler.mjs --stage ./.native/build/.zig-cache/o/3c009e753c4721c9eb9260b9ab74caf9/stage --name my_app_core --manifest ./.native/build/../../../../../.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/packages/core/package.json --frontend-sidecar ./.native/build/.zig-cache/o/1f71ddee6f870595522d3e8b4524db47/core.contract.json --out-archive /home/rf/Downloads/tmp/my_app/.native/build/.zig-cache/o/597dccb3c02e1fd0138fafc0b8b9d49b/libmy_app_core.a --out-sidecar /home/rf/Downloads/tmp/my_app/.native/build/.zig-cache/o/597dccb3c02e1fd0138fafc0b8b9d49b/core.contract.json --host-platform x86_64-linux-gnu --target-platform x86_64-linux-gnu --zig-exe /opt/zig/zig-x86_64-linux-0.16.0/zig --compiler-js /home/rf/.local/share/fnm/node-versions/v24.15.0/installation/lib/node_modules/@native-sdk/cli/node_modules/scriptc/dist/main.js

Build Summary: 5/11 steps succeeded (1 failed)
run transitive failure
└─ run exe my-app transitive failure
   └─ compile exe my-app Debug native transitive failure
      ├─ WriteFile core.zig transitive failure
      │  └─ run exe corewire (core_shim.zig) transitive failure
      │     └─ run /home/rf/.local/share/fnm/node-versions/v24.15.0/installation/bin/node (libmy_app_core.a) failure
      └─ run /home/rf/.local/share/fnm/node-versions/v24.15.0/installation/bin/node (libmy_app_core.a) (+2 more reused dependencies)

error: the following build command failed with exit code 1:
.native/build/.zig-cache/o/5f40344c606e10203aa8abd6b99d96f6/build /opt/zig/zig-x86_64-linux-0.16.0/zig /opt/zig/zig-x86_64-linux-0.16.0/lib .native/build .native/build/.zig-cache /home/rf/.cache/zig --seed 0x747f68bb -Z05a6db60b2da618c --prefix /home/rf/Downloads/tmp/my_app/zig-out run -Doptimize=Debug
native dev: `zig build` step failed (exit code 1)
if the errors above name missing std members, the code may use pre-0.16 Zig idioms - run `native skills get zig` or see https://native-sdk.dev/zig
xch10292mo ago

+1

Virgil-N19d ago

+1