installation under windows with mingw

105 views
Skip to first unread message

bartek s

unread,
Oct 7, 2013, 5:07:02 PM10/7/13
to dea...@googlegroups.com
hello everyone.

i'm unfortunately not familiar with compiling programs using cmake or anything like that, and this time i need assistance...
i downloaded deal.ii version 8.0.0, i have cmake version 2.8.11.2, gnuwin32 version 3.81, and latest mingw version on board.

i have used gui version of the cmake and eventually i managed to configure and generate the makefile with such report:


This is CMake 2.8.11.2


Set up default compiler flags.

Include C:/downloadfolder/deal.II/cmake/checks/check_01_compiler_features.cmake

Include C:/downloadfolder/deal.II/cmake/checks/check_01_cpu_features.cmake
No suitable C compiler was found! Assuming little endian platform.

Include C:/downloadfolder/deal.II/cmake/checks/check_01_cxx_features.cmake
Insufficient C++11 support. Disabling -std=c++11.

Include C:/downloadfolder/deal.II/cmake/checks/check_02_system_features.cmake
CMake Warning at cmake/checks/check_02_system_features.cmake:121 (MESSAGE):
 

  BUILD_SHARED_LIBS forced to OFF

 

Call Stack (most recent call first):
  CMakeLists.txt:93 (INCLUDE)



Include C:/downloadfolder/deal.II/cmake/checks/check_03_compiler_bugs.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_1_lapack.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_1_mpi.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_1_threads.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_1_umfpack.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_2_metis.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_2_petsc.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_2_trilinos.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_arpack.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_boost.cmake
Could NOT find Boost
Could NOT find Boost
DEAL_II_WITH_BOOST has unmet external dependencies.
DEAL_II_WITH_BOOST successfully set up with bundled packages.

Include C:/downloadfolder/deal.II/cmake/configure/configure_functionparser.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_hdf5.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_mumps.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_netcdf.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_p4est.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_slepc.cmake

Include C:/downloadfolder/deal.II/cmake/configure/configure_zlib.cmake

Configuring done. Proceed to target definitions now.
Could NOT find Perl (missing:  PERL_EXECUTABLE)
###
#
#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      OFF
#        CMAKE_INSTALL_PREFIX:   C:/deal.II
#        CMAKE_SOURCE_DIR:       C:/downloadfolder/deal.II (Version 8.0.0)
#        CMAKE_BINARY_DIR:       C:/deal.II
#        CMAKE_CXX_COMPILER:     GNU 4.8.1 on platform Windows AMD64
#                                c:/MinGW/bin/g++.exe
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#      ( DEAL_II_WITH_64BIT_INDICES = OFF )
#      ( DEAL_II_WITH_ARPACK = OFF )
#        DEAL_II_WITH_BOOST set up with bundled packages
#      ( DEAL_II_WITH_FUNCTIONPARSER = OFF )
#      ( DEAL_II_WITH_HDF5 = OFF )
#      ( DEAL_II_WITH_LAPACK = OFF )
#      ( DEAL_II_WITH_METIS = OFF )
#      ( DEAL_II_WITH_MPI = OFF )
#      ( DEAL_II_WITH_MUMPS = OFF )
#      ( DEAL_II_WITH_NETCDF = OFF )
#      ( DEAL_II_WITH_P4EST = OFF )
#      ( DEAL_II_WITH_PETSC = OFF )
#      ( DEAL_II_WITH_SLEPC = OFF )
#      ( DEAL_II_WITH_THREADS = OFF )
#      ( DEAL_II_WITH_TRILINOS = OFF )
#      ( DEAL_II_WITH_UMFPACK = OFF )
#      ( DEAL_II_WITH_ZLIB = OFF )
#
#  Component configuration:
#        DEAL_II_COMPONENT_COMPAT_FILES
#      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
#        DEAL_II_COMPONENT_EXAMPLES
#        DEAL_II_COMPONENT_MESH_CONVERTER
#      ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )
#
# Detailed information (compiler flags, feature configuration) can be found in detailed.log
#
###
Configuring done
Generating done

according to this https://groups.google.com/forum/#!msg/dealii/diTD7LBEUCU/oxcDMYXjwXMJ post i left all options unmarked.
however, during execution of the c:\destination\make command i get tons of warnings of type "(...)/base/utilities.h:350:29: warning: ISO C++  1998 does not support 'long long' [-Wlong-long] std::vector<unsigned long long int>
but what worry me more are errors such like:
-(...) c:\downloadfolder\deal.ii\include\deal.ii\base\geometry_info.h:2174:: error: size of array is not an integral constant-expression alternating_form_at_vertices - this one happens at 51% when there is 'building cxx object source/grid/cmakefiles/obj_grid.release.dir/grid_tools.cc.obj
-(...)  c:\downloadfolder\deal.ii\include\deal.ii\grid\tria_objects.h:274:7: error: could not convert template argument 'dealii::internal::triangulation::tria)bject<1>::dimension' to 'int' next_free_pair_object(const dealii::traingulation<dim,spacedim> &tria); - this one from tria.cc.obj, but same error happens in different parts too
i tried to run the make command with -k paramter, which allows for ending the process, but it just differ that i know a few more places where the error occurs...

what am i doing wrong? (apart from using deal.ii on windows), ah, maybe something noteworthy - i want deal.ii to operate with dev-cpp with mingw compiler and i do not want to take linux into consideration.

