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

Compile error on OS X 10.5 #45699

Closed
andres mannequin opened this issue Oct 29, 2007 · 9 comments
Closed

Compile error on OS X 10.5 #45699

andres mannequin opened this issue Oct 29, 2007 · 9 comments
Labels
build The build process and cross-build OS-mac release-blocker

Comments

@andres
Copy link
Mannequin

andres mannequin commented Oct 29, 2007

BPO 1358
Nosy @gvanrossum, @loewis, @ronaldoussoren, @simonpercivall
Files
  • configure.txt
  • unnamed
  • config.log.gz
  • unnamed
  • 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 = None
    closed_at = <Date 2007-12-01.15:21:29.331>
    created_at = <Date 2007-10-29.18:14:49.366>
    labels = ['OS-mac', 'build', 'release-blocker']
    title = 'Compile error on OS X 10.5'
    updated_at = <Date 2007-12-01.15:21:29.323>
    user = 'https://bugs.python.org/andres'

    bugs.python.org fields:

    activity = <Date 2007-12-01.15:21:29.323>
    actor = 'ronaldoussoren'
    assignee = 'nnorwitz'
    closed = True
    closed_date = <Date 2007-12-01.15:21:29.331>
    closer = 'ronaldoussoren'
    components = ['macOS']
    creation = <Date 2007-10-29.18:14:49.366>
    creator = 'andres'
    dependencies = []
    files = ['8655', '8659', '8660', '8661']
    hgrepos = []
    issue_num = 1358
    keywords = []
    message_count = 9.0
    messages = ['56921', '56926', '56936', '56962', '56980', '56985', '57755', '57836', '58050']
    nosy_count = 6.0
    nosy_names = ['gvanrossum', 'loewis', 'nnorwitz', 'ronaldoussoren', 'simon.percivall', 'andres']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue1358'
    versions = ['Python 2.5']

    @andres
    Copy link
    Mannequin Author

    andres mannequin commented Oct 29, 2007

    Compiling python 2.5.1 on Mac OS X 10.5 (Leopard) fails with the
    following message:

    gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
    -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I.
    -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o
    Modules/posixmodule.o
    ./Modules/posixmodule.c: In function ‘posix_setpgrp’:
    ./Modules/posixmodule.c:3592: error: too few arguments to function ‘setpgrp’
    make: *** [Modules/posixmodule.o] Error 1

    I am also attaching the output of the configuration script.

    @andres andres mannequin added OS-mac build The build process and cross-build labels Oct 29, 2007
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Oct 29, 2007

    Can you please also attach config.log (perhaps compressed)?

    @andres
    Copy link
    Mannequin Author

    andres mannequin commented Oct 29, 2007

    I've attached a compressed config.log.

    Incidentally, we were able to get Python to compile by appending the  
    following line to pyconfig.h:
    #define	SETPGRP_HAVE_ARG

    -Andres

    On Oct 29, 2007, at 1:00 PM, Martin v. Löwis wrote:

    Martin v. Löwis added the comment:

    Can you please also attach config.log (perhaps compressed)?

    ----------
    nosy: +loewis


    Tracker <report@bugs.python.org>
    <http://bugs.python.org/issue1358\>


    @gvanrossum
    Copy link
    Member

    Thanks for testing on Leopard! I haven't gotten that yet.

    Assigning to Neal since this ought to be fixed before 2.5.2 is released.
    (But someone needs to come up with a proper patch.)

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Oct 30, 2007

    There is an autoconf test that tries to compile

    | #include <unistd.h>
    | int
    | main ()
    | {
    | setpgrp(0,0);
    | ;
    | return 0;
    | }

    (with many additional defines - see config.log.gz). This file compiles
    with the error message

    conftest.c:185: error: too many arguments to function 'setpgrp'

    hence configure concludes that SETPGRP_HAVE_ARG should *not* be defined

    • yet you say it works when it is defined.

    Can somebody with access to the system resolve this mystery? Studying
    the header file that has the setpgrp declaration is probably necessary.

    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Oct 31, 2007

    I don't have access to a 10.5 machine. My guess is that the difference
    is between configure not setting _XOPEN_SOURCE and/or
    _XOPEN_SOURCE_EXTENDED and it being set in pyconfig.h. At least those
    are both defined on 10.4.

    This page talks about needing to include unistd.h, but doesn't give
    enough info:
    http://developer.apple.com/documentation/Darwin/Reference/Manpages/man2/setpgid.2.html

    Hopefully someone else with access to 10.5 can confirm if this is the
    case and we can resolve this.

    @simonpercivall
    Copy link
    Mannequin

    simonpercivall mannequin commented Nov 22, 2007

    It has to do with the MACOSX_DEPLOYMENT_TARGET. If it's set to 10.4, the
    legacy version of setpgrp is used (with args), it it's 10.5, setpgrp
    expects no arguments. It seems configure won't detect the difference.

    @gvanrossum
    Copy link
    Member

    IMO it should be set to 10.4 since we want binaries that run on that
    platform too. Is this something we can fix in the configure script?

    @ronaldoussoren
    Copy link
    Contributor

    This issue is fixed in the trunk and python2.5 branch.

    To work around this issue with the 2.5.1 source tree you have to set
    MACOSX_DEPLOYMENT_TARGET when configuring python:

    ../configure <insert-args-here> MACOSX_DEPLOYMENT_TARGET=10.3

    (the value 10.3 is what configure picks by default, building with 10.5
    as the target works as well). The problem is that configure picked a
    deployment target for use during compilation of python itself, but
    didn't use that during the configure phase. That causes configure to
    pick up the wrong set of feature macros.

    @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 release-blocker
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants