compiling pyamg on 64-bit windows

118 views
Skip to first unread message

carlos

unread,
Nov 2, 2010, 1:25:37 PM11/2/10
to pyamg-user
Has anyone succeeded in compiling pyamg as a 64-bit windows binary?
Although I'm able to compile pyamg version 1.1.0.dev660 (for python
2.6) on a 32-bit Windows 7 system using mingw,
attempting this on a 64-bit windows system with mingw-64 gives swig-
related errors, eg:

build\temp.win-amd64-2.6\Release\amg_core\amg_core_wrap.o: In function
`SWIG_Python_SetModule':
N:/graphdata/pyamg-1.1.0.dev660/amg_core/amg_core_wrap.cxx:2498:
undefined reference to `_imp__Py_InitModule4_64'

Do I need to recompile swig for 64-bit (I haven't been able to locate
a pre-compiled 64-bit binary for swig)?
I also have access to 64-bit Visual Studio 2010 but that seems to
produce many link errors so is probably more difficult than using
mingw-64.
Thanks in advance for any info.

carlos

unread,
Nov 4, 2010, 1:28:31 PM11/4/10
to pyamg-user
I was able to compile a 64-bit windows redistributable of pyamg using
MS Visual C++, using the tips shown here

http://nukeit.org/compile-python-2-7-packages-with-visual-studio-2010-express/

http://mattptr.net/2010/07/28/building-python-extensions-in-a-modern-windows-environment/

I compiled this for python 2.6, so the line numbers for the edits
suggested at the above link for python 2.7 will be different.

I did manage to compile pyamg under python 2.7 but python then
crashed during pyamg.test.
In python 2.6, everything works OK.
I did use VC++ 10(2010), and there is some discussion on the above
pages on whether that's OK, as python expects VC++ 9(2008).

It would be easy enough to follow the directions at the second link
above to use VC 2008, but if you don't have Visual Studio 2008, you
must download a 2GB SDK iso.

In case it is of interest, the redistributable is posted at:

http://www.klamathconservation.org/CAT/pyamg-1.1.0.dev660.win-amd64-py2.6.exe

Jacob Schroder

unread,
Nov 4, 2010, 1:47:15 PM11/4/10
to pyamg...@googlegroups.com
Hi Carlos,

Thanks for the compiling tips.  Sometime soon, we plan on a new release, and will need to compile a 64 bit binary for Windows.

Jacob

--
You received this message because you are subscribed to the Google Groups "pyamg-user" group.
To post to this group, send email to pyamg...@googlegroups.com.
To unsubscribe from this group, send email to pyamg-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyamg-user?hl=en.


carlos

unread,
Nov 4, 2010, 4:24:21 PM11/4/10
to pyamg-user
I have since found that the comments from others posted below the
description of the procedure at:

http://nukeit.org/compile-python-2-7-packages-with-visual-studio-2010-express/

were correct, the resulting executable, based on VC++10, is not very
portable between systems.

The instructions at

http://mattptr.net/2010/07/28/building-python-extensions-in-a-modern-windows-environment/

which use VC++9, are better.


On Nov 4, 10:47 am, Jacob Schroder <jacob.b.schro...@gmail.com> wrote:
> Hi Carlos,
>
> Thanks for the compiling tips.  Sometime soon, we plan on a new release, and
> will need to compile a 64 bit binary for Windows.
>
> Jacob
>
> On Thu, Nov 4, 2010 at 11:28 AM, carlos <klamathconservat...@gmail.com>wrote:
>
>
>
>
>
>
>
> > I was able to compile a 64-bit windows redistributable of pyamg using
> > MS Visual C++, using the tips shown here
>
> >http://nukeit.org/compile-python-2-7-packages-with-visual-studio-2010...
>
> >http://mattptr.net/2010/07/28/building-python-extensions-in-a-modern-...
>
> > I compiled this for python 2.6, so the line numbers for the edits
> > suggested at the above link for python 2.7 will be different.
>
> > I did manage to compile pyamg under python 2.7  but python then
> > crashed during pyamg.test.
> > In python 2.6, everything works OK.
> > I did use VC++ 10(2010), and there is some discussion on the above
> > pages on whether that's OK, as python expects VC++ 9(2008).
>
> > It would be easy enough to follow the directions at the second link
> > above to use VC 2008, but if you don't have Visual Studio 2008, you
> > must download a 2GB SDK iso.
>
> > In case it is of interest, the redistributable is posted at:
>
> >http://www.klamathconservation.org/CAT/pyamg-1.1.0.dev660.win-amd64-p...
>
> > On Nov 2, 10:25 am, carlos <klamathconservat...@gmail.com> wrote:
> > > Has anyone succeeded in compiling pyamg as a 64-bit windows binary?
> > > Although I'm able to compile pyamg version 1.1.0.dev660 (for python
> > > 2.6) on a 32-bit Windows 7 system using mingw,
> > > attempting this on a 64-bit windows system with mingw-64 gives swig-
> > > related errors, eg:
>
> > > build\temp.win-amd64-2.6\Release\amg_core\amg_core_wrap.o: In function
> > > `SWIG_Python_SetModule':
> > > N:/graphdata/pyamg-1.1.0.dev660/amg_core/amg_core_wrap.cxx:2498:
> > > undefined reference to `_imp__Py_InitModule4_64'
>
> > > Do I need to recompile swig for 64-bit (I haven't been able to locate
> > > a pre-compiled 64-bit binary for swig)?
> > > I also have access to 64-bit Visual Studio 2010 but that seems to
> > > produce many link errors so is probably more difficult than using
> > > mingw-64.
> > > Thanks in advance for any info.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "pyamg-user" group.
> > To post to this group, send email to pyamg...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > pyamg-user+...@googlegroups.com<pyamg-user%2Bunsubscribe@googlegrou ps.com>
> > .
Reply all
Reply to author
Forward
0 new messages