Compiling Python 3.2 on Cygwin fails

Discussion in 'Python' started by Daniel Rentz, May 3, 2011.

  1. Daniel Rentz

    Daniel Rentz Guest

    Hello,

    I've downloaded the 3.2 source tarball from python.org and tried to
    compile Python from scratch in a Cygwin 1.7.7 environment. Configure
    works as expected. Make fails with the following message:

    make: *** No rule to make target `libpython3.2m.dll.a', needed by
    `python.exe'. Stop.

    There is a suspicious line in Makefile.pre.in, line 509:

    $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)

    Changing that line to

    $(DLLLIBRARY) $(LDLIBRARY): $(LIBRARY_OBJS)

    lets make finish, but gives a bunch of other errors and warnings, such as:

    <cite>

    /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:
    cannot find -lpython3.2
    collect2: ld returned 1 exit status

    Python build finished, but the necessary bits to build these modules
    were not found:
    _tkinter nis ossaudiodev
    spwd
    To find the necessary bits, look in setup.py in detect_modules() for the
    module's name.

    Failed to build these modules:
    _bisect _codecs_cn _codecs_hk
    _codecs_iso2022 _codecs_jp _codecs_kr
    _codecs_tw _csv _ctypes
    _ctypes_test _curses _curses_panel
    _datetime _elementtree _gdbm
    _hashlib _heapq _json
    _lsprof _multibytecodec _multiprocessing
    _pickle _posixsubprocess _random
    _socket _sqlite3 _ssl
    _struct _testcapi array
    atexit audioop binascii
    bz2 cmath crypt
    fcntl grp math
    mmap parser pyexpat
    readline resource select
    syslog termios time
    unicodedata zlib

    </cite>

    Is there something obvious I am missing here?


    Regards
    Daniel
    Daniel Rentz, May 3, 2011
    #1
    1. Advertising

  2. Daniel Rentz

    sewpafly Guest

    I was able to a little further by changing 2 lines in Makefile.pre.in.

    On line 170, changed:
    DLLLIBRARY= @DLLLIBRARY@
    to:
    DLLLIBRARY= libpython$(VERSION).dll

    On line 509 it had:
    $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)

    which I changed to:
    $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)

    Compile finishes with:
    Python build finished, but the necessary bits to build these modules
    were not found:
    _gdbm _sqlite3 _tkinter
    nis ossaudiodev spwd
    To find the necessary bits, look in setup.py in detect_modules() for
    the module's name.


    Failed to build these modules:
    _curses _curses_panel


    But 'make test' returns many errors.

    I'm thinking I'll try Python 3.1 instead.
    sewpafly, Jun 20, 2011
    #2
    1. Advertising

  3. Daniel Rentz

    Aly Tawfik Guest

    On Jun 20, 12:44 pm, sewpafly <> wrote:
    > I was able to a little further by changing 2 lines in Makefile.pre.in.
    >
    > On line 170, changed:
    >     DLLLIBRARY= @DLLLIBRARY@
    > to:
    >     DLLLIBRARY= libpython$(VERSION).dll
    >
    > On line 509 it had:
    >     $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
    >
    > which I changed to:
    >     $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
    >
    > Compile finishes with:
    > Python build finished, but the necessary bits to build these modules
    > were not found:
    > _gdbm              _sqlite3           _tkinter
    > nis                ossaudiodev        spwd
    > To find the necessary bits, look in setup.py in detect_modules() for
    > the module's name.
    >
    > Failed to build these modules:
    > _curses            _curses_panel
    >
    > But 'make test' returns many errors.
    >
    > I'm thinking I'll try Python 3.1 instead.




    Yes! I am facing the same problem. I, too, will try to install Python
    3.1.4 instead. Did it work for you?
    Aly Tawfik, Jul 4, 2011
    #3
  4. Daniel Rentz

    Aly Tawfik Guest

    On Jun 20, 12:44 pm, sewpafly <> wrote:
    > I was able to a little further by changing 2 lines in Makefile.pre.in.
    >
    > On line 170, changed:
    >     DLLLIBRARY= @DLLLIBRARY@
    > to:
    >     DLLLIBRARY= libpython$(VERSION).dll
    >
    > On line 509 it had:
    >     $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
    >
    > which I changed to:
    >     $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
    >
    > Compile finishes with:
    > Python build finished, but the necessary bits to build these modules
    > were not found:
    > _gdbm              _sqlite3           _tkinter
    > nis                ossaudiodev        spwd
    > To find the necessary bits, look in setup.py in detect_modules() for
    > the module's name.
    >
    > Failed to build these modules:
    > _curses            _curses_panel
    >
    > But 'make test' returns many errors.
    >
    > I'm thinking I'll try Python 3.1 instead.


    I, too, am facing the same problem. Which version of Python 3.1 did
    you install, and did it work? Thanks!
    Aly Tawfik, Jul 4, 2011
    #4
  5. On Mon, Jul 4, 2011 at 3:49 PM, Aly Tawfik <> wrote:
    > On Jun 20, 12:44 pm, sewpafly <> wrote:
    >> I was able to a little further by changing 2 lines in Makefile.pre.in.
    >>
    >> On line 170, changed:
    >>     DLLLIBRARY= @DLLLIBRARY@
    >> to:
    >>     DLLLIBRARY= libpython$(VERSION).dll
    >>
    >> On line 509 it had:
    >>     $(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
    >>
    >> which I changed to:
    >>     $(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
    >>
    >> Compile finishes with:
    >> Python build finished, but the necessary bits to build these modules
    >> were not found:
    >> _gdbm              _sqlite3           _tkinter
    >> nis                ossaudiodev        spwd
    >> To find the necessary bits, look in setup.py in detect_modules() for
    >> the module's name.
    >>
    >> Failed to build these modules:
    >> _curses            _curses_panel
    >>
    >> But 'make test' returns many errors.
    >>
    >> I'm thinking I'll try Python 3.1 instead.

    >
    > I, too, am facing the same problem. Which version of Python 3.1 did
    > you install, and did it work? Thanks!
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >


    Cygwin is not really a supported platform. Reverting to Python 3.1
    won't help at all. Download the 2.6.5 source version (i.e., click the
    Src box) using cygwin setup. Apply the included patches [some don't
    apply cleanly any more]. That will get you most of the way there.
    There are a few other issues the details of which I don't remember.
    I'm not sure why there hasn't been a cygwin distribution lately. You
    might ask on the cygwin mailing list. [Ultimately somebody with an
    interest in cygwin will need to get active in python development. I've
    been meaning to do this but life gets in the way.]
    DR
    David Robinow, Jul 5, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    420
  2. Replies:
    0
    Views:
    420
  3. WELCOME to

    , Sep 3, 2003, in forum: Python
    Replies:
    1
    Views:
    504
    Robin Becker
    Sep 5, 2003
  4. Anthony Fairchild

    Compiling under cygwin - make test fails

    Anthony Fairchild, Jun 3, 2005, in forum: Ruby
    Replies:
    2
    Views:
    127
    Anthony Fairchild
    Jun 3, 2005
  5. Replies:
    4
    Views:
    238
    johannes falcone
    Feb 25, 2013
Loading...

Share This Page