Compiling Python 3.2 on Cygwin fails


D

Daniel Rentz

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
 
Ad

Advertisements

S

sewpafly

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

On line 170, changed:
DLLLIBRARY= @[email protected]
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.
 
A

Aly Tawfik

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

On line 170, changed:
    DLLLIBRARY= @[email protected]
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?
 
A

Aly Tawfik

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

On line 170, changed:
    DLLLIBRARY= @[email protected]
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!
 
Ad

Advertisements

D

David Robinow

I, too, am facing the same problem. Which version of Python 3.1 did
you install, and did it work? Thanks!

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top