Open popey opened 1 year ago
Indeed on the CI we had to force Node to use more memory: https://github.com/4ian/GDevelop/blob/7229406cfbdbf79624b6a64dbdb6d93fb53cdfa6/.circleci/config.yml#L68
Try something like:
export NODE_OPTIONS="--max-old-space-size=7168" && npm run build
and let us know if it works better? If yes, we might want to put this in the README (or hopefully one day migrate from create-react-app to Vite or a tooling that uses less memory)
Thanks for the prompt response. Yes, that helped. But it now fails further along. Looks like it's trying to build or run x86 binaries on my arm64 device?
• building target=AppImage arch=x64 file=dist/GDevelop 5-5.3.180.AppImage
• building target=zip arch=x64 file=dist/gdevelop-5.3.180.zip
• packaging platform=linux arch=arm64 electron=18.2.2 appOutDir=dist/linux-arm64-unpacked • downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/appimage-12.0.1/appimage-12.0.1.7z size=1.6 MB parts=1
• downloading url=https://github.com/electron/electron/releases/download/v18.2.2/electron-v18.2.2-linux-arm64.zip size=89 MB parts=8
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/appimage-12.0.1/appimage-12.0.1.7z duration=1.132s
• downloaded url=https://github.com/electron/electron/releases/download/v18.2.2/electron-v18.2.2-linux-arm64.zip duration=7.072s
• file source doesn't exist from=/home/alan/Source/4ian/GDevelop/newIDE/app/resources/in-app-tutorials
• building target=AppImage arch=arm64 file=dist/GDevelop 5-5.3.180-arm64.AppImage
• building target=zip arch=arm64 file=dist/gdevelop-5.3.180-arm64.zip
• building target=deb arch=x64 file=dist/gdevelop_5.3.180_amd64.deb
⨯ cannot execute cause=exit status 1
errorOut=/home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/alan/.cache/electron-builder/fpm/fpm
-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: cannot execute binary file: Exec format error
/home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/li
b/ruby/bin.real/ruby: Success
command=/home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm -s dir --force -t deb -d libgtk-3-0 -d libnotify4 -d libnss3 -d li
bxss1 -d libxtst6 -d xdg-utils -d libatspi2.0-0 -d libuuid1 -d libsecret-1-0 --deb-recommends libappindicator3-1 --deb-compression xz --architecture amd64 --after-
install /tmp/t-ngfEYN/1-after-install --after-remove /tmp/t-ngfEYN/0-after-remove --description '
GDevelop 5 IDE - the open-source, cross-platform game engine designed for everyone' --version 5.3.180 --package /home/alan/Source/4ian/GDevelop/newIDE/electro
n-app/dist/gdevelop_5.3.180_amd64.deb --name gdevelop --maintainer 'GDevelop Team <hello@gdevelop.io>' --url https://gdevelop.io --vendor 'GDevelop Team <hello@gde
velop.io>' --deb-priority optional --license MIT '/home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/linux-unpacked/=/opt/GDevelop 5' /home/alan/Source/4ian/
GDevelop/newIDE/electron-app/dist/.icon-set/icon_16x16.png=/usr/share/icons/hicolor/16x16/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dis
t/.icon-set/icon_32.png=/usr/share/icons/hicolor/32x32/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_48x48.png=/usr/sha
re/icons/hicolor/48x48/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_64.png=/usr/share/icons/hicolor/64x64/apps/gdevelo
p.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_128.png=/usr/share/icons/hicolor/128x128/apps/gdevelop.png /home/alan/Source/4ian/GDe
velop/newIDE/electron-app/dist/.icon-set/icon_256.png=/usr/share/icons/hicolor/256x256/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.
icon-set/icon_512.png=/usr/share/icons/hicolor/512x512/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_1024.png=/usr/shar
e/icons/hicolor/1024x1024/apps/gdevelop.png '/tmp/t-ngfEYN/2-GDevelop 5.desktop=/usr/share/applications/gdevelop.desktop'
workingDir=
• building target=deb arch=arm64 file=dist/gdevelop_5.3.180_arm64.deb
⨯ cannot execute cause=exit status 1
errorOut=/home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/alan/.cache/electron-builder/fpm/fpm
-1.9.3-2.3.1-linux-x86/lib/ruby/bin.real/ruby: cannot execute binary file: Exec format error
/home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/lib/ruby/bin/ruby: line 6: /home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/li
b/ruby/bin.real/ruby: Success
[36/421]
command=/home/alan/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86/fpm -s dir --force -t deb -d libgtk-3-0 -d libnotify4 -d libnss3 -d li
bxss1 -d libxtst6 -d xdg-utils -d libatspi2.0-0 -d libuuid1 -d libsecret-1-0 --deb-recommends libappindicator3-1 --deb-compression xz --architecture arm64 --after-
install /tmp/t-ngfEYN/1-after-install --after-remove /tmp/t-ngfEYN/0-after-remove --description '
GDevelop 5 IDE - the open-source, cross-platform game engine designed for everyone' --version 5.3.180 --package /home/alan/Source/4ian/GDevelop/newIDE/electro
n-app/dist/gdevelop_5.3.180_arm64.deb --name gdevelop --maintainer 'GDevelop Team <hello@gdevelop.io>' --url https://gdevelop.io --vendor 'GDevelop Team <hello@gde
velop.io>' --deb-priority optional --license MIT '/home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/linux-arm64-unpacked/=/opt/GDevelop 5' /home/alan/Source
/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_16x16.png=/usr/share/icons/hicolor/16x16/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-a
pp/dist/.icon-set/icon_32.png=/usr/share/icons/hicolor/32x32/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_48x48.png=/u
sr/share/icons/hicolor/48x48/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_64.png=/usr/share/icons/hicolor/64x64/apps/g
develop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_128.png=/usr/share/icons/hicolor/128x128/apps/gdevelop.png /home/alan/Source/4i
an/GDevelop/newIDE/electron-app/dist/.icon-set/icon_256.png=/usr/share/icons/hicolor/256x256/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/
dist/.icon-set/icon_512.png=/usr/share/icons/hicolor/512x512/apps/gdevelop.png /home/alan/Source/4ian/GDevelop/newIDE/electron-app/dist/.icon-set/icon_1024.png=/us
r/share/icons/hicolor/1024x1024/apps/gdevelop.png '/tmp/t-ngfEYN/3-GDevelop 5.desktop=/usr/share/applications/gdevelop.desktop'
workingDir=
⨯ Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
Error: /home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-bin/linux/arm64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
2
at ChildProcess.<anonymous> (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/util.ts:250:14)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
Error #2 --------------------------------------------------------------------------------
Error: /home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-bin/linux/arm64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
2
at ChildProcess.<anonymous> (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/util.ts:250:14)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) failedTask=build stackTrace=Error: Cannot cleanup:
Error #1 -------------------
-------------------------------------------------------------
Error: /home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-bin/linux/arm64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
2
at ChildProcess.<anonymous> (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/util.ts:250:14)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
Error #2 -------------------
-------------------------------------------------------------
Error: /home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-bin/linux/arm64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
2
at ChildProcess.<anonymous> (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/util.ts:250:14)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
at throwError (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/asyncTaskManager.ts:88:11)
at checkErrors (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/asyncTaskManager.ts:53:9)
at AsyncTaskManager.awaitTasks (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/asyncTaskManager.ts:67:7)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Packager.doBuild (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-lib/src/packager.ts:453:5)
at Object.executeFinally (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/promise.ts:12:14)
at Packager._build (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-lib/src/packager.ts:376:31)
at Packager.build (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/app-builder-lib/src/packager.ts:337:12)
at Object.executeFinally (/home/alan/Source/4ian/GDevelop/newIDE/electron-app/node_modules/builder-util/src/promise.ts:12:14)
❌ Electron build failed with code 1.
Is there an existing issue for this?
Describe the bug
Related to #5893 - I thought I'd try building the desktop app from source. So I cloned the repo and followed the instructions at https://github.com/4ian/GDevelop/blob/master/newIDE/README.md
The build fails with a memory error. The laptop has 16GB of RAM, and 16GB swap, which doesn't run out, nor even close.
Steps to reproduce
On a Mac with an Apple Silicon CPU running Ubuntu Asahi Linux.
npm run build
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
GDevelop platform
Desktop
GDevelop version
Git master
Platform info
Additional context
No response