Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libsystem_symptoms.dylib missing in Xcode 8

Tags:

xcode

macos

xml

I just updated to Xcode 8, and I can no longer build xml2-based applications. If I build a simple file and try to build it as follows:

c++ myapp.cc `xml2-config --cflags` `xml2-config --libs`

...I get the following error message:

ld: file not found: /usr/lib/system/libsystem_symptoms.dylib for architecture x86_64

It doesn't matter what's in myapp.cc (mine is just a main routine that returns 0). The root problem seems to be that Apple removed /usr/lib/system/libsystem_symptoms.dylib in Xcode 8, but many of the .tbd files in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib still point to it. Has anyone else run into a problem like this?

like image 862
Michael McFarlane Avatar asked Sep 16 '16 16:09

Michael McFarlane


People also ask

How to add dylib to Xcode product?

Let Xcode copy .dylib file into product after compiled. Add “New Copy Files Phase”, name it “Copy Libraries” Set the “Destination” to “Frameworks”. Add your dylib here.link_dynamic_lib

What is dynamic library in Xcode?

Comments#library#OS X#Xcode Dynamic library (with .dylib suffix at UNIX-like OS) is a kind of library discriminated from static library (with .a suffix). Static library will be linked at linking stage instantly after codes are compiled, before binary product output.

How to add 3rd-part dynamic library to Xcode target?

There are two method to add 3rd-part dynamic library to a Xcode target: Install the library into your system Copy your library into your product. Method 1: Install the library For most library, 3rd part library can be installed into system, at 1 /usr/local/lib or /usr/lib Then just add header path to 1

Why can't Xcode use the path of the app I created?

Unfortunately the path is not provided by developer of the App but the 3rd part library developer. So you can not let Xcode use the path relative your product or use path provided by yourself.


1 Answers

@mnencia answer works removing references to libsystem_symptomps.dylib, but failed for me using OS X. Change the following should allow it to work on OS X:

sudo /usr/bin/sed -i.backup -E -e 's@/usr/lib/system/libsystem_symptoms.dylib(, )?@@' \
$(grep -ril /usr/lib/system/libsystem_symptoms.dylib \
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib)

Hope this helps Mac developers.

like image 100
Raymond Naseef Avatar answered Nov 13 '22 21:11

Raymond Naseef