[Pytrilinos-users] Problems with PyTrilinos and MinGW

Johannes Ring johannr at simula.no
Thu Nov 20 00:43:45 MST 2008


Hi William,

On Wed, November 19, 2008 23:29, Spotz, William F wrote:
> Johannes,
>
> I have not ported PyTrilinos to MinGW, and I can think of some issues that
> are going to come up even beyond the ones that you point out here, but I
> would be happy to work through trying to get PyTrilinos to build on MinGW
> if you are willing to work with me.

Great!

> The first thing we need to do is figure out why "python
> ../util/pkg_info.py -i TriUtils.i" on the swig-invocation line is not
> producing a complete set of include specs.  From
> BUILD/packages/PyTrilinos/src (where BUILD is your build directory) run
>
>     python ../util/pkg_info.py -i SRC/packages/PyTrilinos/src/TriUtils.i
>
> (where SRC is your source directory) and let me know what the output is.

Originally the output was

 -I\c\src\trilinos-8.0.8\packages\triutils\src

but this didn't work (because of the backslash) so I modified the print
statement in pkg_info.py (line 177) from

    print vars[name]

to

    print vars[name].replace('\\', '/')

Then I got this output:

 -I/c/src/trilinos-8.0.8/packages/triutils/src

This does work but something is obviously missing (like
-I/c/src/trilinos-8.0.8/packages/epetra/src).

Johannes

