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

Linking with Xcode 7 fails due to “undef: _objc_readClassPair” #11

Closed
mietek opened this Issue Nov 28, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@mietek
Contributor

mietek commented Nov 28, 2015

Symptoms:

Ld build/Shoebill.build/Release/Shoebill.build/Objects-normal/i386/Shoebill normal i386
    cd /Users/mietek/Projects/Forks/Features/shoebill/gui
    export MACOSX_DEPLOYMENT_TARGET=10.8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/mietek/Projects/Forks/Features/shoebill/gui/build/Release -L../intermediates -F/Users/mietek/Projects/Forks/Features/shoebill/gui/build/Release -filelist /Users/mietek/Projects/Forks/Features/shoebill/gui/build/Shoebill.build/Release/Shoebill.build/Objects-normal/i386/Shoebill.LinkFileList -mmacosx-version-min=10.8 -fobjc-link-runtime -framework QuartzCore -lshoebill_core -framework Cocoa -framework OpenGL -Xlinker -dependency_info -Xlinker /Users/mietek/Projects/Forks/Features/shoebill/gui/build/Shoebill.build/Release/Shoebill.build/Objects-normal/i386/Shoebill_dependency_info.dat -o /Users/mietek/Projects/Forks/Features/shoebill/gui/build/Shoebill.build/Release/Shoebill.build/Objects-normal/i386/Shoebill
Running ld for i386 ...

Ld build/Shoebill.build/Release/Shoebill.build/Objects-normal/x86_64/Shoebill normal x86_64
    cd /Users/mietek/Projects/Forks/Features/shoebill/gui
    export MACOSX_DEPLOYMENT_TARGET=10.8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/mietek/Projects/Forks/Features/shoebill/gui/build/Release -L../intermediates -F/Users/mietek/Projects/Forks/Features/shoebill/gui/build/Release -filelist /Users/mietek/Projects/Forks/Features/shoebill/gui/build/Shoebill.build/Release/Shoebill.build/Objects-normal/x86_64/Shoebill.LinkFileList -mmacosx-version-min=10.8 -fobjc-link-runtime -framework QuartzCore -lshoebill_core -framework Cocoa -framework OpenGL -Xlinker -dependency_info -Xlinker /Users/mietek/Projects/Forks/Features/shoebill/gui/build/Shoebill.build/Release/Shoebill.build/Objects-normal/x86_64/Shoebill_dependency_info.dat -o /Users/mietek/Projects/Forks/Features/shoebill/gui/build/Shoebill.build/Release/Shoebill.build/Objects-normal/x86_64/Shoebill
Running ld for x86_64 ...
undef: _objc_readClassPair
Undefined symbols for architecture x86_64:
  "_objc_readClassPair", referenced from:
      __ARCLite__load() in libarclite_macosx.a(arclite.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
    Ld build/Shoebill.build/Release/Shoebill.build/Objects-normal/x86_64/Shoebill normal x86_64
(1 failure)

Apparently, Xcode 7 introduces a new build setting, “Implicitly Link Objective-C Runtime Support”, or CLANG_LINK_OBJC_RUNTIME, which defaults to YES.

Switching this to NO fixes the issue.

More information:
“Undefined symbols: "_objc_readClassPair" when opening existing project in Xcode 7”

mietek added a commit to mietek/shoebill that referenced this issue Nov 28, 2015

mietek added a commit to mietek/shoebill that referenced this issue Nov 28, 2015

@pruten pruten closed this in #12 Sep 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment