electron / electron/universal

Universal Binaries in Resources Don't Lipo

Open
#17 1 comment 8 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
148
Forks
47
Avg merge
3h 57m
Merged PRs (30d)
5

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.