electron-builder: Building on macOS 10.15 fails. Can't locate Mac/Memory.pm
Which version of electron-builder are you using?
- 20.44.4:
What target are you building for?
- Mac(dmg):
I’m on MacOs 10.15 (beta2). While trying to build dmg I get following exception:
Error: Exit code: 2. Command failed: /usr/bin/perl /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4/darwin-thread-multi-2level /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4/darwin-thread-multi-2level /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /private/var/folders/9c/tprqfcrs66qff3x86tdp3_xw0000gn/T/t-yGVUjs/1-dmgProperties.pl line 4.
Possible issue with Perl on new Mac OS?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 54
- Comments: 16 (4 by maintainers)
Commits related to this issue
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- fix(dmg): cannot build DMG on macOS 10.15 Close #3990 — committed to develar/electron-builder by develar 5 years ago
- chore(deps): upgrade electron-builder to latest Resolves errors building on macOS Catalina: https://github.com/electron-userland/electron-builder/issues/3990 — committed to schmidtk/opensphere-electron by deleted user 5 years ago
- chore: update electron-builder to 21.2.0 Compiling for mac fails on macOS 10.15.1 with the following error: "Can't locate Mac/Memory.pm" The error originates from electron-builder which is now fixe... — committed to laumair/trinity-wallet by laumair 5 years ago
- Update electron-builder to 21.2.0 (#2392) * chore: update electron-builder to 21.2.0 Compiling for mac fails on macOS 10.15.1 with the following error: "Can't locate Mac/Memory.pm" The error... — committed to iotaledger/trinity-wallet by laumair 5 years ago
- chore: Building on macOS 10.15 fails - change .dmg to .pkg https://github.com/electron-userland/electron-builder/issues/3990 — committed to milosdanilov/composer by deleted user 5 years ago
- fix build err in macOS (https://github.com/electron-userland/electron-builder/issues/3990) — committed to Echowxsy/SnippetStore by Echowxsy 4 years ago
- fix build err in macOS (https://github.com/electron-userland/electron-builder/issues/3990) — committed to Echowxsy/SnippetStore by Echowxsy 4 years ago
- fix: github actionsのエラーのためバージョンを上げた see: https://github.com/electron-userland/electron-builder/issues/3990 — committed to platykun/electron-webpack-quick-start by platykun 4 years ago
- Fixes #1002: Upgrade to minimal electron builder to enable build without breaking (https://github.com/electron-userland/electron-builder/issues/3990). Updated CLI colour so visible on black/white bgro... — committed to qcif/data-curator by deleted user 4 years ago
- Update mac build target to zip This fixes building on Catalina. Refer to this discussion on electron-builder for why: https://github.com/electron-userland/electron-builder/issues/3990 — committed to Hazzard13/livesplit-electron by deleted user 4 years ago
- bugfix: update electron-builder to with fix on macos https://github.com/electron-userland/electron-builder/issues/3990 — committed to trombik/lw.comm-server by trombik 4 years ago
- ci: build binaries on multi-platforms hdiutil was removed because it uses old APIs, and fails to build. there is no reference in the commit in which it was added to package.json. it looks to me that ... — committed to trombik/lw.comm-server by trombik 4 years ago
update electron-builder version to 21.2.0
@UdaraJay Thanks a lot. And to whom don’t know how to build
pkginstead ofdmg, you could edit thepackage.json:sudo npm i electron-builder@latest -Sworked for meAlso, for anyone that stumbles into this; this is only a problem when trying to package you app into a
dmg. It works fine if you make apkginstead (more recommended to distribute apps as packages anyways).*May be different if you’re distributing into the mac app store.
All existing solutions, including appdmg, are bad and cannot help to create correctly positioned DMG Windows. Problem — window position is computed from bottom, and not from top. So, as you don’t know user display screen height, you cannot correctly set window bounds.
If you will set only size, then Finder will ignore size, and your background image will look ugly. Apple keep silent and don’t provide not only tool to customize DMG, but even docs about DSStore format.
Irony that used by electron-builder solution in Perl is able to set windows position from top because uses deprecated format. And now Apple killed mac carbon 32-bit completely. Enjoy 😦
As I don’t have time to convert Perl solution in Go (as Go is the only language that should be used for such tools, forget about nodejs or python), for now following solution is implemented:
xis set to400(as before), andyis set to(1440 - backgroundHeight) / 2wherebackgroundHeightit is computed automatically height of specified background image. Yes, assumed that1440it is height of user display (lesser of two evils).I do not have time and plans to implement decent solution (as it was in Perl). First, because Perl solution format is deprecated for ages already, and maybe Apple will drop it sometime. Second, burn in hell, Apple (yes, it seems Apple don’t care about developers who don’t distribute apps via AppStore).
DropDMG app creates correctly positioned DMG windows. Maybe I will ask ability to reuse DropDMG CLI / support it.
Release will be in 2 days.
Guys, today I am going to setup my Raspberry PI and make snap for ARM working. Then, later this week, I will take a look on this issue. Sorry for delay, if it is important for you, you can send PR or donation.
Yes, it is only for DMG, because no official tool and open API to perform customization of DMG. electron-builder uses 3rd-party solution, that written in Perl. Should be ported to Go language (from this perl code or from python).
Not only xcode but look like the entire operating system doesn’t allow 32bit programs. Running
wineto build for win32 or just usingwineby itself doesn’t work:@dotconnor Yup, you’re right macOS Catalina does not Support 32-bit Apps.