thanks in advance

bruno.t...@gmail.com

unread,
Oct 7, 2013, 5:31:52 PM10/7/13
to dea...@googlegroups.com
Hi,

You get this error :

-(...) c:\downloadfolder\deal.ii\
include\deal.ii\base\geometry_info.h:2174:: error: size of array is not an integral constant-expression alternating_form_at_vertices - this one happens at 51% when there is 'building cxx object source/grid/cmakefiles/obj_grid.release.dir/grid_tools.cc.obj

because you are using a wrong version of gcc. See: https://groups.google.com/forum/#!searchin/dealii/gcc$204.8.1/dealii/vkuJhsPHbqI/96NMBwZgvQIJ Try using gcc 4.7

You should also look at this: https://groups.google.com/forum/#!searchin/dealii/jeff/dealii/pSsR7tafKK0/BDNmYcCUp9MJ In this thread, we were able to get deal.ii to compile and almost link with mingw. The problem at the end came from mingw. I think using another variant of mingw for example tdm-mingw would be a good idea. 

Best,

Bruno

Timo Heister

unread,
Oct 7, 2013, 5:54:38 PM10/7/13
to dea...@googlegroups.com
Also please read:
http://code.google.com/p/dealii/wiki/FrequentlyAskedQuestions#Can_I_use_deal.II_on_a_Windows_platform?
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Timo Heister
http://www.math.clemson.edu/~heister/

bartek s

unread,
Oct 11, 2013, 4:55:30 AM10/11/13
to dea...@googlegroups.com
thank you all for reply.

unfortunately all your suggestions haven't improve my situation so i tried the cygwin approach.the compilation was succesfull and i end up with 4 files:
cygdeal_II.g-8.0.0.dll
cygdeal_II-8.0.0.dll
libdeal_II.dll.a
libdeal_II.g.dll.a
can anyone clarify which file is needed for what?

also, i'm trying to include <deal.II/grid/tria.h> to an existing project and i'm getting strange error. it says that std::function has not been declared in \deal.II\base\std_cxx1x\function.h somewhere around this code:
#  include <functional>
DEAL_II_NAMESPACE_OPEN
namespace std_cxx1x
{
  using std::function;
}
DEAL_II_NAMESPACE_CLOSE

the strange part for me is that the std::function seems to be a part of standard c++ language, though i can't find functional.h in my standard include directory. i'm using wxdev-cpp with mingw compiler ( i believe it's version 4.5, but no certainty there), also didn't find this header file in newer mingw installation.

i would appreciate ay assistance with this matter.

Matthias Maier

unread,
Oct 11, 2013, 5:32:11 AM10/11/13
to dea...@googlegroups.com

Just to clarify, you're using deal.II 8.0?

Am 11. Oct 2013, 10:55 schrieb bartek s <boinc...@gmail.com>:

> thank you all for reply.
>
> unfortunately all your suggestions haven't improve my situation so i
> tried the cygwin approach.the compilation was succesfull and i end up
> with 4 files:

The debug version of the library:

> cygdeal_II.g-8.0.0.dll
> libdeal_II.g.dll.a

The optimized version of the library:

> libdeal_II.dll.a
> cygdeal_II-8.0.0.dll

where the file ending in ".dll" is the runtime part (that gets
dynamically linked to your executable on startup) and the ".dll.a" part
is the import library necessary to statically link your object files
against.

> also, i'm trying to include <deal.II/grid/tria.h> to an existing
> project and i'm getting strange error. it says that std::function has
> not been declared in \deal.II\base\std_cxx1x\function.h somewhere
> around this code:

If you use deal.II 8.0, can you please post the file detailed.log found
in your build directory.

Furthermore, how do you try to include deal.II into your existing
project? By hand?

You might try to disable C++11 support when configuring and compiling
deal.II.

Best,
Matthias

Wolfgang Bangerth

unread,
Dec 20, 2013, 6:01:30 PM12/20/13
to dea...@googlegroups.com

> also, i'm trying to include <deal.II/grid/tria.h> to an existing project and
> i'm getting strange error. it says that std::function has not been declared in
> \deal.II\base\std_cxx1x\function.h somewhere around this code:
> # include <functional>
> DEAL_II_NAMESPACE_OPEN
> namespace std_cxx1x
> {
> using std::function;
> }
> DEAL_II_NAMESPACE_CLOSE
>
> the strange part for me is that the std::function seems to be a part of
> standard c++ language, though i can't find functional.h in my standard include
> directory. i'm using wxdev-cpp with mingw compiler ( i believe it's version
> 4.5, but no certainty there), also didn't find this header file in newer mingw
> installation.
>
> i would appreciate ay assistance with this matter.

Bartek -- this is an old thread, but in case you haven't (i) given up yet,
(ii) found the solution already:

When you compile programs with deal.II, you can't just #include the deal.II
header files. You also need to set appropriate compiler flags. In your case,
you compiled deal.II without C++11 support, but you compile your own program
with it. This isn't going to work.

We usually make sure user programs can be linked with deal.II by not writing
our own Makefiles for our own projects. Rather, take a look at how the
tutorial works. For example, in your installation directory, you can go into
examples/step-1 and do
cmake .
This creates a Makefile for you that makes sure the include paths are
correctly set, compiler flags are correctly set, the correct libraries are
linked with, etc.

I hope this makes more sense to you now!
Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages