I make a xx.a(use cocoaPods) serve it to others,they want to use it in a project which used cocoaPods too,get this error:
duplicate symbol OBJC_METACLASS$PodsDummy_Pods in:
xx.a(Pods-dummy.o)
other.a(Pods-dummy.o)
duplicate symbol _OBJC_CLASS$_PodsDummy_Pods in:
xx.a(Pods-dummy.o)
other.a(Pods-dummy.o)
How can I resolve it? Can I delete the Pods-dummy.o from xx.a?
Having duplicate symbol.
You can safely delete them from the Archive.
Related
I meet an error called "Symbol not found" on matlab. The error message is in below.
Symbol not found: __ZNKSt5ctypeIcE13_M_widen_initEv
Referenced from: blabla/lib/buildW.mexmaci64
Expected in: /usr/lib/libstdc++.6.0.9.dylib
There are quite bunch of questions like me, but I never found the solution of this problem. The former threads mentioned conflicts between the updated clang and the clang used.
Here are exmaples of questions on the similar question.
Need help finding Undefined Symbols
Handling "dyld: lazy symbol binding failed: Symbol not found" error when nm does not find symbol
https://github.com/Homebrew/homebrew-core/issues/4902
I currently installed Xcode 9.2.
And in matlab, I use MacOSX10.13.sdk like below.
>> edit ([matlabroot '/bin/maci64/mexopts/clang++_maci64.xml'])
...
...
<dirExists name="$$/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk" />
<cmdReturns name="find $$ -name MacOSX10.13.sdk" />
Also, I found that there are three files in "/usr/lib"
/usr/lib/libstdc++.6.0.9.dylib
/usr/lib/libstdc++.6.dylib
/usr/lib/libstdc++.dylib
Can anyone help me?
The symbol __ZNKSt5ctypeIcE13_M_widen_initEv (demangled std::ctype<char>::_M_widen_init() const) is defined in libstdc++.dylib but if you execute
nm /usr/lib/libstdc++.dylib | fgrep __ZNKSt5ctypeIcE13_M_widen_initEv
you will get
0000000000006a14 t __ZNKSt5ctypeIcE13_M_widen_initEv
as result. The t means that it's defined in the TEXT section but it's a local symbol which cannot referenced from outside the library.
Clang in Xcode uses
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libstdc++.tbd
for linking instead of /usr/lib/libstdc++.dylib. This is a human readable file which contains only the name of the public symbols in libstdc++.dylib. Since the symbol above is private it is not listed in the .tbd file.
I'm trying to add the VKVideoPlayer CocoaPod to a NativeScript app, but the build fails with 'DDLog.h' file not found with <angled> include; use "quotes" instead.
This include is in a library (VKFoundation) that is referenced by the VKVideoPlayer. This VKFoundation.h file in turn references the DDLog.h (from CocoaLumberjack) and DTCoreText.h (from DTCoreText).
All of these libraries are pulled in by the VKVideoPlayer Pod.
Here is the relevant error from the command line...
/Users/burkeholland/dev/burkeholland/nativescript-video-player/demo/platforms/ios/Pods/VKFoundation/Classes/ios/VKFoundation.h:6:9: error:
'DDLog.h' file not found with <angled> include; use "quotes" instead
#import <DDLog.h>
^~~~~~~~~
"DDLog.h"
/Users/burkeholland/dev/burkeholland/nativescript-video-player/demo/platforms/ios/Pods/VKFoundation/Classes/ios/VKFoundation.h:7:9: error:
'DTCoreText.h' file not found with <angled> include; use "quotes" instead
#import <DTCoreText.h>
^~~~~~~~~~~~~~
"DTCoreText.h"
2 errors generated.
The error can be reproduced from this GitHub project.
The error itself indicates that one of the referenced headers (DDLog.h) is referenced with <, but the compiler cannot find it. So it suggests you to try using " quotes instead of angles (<). This is a common error raised by XCode when it's unable to find referenced header.
As per your problem, I believe the problem is with VKFoundation Cocoapod, which is a dependency of VKVideoPlayer Pod. Here's a related issue:
https://github.com/viki-org/VKFoundation/issues/5
You can try using the suggested Podfile and see if it works on your side.
I am trying to create a nsmanagedobject (User) by going to the Editor menu and then selecting Create NSManagedObject Subclass...this generates four files:
User+CoreDataClass.h
User+CoreDataClass.m
User+CoreDataProperties.h
User+CoreDataProperties.m
In one of my viewcontrollers I import User+CoreDataClass.h and then have this code:
//create new account entity
User* thisUser = [NSEntityDescription
insertNewObjectForEntityForName:#"User"
inManagedObjectContext:self.myController.myDataManager.managedObjectContext];
When I then build the app, I get the following clang error:
duplicate symbol _OBJC_CLASS_$_User in:
/Users/xxxxxxxxxxxx/Library/Developer/Xcode/DerivedData/StarDate-fzkjccyoiwhfvvczdwkvkmtbioqw/Build/Intermediates/StarDate.build/Debug-iphonesimulator/StarDate.build/Objects-normal/x86_64/User+CoreDataClass.o
duplicate symbol _OBJC_METACLASS_$_User in:
/Users/xxxxxxxxxxxx/Library/Developer/Xcode/DerivedData/StarDate-fzkjccyoiwhfvvczdwkvkmtbioqw/Build/Intermediates/StarDate.build/Debug-iphonesimulator/StarDate.build/Objects-normal/x86_64/User+CoreDataClass.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried cleaning the app and deleting my derived data but that had no results. The only way I can clear the error is to delete the generated files. Which obviously is not going to be what I need. Why is XCode creating duplicate files off this menu command? Is there a setting that I missed?
Thanks
You are manually creating NSManagedObject subclasses, that Xcode 8 already has created for you and thus get duplicated symbols.
You can find detailed information how to solve this in this answer.
I was trying to update openssl so that it could use libssl.1.0.0 instead of libssl.0.9.8.dylib
So I moved the two files
/usr/lib/libssl.0.9.8.dylib
/usr/lib/libssl.0.9.7.dylib
into my home and I copied libssl.1.0.0.dylib inside /usr/lib. That didn't worked too so I re-moved the two original files to their location but now Apache (and other app using ssl) don't start anymore. Apache says:
Syntax error on line 111 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/Library/modules/mod_ssl.so into server: dlopen(/Applications/MAMP/Library/modules/mod_ssl.so, 10): Symbol not found: _SSLv2_client_method\n Referenced from: /Applications/MAMP/Library/modules/mod_ssl.so\n Expected in: /usr/lib/libssl.0.9.8.dylib\n in /Applications/MAMP/Library/modules/mod_ssl.so`
and libssl.0.9.8.dylib is present inside usr/lib so I don't know why/what it does not find. Is it possibile to fix?
I put my Xcode project within my dropbox folder and now it seems like every time i try to share my archive from within the organizer it keep giving me the following error:
error: Codesign check fails : /var/folders/7l/l93zzs6n4h14qb7rmj5r7zn00000gn/T/GtLyx05w1O/Payload/stryker.app: a sealed resource is missing or invalid
In architecture: armv6
resource added: /private/var/folders/7l/l93zzs6n4h14qb7rmj5r7zn00000gn/T/GtLyx05w1O/Payload/stryker.app/www/Icon
resource missing: /private/var/folders/7l/l93zzs6n4h14qb7rmj5r7zn00000gn/T/GtLyx05w1O/Payload/stryker.app/www/Icon
I believe this error is caused by the fact that Xcode can see the icon/r file associated with drop box.
Is there a way i can delete this file?
I was able to share my archive after I deleted the icon\r file. Please refer to the following post for more info
https://apple.stackexchange.com/questions/31867/what-is-icon-r-file-and-how-do-i-delete-them/31877#31877