Building ASCEND for 64-bit Windows: Difference between revisions

From ASCEND
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
We are working towards fixing these items.
We are working towards fixing these items.


Steps to date:
== Steps to date ==


* install MSYS bundle to c:\msys as instructed [http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS here]
* install MSYS bundle to c:\msys as instructed [http://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS here]
Line 20: Line 20:
* <tt>scons</tt>
* <tt>scons</tt>


For CUnit
* use SVN trunk code
* <tt>./configure --prefix=/mingw --host=x86_64-w64-mingw32 --build=mingw32</tt>
* make install
For SUNDIALS (used by the [[IDA]] solver):
* <tt>./configure --host=x86_64-w64-mingw --prefix=/mingw</tt>
* <tt>make -j4</tt>
* make install 
GDB
* Download the GDB package from the MinGW-64 site [https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/ here] (we chose http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/x86_64-w64-mingw32-gdb-7.1.90.20100730.zip/download x86_64-w64-mingw32-gdb-7.1.90.20100730.zip])
* Building GDB from source tarball version 7.3.1 worked OK but the resulting GDB didn't recognise/load symbols from the running executable. So download the MinGW-64 pre-compiled version instead.


Test suite
Test suite
Line 57: Line 41:
* Packaging it all (will NSIS 32-bit be OK to use?)
* Packaging it all (will NSIS 32-bit be OK to use?)
* Conversions between 'void *' and 'unsigned long' don't seem to work on Win64. Instead, Windows wants 'void *' to be cast to 'unsigned long long', since those pointers are the same size.
* Conversions between 'void *' and 'unsigned long' don't seem to work on Win64. Instead, Windows wants 'void *' to be cast to 'unsigned long long', since those pointers are the same size.
== Cunit ==
* use SVN trunk code
* <tt>./configure --prefix=/mingw --host=x86_64-w64-mingw32 --build=mingw32</tt>
* make install
== SUNDIAL ==
SUNDIALS is used by the [[IDA]] solver in ASCEND.
* <tt>./configure --host=x86_64-w64-mingw32 --prefix=/mingw</tt>
* <tt>make -j4</tt>
* <tt>make install</tt>
== IPOPT ==
* download the source tarball
* <tt>./configure --host=x86_64-w64-mingw32 --enable-shared --prefix=/mingw</tt>
* <tt>make -j4</tt>
* <tt>make install</tt>
== GDB ==
* Download the GDB package from the MinGW-64 site [https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/ here] (we chose http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/x86_64-w64-mingw32-gdb-7.1.90.20100730.zip/download x86_64-w64-mingw32-gdb-7.1.90.20100730.zip])
* Building GDB from source tarball version 7.3.1 worked OK but the resulting GDB didn't recognise/load symbols from the running executable. So download the MinGW-64 pre-compiled version instead.

Revision as of 20:45, 26 January 2012

There are a number of barriers to building ASCEND on 64-bit Windows:

We are working towards fixing these items.

Steps to date

  • install MSYS bundle to c:\msys as instructed here
  • install MinGW-64 bundle to c:\mingw64 as instructed (we used mingw-w64-bin_i686-mingw_20111220.zip
  • install 64-bit Python 2.7.2
  • append /c/Python27 and /c/Python27/Scripts to the PATH in MSYS.
  • download and extract source tarball for SCons 1.2.0. Build via python setup.py bdist_wininst then install resulting .exe in dist subfolder.
  • create 'scons' file in c:\Python27\Scripts containing
#!/bin/sh
python /c/Python27/Scripts/scons.py $*
  • svn checkout ASCEND source code (from trunk)
  • scons


Test suite

  • The CUnit test suites seem to be basically working.
  • Suite 'utilities_ascEnvVar' current crashing.

Python bindings

  • Installed SWIG 1.3.40
  • Seems to be an issue with linking to python27.lib. The problem may be that described here, or it could be a 64-bit specific problem (or both). Perhaps we should try what happens with Python 2.5 alternatively.

Things we need to work on:

  • A lot of new compiler warnings due to the very new GCC version used by MinGW-64 that will need to be worked through.
  • Installing the MinGW-64 toolchain with 'standard' (local) tool filenames (maybe a quick script to rename or symlink them?)
  • Detecting 32-bit vs 64-bit Windows
  • config.h.in etc for size of void * etc.
  • Detecting Python linker flags
  • Building PyGTK etc for our version of Python
  • Packaging it all (will NSIS 32-bit be OK to use?)
  • Conversions between 'void *' and 'unsigned long' don't seem to work on Win64. Instead, Windows wants 'void *' to be cast to 'unsigned long long', since those pointers are the same size.

Cunit

  • use SVN trunk code
  • ./configure --prefix=/mingw --host=x86_64-w64-mingw32 --build=mingw32
  • make install

SUNDIAL

SUNDIALS is used by the IDA solver in ASCEND.

  • ./configure --host=x86_64-w64-mingw32 --prefix=/mingw
  • make -j4
  • make install

IPOPT

  • download the source tarball
  • ./configure --host=x86_64-w64-mingw32 --enable-shared --prefix=/mingw
  • make -j4
  • make install

GDB