> -------------------
> I managed to bypass the configure step by doing some modifications in the
> packages/PyTrilinos/configure script. Running make results in several
> failures but with some modifications I managed to compile everything
> except the PyTrilinos module. When I run make in packages/PyTrilinos/src I
> get this:
>
> if /c/swigwin-1.3.35/swig -c++ -python -I../doc/Doxygen `python
> ../util/pkg_info.py -i TriUtils.i`  -DHAVE_TEUCHOS -DHAVE_EPETRA
> -DHAVE_AZTECOO_TEUCHOS  -outdir `python ../util/pkg_info.py -o TriUtils.i`
> -MMD -MF ".deps/TriUtils.Tpi" -o TriUtils_wrap.cpp TriUtils.i; then mv -f
> ".deps/TriUtils.Tpi" ".deps/TriUtils.Pi"; else rm -f ".deps/TriUtils.Tpi";
> exit 1; fi
> Epetra_Base.i(261): Error: Unable to find 'Epetra_Version.h'
> Epetra_Base.i(270): Error: Unable to find 'Epetra_CombineMode.h'
> Epetra_Base.i(275): Error: Unable to find 'Epetra_DataAccess.h'
> ...
>
> If I run
>
> swig -c++ -python -I../doc/Doxygen `python ../util/pkg_info.py -i
> TriUtils.i`  -DHAVE_TEUCHOS -DHAVE_EPETRA  -DHAVE_AZTECOO_TEUCHOS  -outdir
> `python ../util/pkg_info.py -o TriUtils.i
>
> manually I get the same error, but if I add `python ../util/pkg_info.py -i
> Epetra.i`, i.e.
>
> swig -c++ -python -I../doc/Doxygen `python ../util/pkg_info.py -i
> Epetra.i` `python ../util/pkg_info.py -i TriUtils.i`  -DHAVE_TEUCHOS
> -DHAVE_EPETRA  -DHAVE_AZTECOO_TEUCHOS  -outdir `python ../util/pkg_info.py
> -o TriUtils.i
>
> then it works but fails in the next step (running make again):
>
> if /c/swigwin-1.3.35/swig -c++ -python -I../doc/Doxygen `python
> ../util/pkg_info.py -i EpetraExt.i`  -DHAVE_TEUCHOS -DHAVE_EPETRA
> -DHAVE_AZTECOO_TEUCHOS  -outdir `python ../util/pkg_info.py -o
> EpetraExt.i` -MMD -MF ".deps/EpetraExt.Tpi" -o EpetraExt_wrap.cpp
> EpetraExt.i; then mv -f ".deps/EpetraExt.Tpi" ".deps/EpetraExt.Pi"; else
> rm -f ".deps/EpetraExt.Tpi"; exit 1; fi
> Teuchos.i(156): Error: Unable to find 'Teuchos_TypeNameTraits.hpp'
> Teuchos.i(157): Error: Unable to find 'Teuchos_RCPDecl.hpp'
> Teuchos_Traits.i(78): Error: Unable to find 'Teuchos_ScalarTraits.hpp'
> ...
>
> Any ideas on how to fix this?
>
> Johannes
>
> On Wed, November 19, 2008 10:18, Johannes Ring wrote:
> Hi all,
>
> I am trying to build PyTrilinos (on Windows with MinGW and MSYS but it
> fails to find Python.h when running configure (see error message below).
> The file Python.h is available under C:\Python25\include but it seems that
> the configure script is looking under c:\Python25/include/python2.5 which
> does not exists. I have tried to add -I/c/Python25/include to CPPFLAGS but
> this does not seem to make any difference. I am using Trilinos 8.0.8. Any
> ideas?
>
> Best regards,
>
> Johannes Ring
>
> === configuring in packages/PyTrilinos
> (/c/src/trilinos-8.0.8/packages/PyTrilinos)
> configure: running /bin/sh ./configure
> '--prefix=/c/src/trilinos-8.0.8/local'  '--enable-default-packages'
> '--enable-galeri' '--enable-ml' '--enable-epetra' '--enable-amesos'
> '--enable-python' '--enable-pytrilinos' '--disable-export-makefiles'
> '--disable-examples' '--disable-tests'
> '--with-blas=/c/src/lapack-3.1.1/blas.dll'
> '--with-lapack=/c/src/lapack-3.1.1/lapack.dll' '--with-trilinos'
> '--enable-teuchos' '--enable-triutils' '--enable-ifpack'
> '--enable-aztecoo' '--enable-epetraext' '--enable-nox'
> '--enable-new_package' '--enable-shared' --cache-file=/dev/null --srcdir=.
> -----------------------------------
> Running PyTrilinos Configure Script
> -----------------------------------
> checking whether to use default-packages... yes
> checking whether to build optional teuchos dependent code in pytrilinos...
> yes
> checking whether to build optional epetra dependent code in pytrilinos...
> yes
> checking whether to build optional triutils dependent code in
> pytrilinos... yes
> checking whether to build optional epetraext dependent code in
> pytrilinos... yes
> checking whether to use epetraext-hdf5... no
> checking whether to build optional aztecoo dependent code in pytrilinos...
> yes
> checking whether to use aztecoo-teuchos... yes
> checking whether to build optional galeri dependent code in pytrilinos...
> yes
> checking whether to build optional amesos dependent code in pytrilinos...
> yes
> checking whether to build optional ifpack dependent code in pytrilinos...
> yes
> checking whether to build optional anasazi dependent code in pytrilinos...
> no
> checking whether to build optional ml dependent code in pytrilinos... yes
> checking whether to build optional nox dependent code in pytrilinos... yes
> checking whether to use nox-epetra... no
> checking whether to build optional rtop dependent code in pytrilinos... no
> checking whether to build optional kokkos dependent code in pytrilinos...
> no
> checking whether to build optional tpetra dependent code in pytrilinos...
> no
> checking whether to build optional thyra dependent code in pytrilinos...
> no
> checking whether to build optional isorropia dependent code in
> pytrilinos... no
> checking whether to build optional komplex dependent code in pytrilinos...
> no
> checking whether to build optional claps dependent code in pytrilinos...
> no
> checking whether to build optional belos dependent code in pytrilinos...
> no
> checking whether to build optional moertel dependent code in pytrilinos...
> no
> checking whether to build optional stratimikos dependent code in
> pytrilinos... no
> checking whether to build optional meros dependent code in pytrilinos...
> no
> checking whether to build optional sacado dependent code in pytrilinos...
> no
> checking whether to build optional loca dependent code in pytrilinos... no
> checking whether to build optional rythmos dependent code in pytrilinos...
> no
> checking whether to build optional moocho dependent code in pytrilinos...
> no
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking build system type... i686-pc-mingw32
> checking host system type... i686-pc-mingw32
> checking target system type... i686-pc-mingw32
> checking for a BSD-compatible install... /bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking how to create a ustar tar archive... none
> checking whether we are using MPI... no
> checking for style of include used by make... GNU
> checking for C++ compiler default output file name... a.exe
> checking whether the C++ compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... .exe
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++-sjlj accepts -g... yes
> checking dependency style of g++-sjlj... gcc3
> checking how to run the C++ preprocessor... g++-sjlj -E
> checking whether additional library search paths defined... no
> checking whether additional include search paths defined... no
> checking for --enable-python... yes
> checking for python... /c/Python25/python
> checking for python... (cached) /c/Python25/python
> checking whether /c/Python25/python version >= 2.3 ... yes
> checking whether to use tests... no
> checking whether to use pytrilinos-tests... yes
> checking whether to use examples... no
> checking whether to use pytrilinos-examples... yes
> checking whether to use pytrilinos... yes
> configure: PYTHON_CSPEC=None -Ic:\Python25/include/python2.5
> Traceback (most recent call last):
>  File "conftest.py", line 8, in <module>
>    if -1 ==  strConfigArgs.find(strUseFrameWork):
> AttributeError: 'NoneType' object has no attribute 'find'
> configure: PYTHON_LSPEC=
> checking for grep that handles long lines and -e... /bin/grep
> checking for egrep... /bin/grep -E
> checking for ANSI C header files... no
> checking for sys/types.h... no
> checking for sys/stat.h... no
> checking for stdlib.h... no
> checking for string.h... no
> checking for memory.h... no
> checking for strings.h... no
> checking for inttypes.h... no
> checking for stdint.h... no
> checking for unistd.h... no
> checking Python.h usability... no
> checking Python.h presence... no
> checking for Python.h... no
> configure: error: You must have Python.h in order to build the Python
> support!!
> configure: error: ./configure failed for packages/PyTrilinos
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users
>
>
> Bill Spotz
> Program Manager
> Office of Science, Advanced Scientific Computing Research
> US DOE, SC-21.1/GTN BLDG
> 1000 Independence Avenue, SW
> Washington, DC 20585-1290
> (301) 903-8268 / (301) 903-7774 (f) / wfspotz at ascr.doe.gov
>
>






More information about the Pytrilinos-users mailing list