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

Python 2.7.3.px spkg does not build on Cygwin. #13319

Closed
jpflori opened this issue Aug 1, 2012 · 38 comments
Closed

Python 2.7.3.px spkg does not build on Cygwin. #13319

jpflori opened this issue Aug 1, 2012 · 38 comments

Comments

@jpflori
Copy link

jpflori commented Aug 1, 2012

Some patches posterior to Python 2.7.3 are needed to build on Cygwin.
Namely fixes from the issues 9665, 14437, 14438 on Python issue tracker.

Use the spkg available at:
http://boxen.math.washington.edu/home/jpflori/python-2.7.3.p3.spkg

Depends on #13579

Upstream: Fixed upstream, but not in a stable release.

CC: @kcrisman @dimpase

Component: porting: Cygwin

Keywords: pythong cygwin spkg

Author: Jean-Pierre Flori

Reviewer: Dmitrii Pasechnik

Merged: sage-5.6.beta0

Issue created by migration from https://trac.sagemath.org/ticket/13319

@jpflori jpflori added this to the sage-5.4 milestone Aug 1, 2012
@jpflori
Copy link
Author

jpflori commented Aug 1, 2012

Author: Jean-Pierre Flori

@jpflori
Copy link
Author

jpflori commented Aug 1, 2012

comment:1

Some further details:

  • issue 9665 is still opened (and as it is back from 2010 and was not modified since, I doubt it will be closed any time soon unless one of us takes action);
  • issue 14337 has been merged, but unfortunately after the Python 2.7.3 release;
  • issue 14338 has been closed as invalid and marked as a Cygwin, rather than Python, bug, why not... but what's sure is that it prevents to build Python on Cygwin.

The patche we need from 9665 modifies configure.in (the other patch is just issue 14337).
In order to take it into account in the configure script, I ran "autoreconf -i" which also modified the configure script in several other places, but in a seemingly harmless way.
It is mainly because I used a newer version of autotools than the one originally used for the Python 2.7.3 release, and autotools decided inbetween to prefix some variables names with "ac_".
A somehow less invasive solution would be to directly patch the configure script, but I'm less inclined to do so than properly patching configure.in.

The updated spkg is available at:
http://perso.telecom-paristech.fr/~flori/sage/python-2.7.3.p1.spkg

It builds correctly on Ubuntu 12.04 64 bits and is currently building on my Cygwin 1.7.16 on Windows 7 64 bits (it failed a first time but because of memory exhaustion which I often get while using Cygwin or MinGW).

I've search trac for a more recent spkg than the 2.7.3.p0 but did not find anything.
If I missed some tickets including such an spkg, please let me know or directly rebase the patches proposed here.

@jpflori

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Aug 1, 2012

comment:2

this patch (apparently) allowed Python spkg to build on my Cygwin installation (on 32-bit Win 7). Good!

The next spkg, mercurial, failed with a typical fork() trouble. But this is probably not related. I guess now I need to rebaseall, including newly created dlls...

@jpflori
Copy link
Author

jpflori commented Aug 1, 2012

comment:3

Same for me about mercurial.
I'm posting my progress on the CygwinPort page on a freshly installed Cygwin 1.7.16 on Windows 7 64 bits for Sage 5.2.

@jpflori
Copy link
Author

jpflori commented Aug 2, 2012

Changed keywords from pythong cygwin to pythong cygwin spkg

@jdemeyer
Copy link

comment:5

Could you please use my autotools spkg to regenerate configure and friends with the same version as the original?

@jdemeyer
Copy link

comment:6

Also, for timestamp reasons, the file configure must be patched after configure.in. This means that, either you create a separate patch for configure.in and for configure, or you manually reverse the order of the patches in the .patch file.

@jpflori
Copy link
Author

jpflori commented Sep 30, 2012

comment:7

I've updated the spkg after using your autotools package and manually reversed the order of configure and configure.in in the parch file.
The spkg diff will follow shortly.

@jpflori
Copy link
Author

jpflori commented Sep 30, 2012

spkg diff, for review only

@jpflori
Copy link
Author

jpflori commented Sep 30, 2012

comment:8

Attachment: spkg.diff.gz

One can remark that, although a quite similar version of autoconf was used, there are still of useless changes to the configure script... but much less than before.

@dimpase
Copy link
Member

dimpase commented Oct 1, 2012

comment:9

looks OK to me.

@jdemeyer
Copy link

jdemeyer commented Oct 1, 2012

comment:10

Replying to @jpflori:

One can remark that, although a quite similar version of autoconf was used, there are still of useless changes to the configure script... but much less than before.

Indeed. This is likely because the previous configure script was created by a distribution-patched autoconf with the same version number, but some patches added.

@jpflori

This comment has been minimized.

@jdemeyer jdemeyer modified the milestones: sage-5.4, sage-5.5 Oct 3, 2012
@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

jdemeyer commented Oct 5, 2012

Reviewer: Dmitrii Pasechnik

@jpflori
Copy link
Author

