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

building python 2.6 with VC Express 2008 Beta2 #45806

Closed
weck mannequin opened this issue Nov 19, 2007 · 8 comments
Closed

building python 2.6 with VC Express 2008 Beta2 #45806

weck mannequin opened this issue Nov 19, 2007 · 8 comments
Assignees
Labels
build The build process and cross-build

Comments

@weck
Copy link
Mannequin

weck mannequin commented Nov 19, 2007

BPO 1465
Nosy @tiran
Files
  • PCbuild9.zip
  • socketmodule.c.patch
  • tix8.4.2.patch
  • 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 = 'https://github.com/tiran'
    closed_at = <Date 2007-12-20.13:14:04.309>
    created_at = <Date 2007-11-19.17:36:52.822>
    labels = ['build']
    title = 'building python 2.6 with VC Express 2008 Beta2'
    updated_at = <Date 2007-12-20.13:14:04.307>
    user = 'https://bugs.python.org/weck'

    bugs.python.org fields:

    activity = <Date 2007-12-20.13:14:04.307>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2007-12-20.13:14:04.309>
    closer = 'christian.heimes'
    components = ['Build']
    creation = <Date 2007-11-19.17:36:52.822>
    creator = 'weck'
    dependencies = []
    files = ['8776', '8777', '8778']
    hgrepos = []
    issue_num = 1465
    keywords = ['patch']
    message_count = 8.0
    messages = ['57642', '57643', '57644', '57646', '57652', '57671', '57683', '58872']
    nosy_count = 2.0
    nosy_names = ['christian.heimes', 'weck']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1465'
    versions = ['Python 2.6']

    @weck
    Copy link
    Mannequin Author

    weck mannequin commented Nov 19, 2007

    The PCbuild9.zip include solution and project files upgraded from
    PCbuild/PCbuild8 with some modification.

    To build with such a configuration, the following libraries are needed.

    wget http://prdownloads.sourceforge.net/tcl/tcl8.4.16-src.tar.gz
    wget http://prdownloads.sourceforge.net/tcl/tk8.4.16-src.tar.gz
    wget http://prdownloads.sourceforge.net/tix/Tix8.4.2-src.tar.gz
    wget http://download.oracle.com/berkeley-db/db-4.6.21.tar.gz
    wget http://www.bzip.org/1.0.4/bzip2-1.0.4.tar.gz
    wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz
    wget http://www.sqlite.org/sqlite-source-3_5_2.zip

    If your PCBuild is .......\dist\src\PCbuild\,

    1. unpack these libraries into new subdirectories of dist\.
    2. unpack PCbuild9.zip into dist\src\.
    3. rename tix-8.4.2 to tix8.4.2, and apply tix8.4.2.patch in dist
      directory.
    4. apply socketmodule.c.patch in dist\src directory.

    Several tools are needed too.

    1. VC Express 2008 beta2
      wget http://go.microsoft.com/fwlink/?linkid=95599

    2. Windows SDK
      Microsoft ? Windows Server? 2003 R2 Platform SDK
      http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-
      4969-ACE8-E4C0C0716ADB&displaylang=en
      OR
      Microsoft? Windows? Software Development Kit (SDK) for Windows Server
      code name “Longhorn” and .NET Framework 3.5
      http://www.microsoft.com/downloads/details.aspx?FamilyID=58726aca-8d84-
      4683-8959-be0038da7084&displaylang=en

    3. mingw + msys(to build sqlite3)
      http://sourceforge.net/projects/mingw/
      these are necessary:
      gcc-g++-3.4.5-20060117-1.tar.gz
      gcc-core-3.4.5-20060117-1.tar.gz
      mingw32-make-3.81-2.tar.gz
      binutils-2.17.50-20060824-1.tar.gz
      MSYS-1.0.10.exe

    4. ml.exe
      I extract it from VC Express 2005. ml.exe is included in MASM 8.0, but
      MASM8.0 can not be installed with VC express 2008, it just can be
      installed with VC Express 2005.

    you can follow dist\src\PCbuild9\README.txt to build libraries and
    python, the order I recommend is :
    0. Use "Start -> All Programs -> Visual C++ 9.0 Express Edition
    -> Visual Studio Tools ->Visual Studio 2008 Beta 2 Command
    Prompt"
    to get a shell window with the correct environment settings

    1. tcl8.4.16
      cd dist\tcl8.4.16\win
      nmake -f makefile.vc
      nmake -f makefile.vc INSTALLDIR=..\..\tcltk install

    2. tk8.4.16
      cd dist\tk8.4.16\win
      nmake -f makefile.vc TCLDIR=..\..\tcl8.4.16
      nmake -f makefile.vc TCLDIR=..\..\tcl8.4.16 INSTALLDIR=..\..\tcltk
      install

    3. tix8.4.2
      cd dist\tix8.4.2\win
      set MSVCDIR = %VCINSTALLDIR%
      nmake -f python.mak
      nmake -f python.mak install

    4. db-4.6.21
      Open in VC Express, the .dsw need to be converted to .sln, just compile
      db_static in both Release x86 and Debug x86.

    5. sqlite3
      I recommend you to have a try on mingw + msys, it's very easy, just
      need to excute several command:
      ./configuration
      make
      make dll
      lib /DEF:sqlite3.def /MACHINE:IX86

    If you are afraid of mingw+msys, You can get sqlite3.dll and sqlite3.h
    by
    svn export http://svn.python.org/projects/external/sqlite-source-
    3.3.4
    but by this way, you need to change options in dist\src\PCbuild9
    \pyproject.vsprops.

    1. python2.6
      Open dist\src\PCbuild9\pcbuild.sln in VC Express, compile all project
      in both Release win32 and Debug win32.
      After you build, run build.bat to copy .pyd etc to PCbuild9:
      build.bat -c Release -p win32
      build.bat -c Debug -p win32

    2. openssl-0.9.8g
      Invoke build_ssl.pyp in dist\src\PCbuild9\. you need to copy .pyd
      and .lib from x86-temp-debug and x86-temp-release.

    I am trying to have a test on the *fresh* built python26, I also plan
    to patch msi.py so that msi.py can make a productive installer, any
    suggest are welcome.

    @weck weck mannequin added the build The build process and cross-build label Nov 19, 2007
    @weck
    Copy link
    Mannequin Author

    weck mannequin commented Nov 19, 2007

    patch of socketmodule.c.

    @weck
    Copy link
    Mannequin Author

    weck mannequin commented Nov 19, 2007

    patch of tix8.4.2

    @weck
    Copy link
    Mannequin Author

    weck mannequin commented Nov 19, 2007

    some one may have difficult in getting ml.exe, i upload it here.

    @tiran
    Copy link
    Member

    tiran commented Nov 19, 2007

    I've removed the ml.exe. Please do NOT upload copyright protected
    material here.

    You should really coordinate your effort with us. :) I've already
    created a PCbuild9 directory in the py3k source tree. Once it is
    finished I'm going to backport it to 2.6. I'll have a look if I can use
    some of your ideas.

    My PCbuild9 directory builds all of the dependencies except of tcltk
    automatically - including separate 64bit builds.

    @tiran tiran self-assigned this Nov 19, 2007
    @weck
    Copy link
    Mannequin Author

    weck mannequin commented Nov 19, 2007

    hi tiran, thanks for your suggest. :-) what can i do in the next? it's
    my pleasure to contribute my effort to python.

    It's seems that directory configurations of Visual Studio 2005/Visual C
    Express 2008 are stored in
    C:\Documents and Settings\USERNAME\Local Settings\Application
    Data\Microsoft\VisualStudio\8.0\VCComponents.dat
    or
    C:\Documents and Settings\USERNAME\Local Settings\Application
    Data\Microsoft\VCExpress\9.0\VCComponents.dat
    devenv.exe/VCExpress.exe must be run first, this file will be created
    automatically.

    [VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories]
    Include Dirs=$(VCInstallDir)include;$(VCInstallDir)
    atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)include
    Reference Dirs=$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir)
    atlmfc\lib;$(VCInstallDir)lib
    Library Dirs=$(VCInstallDir)lib;$(VCInstallDir)
    atlmfc\lib;$(VCInstallDir)atlmfc\lib\i386;$(WindowsSdkDir)
    \lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib
    Source Dirs=$(VCInstallDir)atlmfc\src\mfc;$(VCInstallDir)
    atlmfc\src\mfcm;$(VCInstallDir)atlmfc\src\atl;$(VCInstallDir)crt\src
    Exclude Dirs=$(VCInstallDir)include;$(VCInstallDir)
    atlmfc\include;$(WindowsSdkDir)\include;$(FrameworkSDKDir)
    include;$(FrameworkDir)$(FrameworkVersion);$(VCInstallDir)
    atlmfc\lib;$(VCInstallDir)lib
    Path Dirs=$(VCInstallDir)bin;$(WindowsSdkDir)\bin;$(VSInstallDir)Common7
    \Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7
    \ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)
    bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(SystemRoot)
    \SysWow64;$(FxCopDir);$(PATH)

    SCons has done some work on detecting msvc compiler. :-)

    msi.py should extract msvcrxx.dll from *Merge Modules* or *redist*
    directory.

    @tiran
    Copy link
    Member

    tiran commented Nov 20, 2007

    Have you studied my patch http://bugs.python.org/issue1455? I didn't
    want to parse some files. Instead I used a much simpler approach in my
    patch. I'm using the "vcvarsall.bat" to set up an environment and "set"
    to read the new environment from stdout. It works like a charm and it
    could even support cross compiling.

    @tiran
    Copy link
    Member

    tiran commented Dec 20, 2007

    The PCbuild9 directory works for 2.6 and 3.0.

    @tiran tiran closed this as completed Dec 20, 2007
    @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
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant