MapKit install can't find 'NSUserActivity' error

Issue #172 resolved
Yasser_Antonio
created an issue

I'm on OSX 10.12, i have python 3.5 and I am using a virtual environment with my xcode version 8.0 (8A218a) and i keep having this issue :

In file included from Modules/_MapKit.m:13:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/MapKit.framework/Headers/MapKit.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/MapKit.framework/Headers/NSUserActivity+MKMapItem.h:12:12: error: 
      cannot find interface declaration for 'NSUserActivity'
@interface NSUserActivity (MKMapItem)
           ^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Installing 'pyobjc-framework-MapKit' failed (status 1)

Comments (7)

  1. Mario G√ľnterberg

    I can reproduce this error if I install pyobjc for Python 3.5.2 on macOS 10.12 (pyobjc 3.1.1).

    Installing pyobjc-core via pip3 install pyobjc-core first works fine but if I go to installing pyobjc I have the same issue.

    In file included from Modules/_MapKit.m:5:
    In file included from /System/Library/Frameworks/MapKit.framework/Headers/MapKit.h:15:
    /System/Library/Frameworks/MapKit.framework/Headers/NSUserActivity+MKMapItem.h:12:12: error: cannot find interface declaration for 'NSUserActivity'
    @interface NSUserActivity (MKMapItem)
               ^
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1
    
  2. GrammyPuter

    I am having this problem with Python 2.7 , pip 8.1.2, Mac OS 10.2, Command_Line_Tools_macOS_10.12_for_Xcode_8 /System/Library/Frameworks/MapKit.framework/Headers/NSUserActivity+MKMapItem.h:12:12: error: cannot find interface declaration for 'NSUserActivity' @Interface NSUserActivity (MKMapItem) ^ 1 error generated. error: command 'cc' failed with exit status 1

  3. Ronald Oussoren repo owner

    Should be fixed in on the default branch.

    This is a bug in 10.12 SDK headers, the MapKit headers contain unconditional references to a class that is only available in 64-bit code. I've added a fairly crude workaround to PyObjC's source code, and have not yet filed an radar for this (and probably won't)

  4. Log in to comment