jpflori commented Oct 12, 2012

comment:18

No problem, I understand your point.

@jdemeyer
Copy link

Dependencies: #13579

@jdemeyer jdemeyer removed this from the sage-5.5 milestone Oct 13, 2012
@kcrisman
Copy link
Member

kcrisman commented Dec 4, 2012

comment:20

In order to test Sage 5.5.rc0 on Cygwin, I created a (probably sketchy) spkg here based on #13631, the followup to #13579. JP or Jeroen can feel free to make it better, but I really wanted to try things on 5.5.rc0 since we have this little lull in merging now which gives me a breather to test this out.

@jpflori
Copy link
Author

jpflori commented Dec 4, 2012

comment:21

Could you post the diff from last commit?
It will be easier to have a look at that first.

@kcrisman
Copy link
Member

kcrisman commented Dec 4, 2012

comment:22

Could you post the diff from last commit?
It will be easier to have a look at that first.

Good point, coming right up.

@kcrisman
Copy link
Member

kcrisman commented Dec 4, 2012

Attachment: python-2.7.3.p3-python-2.7.3.p2.diff.gz

Diff from #13631 to the kcrisman p3 spkg

@kcrisman
Copy link
Member

kcrisman commented Dec 4, 2012

comment:23

Well, Python builds with this, anyway. I do get offset on the sdist.py file in hunks 1 and 2, and a huge number of warnings while untarring of

tar: Ignoring unknown extended header keyword `SCHILY.{dev,nlink,ino}`

and I have no idea what that was about. As usual, the bits to build several modules were not found, but they look like the usual ones.

I also got a somewhat more worrisome

IOError: invalid Python installation: unable to open /home/newsagetest/sage-5.5.rc0/local/lib/python-2.7/config/Makefile (No such file or directory)

but eventually everything seemed to work and

math module imported OK

etc., so maybe we're in business... ?

@jpflori

This comment has been minimized.

@jpflori
Copy link
Author

jpflori commented Dec 4, 2012

comment:24

Ok, I've slightly reworked your spkg to properly rebase it on the sage shipped spkg (I guess you took the spkg from the ticket page which does not contain the hg tag).
I've simplified a patch which modified useless parts of configure.
I've updated the patches so that there is no fuzz.
There does not seem to be tar problems anymore (I got these with your original spkg).

If you wanna have a look and check it builds correctly it shoudl stay positive review I guess.

I've checked it builds ok on Linux and will try Cygwin tonight.
As downloading sage 5.5.rc0 from boxen is too low and I've deleted the tar, I'll try to begin from a built dir from my linux install, not sure it will work.

@jpflori jpflori changed the title Python 2.7.3.p0 does not build on Cygwin. Python 2.7.3.px spkg does not build on Cygwin. Dec 4, 2012
@jpflori
Copy link
Author

jpflori commented Dec 4, 2012

spkg diff, for review only

@jpflori
Copy link
Author

jpflori commented Dec 5, 2012

comment:25

Attachment: python-2.7.3.p3.diff.gz

I've built the spkg successfully with sage-5.5.rc0 on my windows 7 (64 bits) as well.
Python says some modules were not build, but the same is true under linux (in fact there is no inclusion between the two lists, some modules were built on Cygwin (_curses, _curses_panel, imageop, dbm, dl) and not on Linux and vice-versa (nis, spwd, linuxaudiodex, ossaudiodev))/

So let's leave this as positive review, nothing really changed since Dima review, and merge this asap to avoid further rebasing.

@jpflori jpflori added this to the sage-5.6 milestone Dec 5, 2012
@jpflori jpflori removed the pending label Dec 5, 2012
@kcrisman
Copy link
Member

kcrisman commented Dec 5, 2012

comment:26

Python says some modules were not build, but the same is true under linux (in fact there is no inclusion between the two lists, some modules were built on Cygwin (_curses, _curses_panel, imageop, dbm, dl) and not on Linux and vice-versa (nis, spwd, linuxaudiodex, ossaudiodev))/

Hilarious - it's yet another combo on XP and another on Mac.

So let's leave this as positive review, nothing really changed since Dima review, and merge this asap to avoid further rebasing.

Agreed.

@jdemeyer
Copy link

comment:27

Replying to @kcrisman:

Well, Python builds with this, anyway. I do get offset on the sdist.py file in hunks 1 and 2, and a huge number of warnings while untarring of

tar: Ignoring unknown extended header keyword `SCHILY.{dev,nlink,ino}`

That's because of a slightly different tar format (GNU tar vs. BSD tar). But that's no problem because my merger script always untars and tars the spkgs to ensure a consistent format.

@jdemeyer
Copy link

Work Issues: HTTP 404

@jdemeyer
Copy link

comment:28
The requested URL /home/flori/python-2.7.3.p3.spkg was not found on this server.

@kcrisman
Copy link
Member

Changed work issues from HTTP 404 to none

@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member

comment:29

The URL was just a little off.

@jdemeyer
Copy link

Merged: sage-5.6.beta0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants