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

Build [email protected] with libc++ instead of libstdc++6 #14230

Closed
jeroen opened this issue Jun 4, 2017 · 2 comments
Closed

Build [email protected] with libc++ instead of libstdc++6 #14230

jeroen opened this issue Jun 4, 2017 · 2 comments
Labels
stale No recent activity

Comments

@jeroen
Copy link
Contributor

jeroen commented Jun 4, 2017

My application builds with xcode on osx 10.11 and links against [email protected]. Everything builds however there are some runtime problems with c++ exceptions because [email protected] is built against libstdc++6 but my application uses libc++.

> otool -L /usr/local/opt/[email protected]/lib/libv8.dylib
/usr/local/opt/[email protected]/lib/libv8.dylib:
	/usr/local/opt/[email protected]/lib/libv8.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.50.2)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 489.0.0)

> otool -L /usr/local/opt/v8/lib/libv8.dylib
/usr/local/opt/v8/lib/libv8.dylib:
	/usr/local/opt/v8/lib/libv8.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.4.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

Would there be a way to build [email protected] with libc++ instead? The v8 formula already uses libc++ but unfortunately it has a completely different API then [email protected] so upgrading is not an option.

@jeroen
Copy link
Contributor Author

jeroen commented Jun 5, 2017

Same problem as nodejs/node-gyp#469. Looks like old versions of gyp default to building a lib that is compatible with OSX < 10.7 which is when clang was still using libstdc++.

We need to pass -mmacosx-version-min=10.9 to the compiler/linker so that it will use libcxx.

@stale
Copy link

stale bot commented Jul 2, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot closed this as completed Jul 10, 2017
ilovezfs pushed a commit that referenced this issue Jul 19, 2017
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale No recent activity
Projects
None yet
Development

No branches or pull requests

1 participant