Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal Binaries in Resources Don't Lipo #17

Open
pnegahdar opened this issue Apr 18, 2021 · 1 comment
Open

Universal Binaries in Resources Don't Lipo #17

pnegahdar opened this issue Apr 18, 2021 · 1 comment

Comments

@pnegahdar
Copy link

I have a Golang universal binary called electron-helper listed in my extraFiles for a build.

When building --arm64 and --x64 independently the both work fine. However when I try to build it via the --universal flag it has an issue lipo-ing this resource:

  ⨯ Command failed with a non-zero return code (1):
lipo /private/var/folders/_c/ykyhj8_93dj1lf0pyyg5d0dr0000gn/T/electron-universal-qQ3oug/Tmp.app/Contents/Resources/dist/electron-helper /Users/projects/electron/dist/electron/mac-universal--arm64/Main.app/Contents/Resources/dist/electron-helper -create -output /private/var/folders/_c/ykyhj8_93dj1lf0pyyg5d0dr0000gn/T/electron-universal-qQ3oug/Tmp.app/Contents/Resources/dist/electron-helper

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /private/var/folders/_c/ykyhj8_93dj1lf0pyyg5d0dr0000gn/T/electron-universal-qQ3oug/Tmp.app/Contents/Resources/dist/electron-helper and /Users/projects/electron/dist/electron/mac-universal--arm64/Main.app/Contents/Resources/dist/electron-helper have the same architectures (x86_64) and can't be in the same fat output file  stackTrace=

Anyway to get it to ignore already lipo'd binaries? I can also put the binary conditionally for each architecture but it seems like there is no way to conditionalize extraFiles by architecture.

beyera added a commit to agilebits/electron-universal that referenced this issue Apr 29, 2021
Don’t lipo fat binaries or files that are the same arch.
beyera pushed a commit to agilebits/electron-universal that referenced this issue Apr 29, 2021
…e arch electron#17

Some Mach-O files may have already been fat binaries and will throw an error if lipoed again.

Co-authored-by: Mitch Cohen <[email protected]>
Co-authored-by: Nick McGuire <[email protected]>
kiritnarain added a commit to spotxyz/universal that referenced this issue Dec 19, 2021
obra added a commit to keyboardio/Chrysalis that referenced this issue Mar 29, 2022
We need to override @electron/universal with @spotxyz/universal
because electron/universal#17 is
as-yet-unresolved.

Fixes #731
obra pushed a commit to obra/electron-universal that referenced this issue Jun 1, 2022
…e arch electron#17

Some Mach-O files may have already been fat binaries and will throw an error if lipoed again.

Co-authored-by: Mitch Cohen <[email protected]>
Co-authored-by: Nick McGuire <[email protected]>
MarshallOfSound pushed a commit that referenced this issue Jun 1, 2022
…sions and match an allowlist (#47)

* fix: Don’t lipo binaries that are already a universal file or the same arch #17

Some Mach-O files may have already been fat binaries and will throw an error if lipoed again.

Co-authored-by: Mitch Cohen <[email protected]>
Co-authored-by: Nick McGuire <[email protected]>

* Add a x64ArchFiles config key to allow allow-listing of files that are only always x64Arch

Co-authored-by: Andrew Beyer <[email protected]>
Co-authored-by: Mitch Cohen <[email protected]>
Co-authored-by: Nick McGuire <[email protected]>
@jtbandes
Copy link

Duplicate issue: electron-userland/electron-builder#5552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants