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

doubt when compile electron on macOS 10.14 #16244

Closed
drelaptop opened this issue Jan 3, 2019 · 5 comments
Closed

doubt when compile electron on macOS 10.14 #16244

drelaptop opened this issue Jan 3, 2019 · 5 comments

Comments

@drelaptop
Copy link

drelaptop commented Jan 3, 2019

Following the official docs:

https://github.com/electron/electron/blob/master/docs/development/build-instructions-macos.md

it told me that I should use Xcode 8.2.1 and macOS 10.10 SDK

For certain features (e.g. pinch-zoom) to work properly, you must target the macOS 10.10 SDK.

Official Electron builds are built with Xcode 8.2.1, which does not contain the 10.10 SDK by default. To obtain it, first download and mount the Xcode 6.4 DMG.

but after I install Xcode 8.2.1, and try to run Xcode. Xcode directly crash when start on my macOS 10.14.1.

So my doubt is why it's so strictly. must I use Xcode 8.2.1 to make electron work properly? can I use Xcode 9.4 or Xcode 10 with the macOS 10.10 SDK?

  • crash logs like this
Process:               Xcode [1887]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               8.2.1 (11766.1)
Build Info:            IDEFrameworks-11766001000000000~5
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [1887]
User ID:               502

Date/Time:             2019-01-03 10:31:59.162 +0800
OS Version:            Mac OS X 10.14.1 (18B75)
Report Version:        12
Anonymous UUID:        0958AB3D-9120-BC65-16A0-8DE0CB0DE909


Time Awake Since Boot: 2800 seconds

System Integrity Protection: disabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x4] Symbol missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Symbol not found: _OBJC_IVAR_$_NSTextViewIvars.sharedData
  Referenced from: /Applications/Xcode.app/Contents/MacOS/../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Applications/Xcode.app/Contents/MacOS/../SharedFrameworks/DVTKit.framework/Versions/A/DVTKit

@welcome
Copy link

welcome bot commented Jan 3, 2019

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@nornagon
Copy link
Member

nornagon commented Jan 3, 2019

I build on my local machine with Xcode 10.1 with the macOS 10.14 SDK, and it works fine. If you want to reproduce the build environment that releases of Electron are built in, I believe the info about Xcode 8.2.1 and 10.10 SDK is still current. cc @jkleinsc to confirm.

@jkleinsc
Copy link
Contributor

jkleinsc commented Jan 4, 2019

Electron official builds are built on Xcode 8.3.3. I updated the doc in PR #16267 to reflect that.

@drelaptop please note that Xcode >= 8.2.1 means that Xcode 8.2.1 is the minimum version of Xcode supported but you can use newer versions, particularly for a newer OS like Mojave (10.14.1) which may not support older Xcode versions.

@drelaptop
Copy link
Author

drelaptop commented Jan 4, 2019

thanks for reply in time. @jkleinsc

Xcode 8.3.3 can't works on Mojave (10.14.1) too, so I installed Xcode 9.4.1, use it and builtin macOS 10.13 SDK to build electron.

Fortunately, the output Electron.app works on both Debug & Release mode. that's wonderful ! but the LINK step in the build process print lots of warnings like:

[1416/1429] SOLINK "Electron Framework.framework/Versions/A/Electron Framework", POSTBUILDS
ld: warning: direct access in function 'disk_cache::DelayedCacheCleanup(base::FilePath const&)' from file '/Users/laptop/gitCode/electron/vendor/download/libchromiumcontent/static_library/libnet.a(cache_util.o)' to global weak symbol 'base::internal::BindState<void (*)(base::FilePath const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&), base::FilePath, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::Destroy(base::internal::BindStateBase const*)' from file 'libelectron_lib.a(electron_lib.common_web_contents_delegate.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
...
warning: (x86_64)  could not find object file symbol for symbol __ZN6device5mojom8internal39WakeLock_ChangeType_ResponseParams_DataC1Ev
...

The branch I build is official 3.0.13 , without any custom changes. below is the whole compile log.

compile.log.zip

so must I use macOS 10.10 SDK? docs said:

For certain features (e.g. pinch-zoom) to work properly, you must target the For certain features (e.g. pinch-zoom) to work properly, you must target the
macOS 10.10 SDK

I used 10.13 SDK, lots of warnings with no errors. why existed a feature that depends on a specific SDK version? I think it should works no matter I use macOS 10.10 SDK or 10.13 SDK.

@jkleinsc
Copy link
Contributor

jkleinsc commented Jan 4, 2019

@drelaptop you should be able to ignore the warnings. If you are getting errors, those can't be ignored. As far as version of SDK, we are dependent on what Chromium requires. The chromium docs say you can build with newer SDKS, but official releases uses a specific SDK. I just double checked and here are the versions of the SDK that are used for Electron:
2-0-x - 10.10: https://chromium.googlesource.com/chromium/src/+/61.0.3163.10/docs/mac_build_instructions.md#Prerequisites
3-0-x, 3-1-x: 10.12:
https://chromium.googlesource.com/chromium/src/+/66.0.3359.181/docs/mac_build_instructions.md#Prerequisites
4-0-x - 10.12:
https://chromium.googlesource.com/chromium/src/+/69.0.3497.106/docs/mac_build_instructions.md#Prerequisites

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

No branches or pull requests

3 participants