classification
Title: bzip2 build sometimes fails (VS8.0)
Type: Stage: resolved
Components: Build Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, loewis, ocean-city, tim.golden
Priority: normal Keywords: patch

Created on 2010-09-09 07:38 by ocean-city, last changed 2010-09-18 22:54 by ocean-city. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_bz2_vcproj.patch ocean-city, 2010-09-16 06:08
Messages (9)
msg115930 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-09 07:38
bzip2 project sometimes fails to build pyd file. This is because

(snip)
nmake /nologo /f makefile.msc lib
(snip)
nmake /nologo /f makefile.msc clean

is run by bzip2.vcproj, but "lib" command won't create
bzip2.exe nor bzip2recover.exe, wheres "clean" will try
to delete these files without checking their existence.

Technically it is easy to fix this. (Replace "del ..." with
if exists ... del .....    in bzip2-1.0.5/makefile.msc)
But is it allowed to modify external project files? Thank you.
msg116359 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-14 01:26
I propose following solution.

* svn copy http://svn.python.org/projects/external/bzip2-1.0.5
  http://svn.python.org/projects/external/bzip2-1.0.5.0

* fix makefile in 
  http://svn.python.org/projects/external/bzip2-1.0.5

* svn copy http://svn.python.org/projects/external/bzip2-1.0.5
  http://svn.python.org/projects/external/bzip2-1.0.5.1

Or, use "nmake /nologo /f makefile.msc" instead of
        "nmake /nologo /f makefile.msc lib".
msg116364 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-09-14 04:35
Another solution would be not to make clean, but del *.obj.

However, I would prefer if we stopped using makefile.msc altogether,
and explicitly included the source files of bzip2 into bz2.vcproj, similar to the way _bsddb is built (in 2.7).
msg116509 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-16 04:18
Thank you for the reply. I agree with you. I'll try to
create latter option.
msg116510 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-16 04:21
- create latter option
+ create the patch by latter option
msg116511 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-16 06:08
Probably this patch works.

P.S.
These lines in PCBuild/vs9to8.py seem to be not needed. I could
build python even without it, (I only tried py3k)

  # Bah. VS8.0 does not expand macros in file names.
  # Replace them here.
  lines = lines.replace('$(sqlite3Dir)', '..\\..\\..\\sqlite-3.6.21')

I'm not sure, maybe VS8 SP1's bug? I tried on this.

  Microsoft Visual Studio 2005
  Version 8.0.50727.42  (RTM.050727-4200)
msg116523 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-09-16 11:36
I can't test the patch right now, but it looks good to me.

Please check it into py3k to see how the buildbots do. If it seems to work correctly (both for x86 and AMD64), feel free to backport it to 2.7 and 3.1.

As for vs9to8: I can't comment; I don't use older VS versions anymore.
In any case, this looks like an unrelated issue.
msg116584 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-16 17:57
Committed in r84851(py3k). Let's see buildbot.
msg116834 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-09-18 22:54
Backported in r84881(release27-maint), r84886(release31-maint).
History
Date User Action Args
2010-09-18 22:54:16ocean-citysetstatus: open -> closed
resolution: fixed
messages: + msg116834

stage: resolved
2010-09-16 17:57:23ocean-citysetmessages: + msg116584
2010-09-16 11:36:02loewissetmessages: + msg116523
2010-09-16 06:08:45ocean-citysetfiles: + py3k_bz2_vcproj.patch
keywords: + patch
messages: + msg116511
2010-09-16 04:21:39ocean-citysetmessages: + msg116510
2010-09-16 04:18:58ocean-citysetmessages: + msg116509
2010-09-14 04:35:04loewissetmessages: + msg116364
2010-09-14 01:26:24ocean-citysetmessages: + msg116359
2010-09-11 23:43:32eric.araujosetnosy: + loewis, tim.golden, brian.curtin
2010-09-09 07:38:09ocean-citycreate