Skip to content
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

Some Carbon extensions don't build on OSX 10.7 #57580

Closed
ronaldoussoren opened this issue Nov 8, 2011 · 4 comments
Closed

Some Carbon extensions don't build on OSX 10.7 #57580

ronaldoussoren opened this issue Nov 8, 2011 · 4 comments
Assignees
Labels
build The build process and cross-build OS-mac

Comments

@ronaldoussoren
Copy link
Contributor

BPO 13371
Nosy @ronaldoussoren, @ned-deily
Files
  • issue13371.txt
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/ronaldoussoren'
    closed_at = <Date 2012-07-31.12:21:04.911>
    created_at = <Date 2011-11-08.14:28:25.128>
    labels = ['OS-mac', 'build']
    title = "Some Carbon extensions don't build on OSX 10.7"
    updated_at = <Date 2012-07-31.12:21:04.910>
    user = 'https://github.com/ronaldoussoren'

    bugs.python.org fields:

    activity = <Date 2012-07-31.12:21:04.910>
    actor = 'ronaldoussoren'
    assignee = 'ronaldoussoren'
    closed = True
    closed_date = <Date 2012-07-31.12:21:04.911>
    closer = 'ronaldoussoren'
    components = ['Build', 'macOS']
    creation = <Date 2011-11-08.14:28:25.128>
    creator = 'ronaldoussoren'
    dependencies = []
    files = ['23633']
    hgrepos = []
    issue_num = 13371
    keywords = ['patch']
    message_count = 4.0
    messages = ['147304', '147306', '148092', '166993']
    nosy_count = 2.0
    nosy_names = ['ronaldoussoren', 'ned.deily']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue13371'
    versions = ['Python 2.7']

    @ronaldoussoren
    Copy link
    Contributor Author

    A number of Carbon wrapper modules don't build on OSX 10.7:

    $ make
    ...

    Failed to build these modules:
    _Fm _Qd _Qdoffs

    This is with '--with-universal-archs=intel', which worked fine on OSX 10.6.

    A short part of the compiler output:

    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:26: error: expected ‘)’ before ‘*’ token
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_GetFontName’:
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:60: error: ‘GetFontName’ undeclared (first use in this function)
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:60: error: (Each undeclared identifier is reported only once
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:60: error: for each function it appears in.)
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:65: warning: implicit declaration of function ‘GetFontName’
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_GetFNum’:
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:78: error: ‘GetFNum’ undeclared (first use in this function)
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:83: warning: implicit declaration of function ‘GetFNum’
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_RealFont’:
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:97: error: ‘RealFont’ undeclared (first use in this function)
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:103: warning: implicit declaration of function ‘RealFont’
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_SetFScaleDisable’:
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:115: error: ‘SetFScaleDisable’ undeclared (first use in this function)
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:120: warning: implicit declaration of function ‘SetFScaleDisable’
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_FontMetrics’:
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:129: error: ‘FMetricRec’ undeclared (first use in this function)
    /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:129: error: expected ‘;’ before ‘theMetrics’

    Given the modules and failure it seems that a number of (long) deprecated Carbon functions got removed from Apple's header files.

    @ronaldoussoren ronaldoussoren self-assigned this Nov 8, 2011
    @ronaldoussoren ronaldoussoren added OS-mac build The build process and cross-build labels Nov 8, 2011
    @vstinner vstinner added the build The build process and cross-build label Nov 8, 2011
    @ronaldoussoren
    Copy link
    Contributor Author

    _Fm fails because the wrapped functionality is no longer present in the Headers (last seen in the QD.framework headers in the 10.6 SDK)

    likewise for _Qdoffs and _Qd.

    The attached patch changed the preprocessor guards around these bindings from

    #ifndef __LP64__

    To:

    #if !defined(__LP64__) && !defined(MAC_OS_X_VERSION_10_7)
    

    That is, disable the bindings for these deprecated APIs when building for 64-bit code or when building with the 10.7 SDK (or later).

    There is a small risk with this patch: I'm not 100% sure that Apple will refrain from adding a definition for MAC_OS_X_VERSION_10_7 in a later release of the 10.6 SDK.

    @ned-deily
    Copy link
    Member

    LGTM

    @ronaldoussoren
    Copy link
    Contributor Author

    Patch is already applied (ages ago), forgot to close this issue.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    build The build process and cross-build OS-mac
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants