-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Undefined symbols "absl::lts_20240116::CHexEscape(absl::lts_20240116::string_view)" #8103
Comments
For anyone using expo managed workflow - I added it in a plugin: fix-rn-firebase.plugin.js const { withDangerousMod, withPlugins } = require("@expo/config-plugins");
const {
mergeContents,
} = require("@expo/config-plugins/build/utils/generateCode");
const fs = require("fs");
const path = require("path");
async function readFileAsync(path) {
return fs.promises.readFile(path, "utf8");
}
async function saveFileAsync(path, content) {
return fs.promises.writeFile(path, content, "utf8");
}
const withFixBuildSettings = (c) => {
return withDangerousMod(c, [
"ios",
async (config) => {
const file = path.join(config.modRequest.platformProjectRoot, "Podfile");
const contents = await readFileAsync(file);
await saveFileAsync(file, fixBuildSettings(contents));
return config;
},
]);
};
const fixSrc = `
installer.pods_project.targets.each do |target|
if target.name == 'abseil'
Pod::UI.puts "Workaround: Configuring abseil to use gnu++14 language standard for cocoapods 1.16+ compatibility".yellow
Pod::UI.puts " Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++14'
end
end
end
`;
function fixBuildSettings(src) {
return mergeContents({
tag: `rn-firebase-fix-build`,
src,
newSrc: fixSrc,
anchor: /post_install do \|installer\|/,
offset: 1,
comment: "#",
}).contents;
}
module.exports = (config) => withPlugins(config, [withFixBuildSettings]);
|
@stephentuso with the just-released cocoapods 1.16.2 and xcodeproj 1.27 no workarounds are necessary for this issue - they reverted the breaking change I'm going to close it, as current versions are now working fine |
this is not working for me |
@ics-vandit the issue is closed. Current versions of cocoapods / xcodeproj require no fix |
[Maintainer update]: cocoapods 1.16.2 and xcodeproj 1.27 were released that reverted the breaking change that caused this problem, if you update to these now-current versions everything will work
If you experience an iOS build failure during the link step with a bunch of errors that look like this:
It is not coming from this library, it is upstream issue firebase/firebase-ios-sdk#13996
It is related to an interaction between cocoapods 1.16+ and the abseil library from firebase-ios-sdk.
You can either:
1- downgrade your ruby gems to cocoapods 1.15.2 and xcodeproj 1.25.0 or
2- use a post_install workaround in your Podfile that changes one build setting back to what it was prior to cocoapods 1.16+ and allows the build to work
Here is the workaround if you are interested, note you may already have a post_install section, so you would just use the inner part(s):
[note: this was edited to be
gnu++14
notc++14
]You will need to run
pod install
again after adding this, so that it executes and updates the build settingThe text was updated successfully, but these errors were encountered: