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

multiprocessing does not compile on systems which do not define sem_timedwait #48126

Closed
henryprecheur mannequin opened this issue Sep 16, 2008 · 9 comments
Closed

multiprocessing does not compile on systems which do not define sem_timedwait #48126

henryprecheur mannequin opened this issue Sep 16, 2008 · 9 comments
Labels
build The build process and cross-build extension-modules C modules in the Modules dir

Comments

@henryprecheur
Copy link
Mannequin

henryprecheur mannequin commented Sep 16, 2008

BPO 3876
Nosy @skrah
Files
  • aix-patch: Patching multiprocessing.
  • EKIT.PATCH3: cope with missing sem_timedwait() on Solaris9
  • EKIT.PATCH2: CMSG_SPACE/CMESG_LEN macros
  • 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 2013-01-17.12:40:00.463>
    created_at = <Date 2008-09-16.05:10:02.294>
    labels = ['extension-modules', 'build']
    title = 'multiprocessing does not compile on systems which do not define sem_timedwait'
    updated_at = <Date 2013-01-17.12:40:00.384>
    user = 'https://bugs.python.org/henryprecheur'

    bugs.python.org fields:

    activity = <Date 2013-01-17.12:40:00.384>
    actor = 'skrah'
    assignee = 'jnoller'
    closed = True
    closed_date = <Date 2013-01-17.12:40:00.463>
    closer = 'skrah'
    components = ['Extension Modules']
    creation = <Date 2008-09-16.05:10:02.294>
    creator = 'henry.precheur'
    dependencies = []
    files = ['11726', '14952', '14953']
    hgrepos = []
    issue_num = 3876
    keywords = []
    message_count = 9.0
    messages = ['73291', '74427', '74439', '75217', '93024', '93025', '116024', '120226', '180127']
    nosy_count = 10.0
    nosy_names = ['sable', 'jnoller', 'henry.precheur', 'brasse', 'dave.peckham', 'aniou', 'srid', 'asksol', 'skrah', 'iandekit']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'compile error'
    url = 'https://bugs.python.org/issue3876'
    versions = ['Python 2.6', 'Python 3.1']

    @henryprecheur
    Copy link
    Mannequin Author

    henryprecheur mannequin commented Sep 16, 2008

    Compiling multiprocessing on OpenBSD fails. iovec is not declared.

    Adding the following line to multiprocessing.c solves the problem:
    #include <sys/uio.h>

    But right after I got:
    ./python:build/lib.openbsd-4.4-amd64-2.6/_multiprocessing.so: undefined
    symbol 'sem_timedwait'

    It looks like multiprocessing is using a function that is not defined in
    OpenBSD and very likely on other BSD's (FreeBSD & NetBSD don't have a
    man page for this function)

    According to this page, some other systems don't have this function:
    http://www.gnu.org/software/gnulib/manual/html_node/sem_005ftimedwait.html

    @henryprecheur henryprecheur mannequin added extension-modules C modules in the Modules dir build The build process and cross-build labels Sep 16, 2008
    @jnoller jnoller mannequin self-assigned this Oct 6, 2008
    @jnoller jnoller mannequin changed the title multiprocessing does not compile on *BSD and potentialy other systems multiprocessing does not compile on systems which do not define sem_timedwait Oct 6, 2008
    @brasse
    Copy link
    Mannequin

    brasse mannequin commented Oct 7, 2008

    When trying to build Python 2.6 on AIX 5.2 the following error message:

    (
    The steps I have taken prior to this are:

    1. export PATH=/usr/bin/:/usr/vacpp/bin/
    2. ./configure --with-gcc=xlc_r --with-cxx=xlC_r --disable-ipv6
    3. make
      )

    ./Modules/ld_so_aix xlc_r -bI:Modules/python.exp build/temp.aix-5.2-
    2.6/home/mabr/Python-2.6/Modules/_multiprocessing/multiprocessing.o
    build/temp.aix-5.2-2.6/home/mabr/Python-
    2.6/Modules/_multiprocessing/socket_connection.o build/temp.aix-5.2-
    2.6/home/mabr/Python-2.6/Modules/_multiprocessing/semaphore.o -
    L/usr/local/lib -o build/lib.aix-5.2-2.6/_multiprocessing.so
    ld: 0711-317 ERROR: Undefined symbol: .sem_timedwait
    ld: 0711-317 ERROR: Undefined symbol: .CMSG_SPACE
    ld: 0711-317 ERROR: Undefined symbol: .CMSG_LEN
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
    information.
    *** WARNING: renaming "_multiprocessing" since importing it failed: No
    such file or directory
    error: No such file or directory
    make: The error code from the last command is 1.

    @brasse
    Copy link
    Mannequin

    brasse mannequin commented Oct 7, 2008

    Here is a small patch that lets me build on AIX 5.2.

    @aniou
    Copy link
    Mannequin

    aniou mannequin commented Oct 25, 2008

    I confirm build failure on NetBSD 4.0.1 (latest stable) - but
    NetBSD-current is - probably - also affected:

    *** WARNING: renaming "_multiprocessing" since importing it failed:
    build/lib.netbsd-4.0.1-i386-2.6/_multiprocessing.so: Undefined PLT
    symbol "sem_timedwait" (symnum = 20)

    system: NetBSD 4.0.1 (i386)
    Python version: 2.6

    @iandekit
    Copy link
    Mannequin

    iandekit mannequin commented Sep 23, 2009

    Similarly, compile fails on Solaris 9 due to lack of sem_timedwait()
    so here is a patch for that. Solaris 10 was the first Solaris
    to have this function so the patch adapts for that case.

    @iandekit
    Copy link
    Mannequin

    iandekit mannequin commented Sep 23, 2009

    Similar to aix-patch, I enclose what I did for compilation
    on Solaris 9, using macros from Solaris 10's headers.

    These differ slightly to the aix ones, but I don't know if the
    difference matters. (alignment related)

    @sable
    Copy link
    Mannequin

    sable mannequin commented Sep 10, 2010

    For info: I have no problem compiling _multiprocessing and passing the unittest test_multiprocessing with py3k rev84631 on AIX 6.1 with xlc_r compiler without the patch proposed here.

    I don't know if this is due to some updates in Python (3.2alpha2+) or AIX (6.1).

    @asksol
    Copy link
    Mannequin

    asksol mannequin commented Nov 2, 2010

    What is the status of this issue? There are several platform listed here, which I unfortunately don't have access to.

    @skrah
    Copy link
    Mannequin

    skrah mannequin commented Jan 17, 2013

    On OpenBSD 5.2 this is fixed. The AIX buildbot looks okay and I doubt
    that anyone will commit something for Solaris 9.

    @skrah skrah mannequin closed this as completed Jan 17, 2013
    @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 extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants