-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How can solved the warning "direct access in function 'auto realm::sync" #6688
Comments
I don't know for certain. But looked at some other cases where this warning appears with other libraries. |
I'm also seeing this. I'm using RealmSwift. I believe it appeared in 5.3.3 and wasn't present in 5.3.2. It's not just one warning; there are 32 of them. Inline Methods Hidden: YES I have about 20 pods and they all have those same values for those two build settings. The values for these build settings in the Pods project itself are different. Both values are NO. If I go back to 5.3.2 the build settings mentioned above are the same as in 5.3.3 but the warnings don't appear. I believe that librealmcore-ios.a is distributed as a binary so it isn't being built on my Mac. So the problem is how that library was built. I don't know how to determine the build settings for librealmcore-ios.a but I think that's what changed. There are a series of recent commits that update the core library by @tgoyne that are probably the culprit. |
I have the same problem, and I'm using RealmSwift too. Problem exist in 5.3.3 version only, 5.3.2 don't have those warnings. |
+1 |
Xcode Version: 11.6 Installed via Pod I have exported all generated errors: |
+1 as well. Updated from Realm 5.3.3 to 5.3.5 today and still get 32 warnings of variations on the following: "Direct access in function 'realm::sync::InstructionApplier::operator()(realm::sync::Instruction::ArrayInsert const&)' from file '../Realm/core/librealmcore-ios.a(instruction_applier.o)' to global weak symbol 'typeinfo for realm::Lst<realm::util::Optional >' from file './Realm/core/librealmcore-ios.a(list.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings." |
+1 |
I've updated to 5.3.5. I see those custom build flags in the project (and also in the two .xcconfig files). I don't see the warnings. Looking at the history for Realm.podspec those flags for armv7 were added on Feb 11, 2020, which was a version older than 5.0.0. FWIW, these warnings seemed to come and go but I couldn't figure out what the correlation was. Maybe this is a Cocoapod or Xcode bug. Xcode doesn't like Cocoapods. |
It seems Realm & RealmSwift 5.3.6 has fixed it, at least for me. |
Yes, it's fixed in v5.3.6 |
v5.3.6 same issue.... |
I changed from v5.3.5 to v5.3.6. |
Updated to 5.3.6 -- Problem persists... |
Updated to 5.4.0 Still have the problem. |
@uglyelf Can you check the flags mentioned by leemaguire upthread? If they are missing this may be a syncing issue and you may want to try these various things to clear your cache. Option-Clean in Xcode. delete your Pods folder. pod deintegrate. Run pod install or pod update after and rebuild. I found the errors disappeared and reappeared a few times but eventually went away and stayed away. Not certain what really fixed it though. |
K. I've now done all that and cleared the derived data and restarted x-code. Still has the error. @phoney I'm grateful for your suggestions. Do you have any more? |
Sorry about that. Do you see those flags in the Pods project?
|
Sorry. Should have said, yes, the flags are there. |
Hmmm. My Podfile line is One other cleaning suggestion: close Xcode, delete the folder in Library/Developer/Xcode/DerivedData/ for your project. This does slightly more than opt-clean. |
Right right. I cleared the derived data as stated a couple responses ago. Always clear the derived data. :)
|
This bug came back in 5.4.1. I updated to 5.4.2 today and it still persists. I do see the flags in the Pods project for RealmSwift. I think we need to open another issue for it since this one is closed. @tgoyne Do you understand the cause of this issue? |
This is still happening in 5.4.2, 32 issues and tried everything explained above. Nothing seems to work |
Can you add |
@leemaguire
-- |
Below is my current setting, it seems to have solved it for me at least in Run, The errors appear sometimes on Build but never on Run. I also did not add them manually, I deleted the Pods folder and did
I've stumbled onto this setting and there's not rationale behind it so, any enlightenment would be useful. (Other C++ Flags in Realm Target) |
5.4.6 same |
Same here |
Warnings are back for me in 5.4.7 and 5.4.8. The flags are all present in the Realm project. The warnings refer to librealmcore-ios.a, which I believe isn't compiled on my computer. It's downloaded as part of the library. Commit messages seem to say that realm core has been updated a lot lately. I believe the problem is how that file is built. |
Please update to the latest version of Realm v10.1.1 this should resolve these warnings. |
Closing this issue due to inactivity. If this issue still persists with the latest version v10.1.4 please open a new issue. Thanks. |
Im experiencing this in v10.1.4 |
same in v 10.41.0 |
Xcode Version: 11.5
Project Target: iOS 13.5
Language: Swift 5
Installed via Pod
Realm Version: 5.3.3
The warning is
warning: direct access in function 'auto realm::sync::Instruction::visit<(anonymous namespace)::RecoverLocalChangesetsHandler&>((anonymous namespace)::RecoverLocalChangesetsHandler&)' from file '/Users/shams/Work/iOS/innogyHealthGuard/Pods/Realm/core/librealmcore-ios.a(client_reset.o)' to global weak symbol 'typeinfo for realm::Lstrealm::Timestamp' from file '/Users/shams/Work/iOS/innogyHealthGuard/Pods/Realm/core/librealmcore-ios.a(list.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
The text was updated successfully, but these errors were encountered: