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

fix: do not define _LIBCPP_ABI_NAMESPACE=Cr for all native modules #34932

Merged
merged 1 commit into from Jul 15, 2022

Conversation

MarshallOfSound
Copy link
Member

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of. We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.

Notes: Fixed _dyld_missing_symbol_abort crash on macOS when using c++ native modules

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.
@MarshallOfSound MarshallOfSound requested review from a team as code owners July 15, 2022 22:13
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jul 15, 2022
@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/20-x-y fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases labels Jul 15, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jul 15, 2022
@MarshallOfSound MarshallOfSound merged commit f1746c8 into main Jul 15, 2022
@MarshallOfSound MarshallOfSound deleted the fix-native-modules-libcpp branch July 15, 2022 23:57
@release-clerk
Copy link

release-clerk bot commented Jul 15, 2022

Release Notes Persisted

Fixed _dyld_missing_symbol_abort crash on macOS when using c++ native modules

@trop
Copy link
Contributor

trop bot commented Jul 15, 2022

I was unable to backport this PR to "20-x-y" cleanly;
you will need to perform this backport manually.

VerteDinde pushed a commit that referenced this pull request Jul 18, 2022
…34932)

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.
@trop
Copy link
Contributor

trop bot commented Jul 18, 2022

@VerteDinde has manually backported this PR to "20-x-y", please check out #34944

VerteDinde added a commit that referenced this pull request Jul 18, 2022
…34944)

fix: do not define _LIBCPP_ABI_NAMESPACE=Cr for all native modules (#34932)

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.

Co-authored-by: Samuel Attard <sam@electronjs.org>
schetle pushed a commit to schetle/electron that referenced this pull request Nov 3, 2022
…lectron#34932)

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
…lectron#34932)

This define is only needed when linking against Chromiums libc++ which we currently
do not ship / expose the symbols of.  We probably should make those symbols visible and
actually ensure that electron-rebuild et. al link against our libc++ instead of the system libc++
but for now this fixes compilation issues on macOS where the default system clang links to the system libc++
which does not (obviously) use the Chromium ABI namespace.

For our nan tests which do link against Chromiums libc++ we define the ABI namespace in the spec runner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants