Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

SpiderNode assumes libstdc++ on Mac; fails on "'tr1/type_traits' file not found" with libc++ #166

Closed
mykmelez opened this issue Jul 12, 2016 · 2 comments

Comments

@mykmelez
Copy link
Contributor

SpiderNode assumes libstdc++ on Mac, where it includes the <tr1/type_traits> header, which is only available in libstdc++:

spidernode/src/util.h

Lines 13 to 17 in f9cd4f6

#ifdef __APPLE__
#include <tr1/type_traits>
#else
#include <type_traits> // std::remove_reference
#endif

But Electron builds with libc++:

https://github.com/electron/electron/blob/master/toolchain.gypi#L115-L116

So when I configure Electron to build SpiderNode, the build fails with "'tr1/type_traits' file not found."

@ehsan
Copy link
Contributor

ehsan commented Jul 17, 2016

I have a fix for this which I'll push to master shortly, but note that per nodejs/node-gyp#469, you shouldn't be changing the gyp flags to build with libc++, just target OSX 10.9, by setting:

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

before configuring.

I will also upstream this fix to node.

@ehsan ehsan closed this as completed in 4b7fcfe Jul 17, 2016
@ehsan
Copy link
Contributor

ehsan commented Jul 17, 2016

Upstream fix: nodejs/node#7778

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

2 participants