Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Electron 4 MacOS build error #106

Open
pfrazee opened this issue Dec 28, 2018 · 0 comments
Open

Electron 4 MacOS build error #106

pfrazee opened this issue Dec 28, 2018 · 0 comments

Comments

@pfrazee
Copy link

pfrazee commented Dec 28, 2018

I have to manually rebuild my native modules in my Electron app, and in Electron v4 this module started to break with:

clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)

After some googling & trial/error, the solution I concocted was to modify node-spellchecker's binding.gyp to include

           'OTHER_CFLAGS': [
             '-mmacosx-version-min=10.10'
           ]

That's inside the xcode_settings of the target_defaults section. I also had to set env vars:

export CXXFLAGS="-mmacosx-version-min=10.10"
export LDFLAGS="-mmacosx-version-min=10.10"

Without the binding.gyp change, the initial compile would fail. Without the env vars, the link step would fail.

I can do the env vars in my build script but the binding.gyp change has to be in the module, afaict. I can use a fork for now, so no pressure to fix in the main repo, but hopefully you know the build systems well enough to address this for everyone! (I unfortunately don't).

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

No branches or pull requests

1 participant