gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Build failure when using PodMan

Open scottdensmore opened this issue 1 year ago • 6 comments

Describe the bug When doing a npm install then npm run start from macOS using podman it fails. (my guess is because of the different architectures) I attached the call stack after doing npm run start

Additional context Build is up-to-date. hopping into sandbox (command: podman) ...

[email protected] start NODE_ENV=development scripts/start.sh

Checking build status... Build is up-to-date. node:internal/modules/cjs/loader:1651 return process.dlopen(module, path.toNamespacedPath(filename)); ^

Error: /Users/scottdensmore/Developer/google-gemini/gemini-code/node_modules/sqlite3/build/Release/node_sqlite3.node: invalid ELF header at Module._extensions..node (node:internal/modules/cjs/loader:1651:18) at Module.load (node:internal/modules/cjs/loader:1275:32) at Module._load (node:internal/modules/cjs/loader:1096:12) at Module.require (node:internal/modules/cjs/loader:1298:19) at require (node:internal/modules/helpers:182:18) at bindings (/Users/scottdensmore/Developer/google-gemini/gemini-code/node_modules/bindings/bindings.js:112:48) at Object. (/Users/scottdensmore/Developer/google-gemini/gemini-code/node_modules/sqlite3/lib/sqlite3-binding.js:1:37) at Module._compile (node:internal/modules/cjs/loader:1529:14) at Module._extensions..js (node:internal/modules/cjs/loader:1613:10) at Module.load (node:internal/modules/cjs/loader:1275:32) { code: 'ERR_DLOPEN_FAILED' }

scottdensmore avatar May 23 '25 23:05 scottdensmore

eeek that's bad. @olcan would you mind taking a look?

NTaylorMullen avatar May 23 '25 23:05 NTaylorMullen

this seems related to the image deployment issue tracked in b/418454925 that @KeijiBranshi is working on a workaround for now might be to build the image locally via npm run build:all

olcan avatar May 25 '25 15:05 olcan

@olcan does that mean this wont repro in normal dogfood builds?

NTaylorMullen avatar May 25 '25 17:05 NTaylorMullen

i was going to say building locally should be fine, but i just tried it on my cloudtop and it failed, so sandboxing is totally broken on cloudtops right now and we should probably roll back the change that introduced this sqlite dependency until it can be tested in sandbox

olcan avatar May 26 '25 16:05 olcan

correction: this is broken on macos, cloudtops seem fine

olcan avatar May 26 '25 16:05 olcan

as a workaround on MacOS i would disable the GEMINI_SANDBOX (or GEMINI_CODE_SANDBOX) env var and use native sandboxing (seatbelt) for now

olcan avatar May 26 '25 16:05 olcan