[Trilinos-Users] FW: [EXTERNAL] Failed to compile Teuchos_CommandLineProcessor.cpp on MinGW-w64 x86_64

Phipps, Eric T etphipp at sandia.gov
Wed Feb 25 08:48:50 MST 2015


Forwarding to trilinos-users, trilinos-devlopers.  I don’t understand why Trilinos_EXTRA_LINK_FLAGS didn’t work.  Does anyone else have any ideas?

-Eric

From: Ryuta Suzuki <ryuuta at gmail.com<mailto:ryuuta at gmail.com>>
Date: Monday, February 23, 2015 at 6:13 PM
To: Eric Phipps <etphipp at sandia.gov<mailto:etphipp at sandia.gov>>
Subject: Re: [Trilinos-Users] [EXTERNAL] Failed to compile Teuchos_CommandLineProcessor.cpp on MinGW-w64 x86_64

Hi,

Trilinos_EXTRA_LINK_FLAGS doesn't add the extra library at link time:

cd /D/msys64/home/20089/packages/trilinos/src/build/packages/teuchos/parameterlist/src && /D/msys64/mingw64/bin/g++.exe     -march=x86-64 -mtune=generic  -pipe  -O3  -pipe -shared -o libteuchosparameterlist.dll -Wl,--out-implib,libteuchosparameterlist.dll.a -Wl,--major-image-version,11,--minor-image-version,12 -Wl,--whole-archive CMakeFiles/teuchosparameterlist.dir/objects.a -Wl,--no-whole-archive ../../core/src/libteuchoscore.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
CMakeFiles/teuchosparameterlist.dir/objects.a(Teuchos_XMLPerfTestArchive.cpp.obj):Teuchos_XMLPerfTestArchive.cpp:(.text+0xf3d): undefined reference to `__imp_gethostname'
collect2.exe: error: ld returned 1 exit status
packages/teuchos/parameterlist/src/CMakeFiles/teuchosparameterlist.dir/build.make:1185: recipe for target 'packages/teuchos/parameterlist/src/libteuchosparameterlist.dll' failed

I was digging the configurations generated by cmake and found

./packages/teuchos/parameterlist/CMakeFile/TeuchosParameterListConfig_install.cmake
./packages/teuchos/parameterlist/TeuchosParameterListConfig.cmake

have

SET(TeuchosParameterList_EXTRA_LD_FLAGS "-lws2_32")

but TeuchosParameterList_EXTRA_LD_FLAGS is _not_ referenced by any makefile at all,
which explains the link failure. Can I manually inject ws2_32 library to the build process?

Thanks,

Ryuta



On Tue, Feb 17, 2015 at 12:42 AM, Phipps, Eric T <etphipp at sandia.gov<mailto:etphipp at sandia.gov>> wrote:
Try adding this to your configure:

-D Trilinos_EXTRA_LINK_FLAGS="-lws2_32"

-Eric

From:  Ryuta Suzuki <ryuuta at gmail.com<mailto:ryuuta at gmail.com>>
Date:  Sunday, February 15, 2015 at 9:23 PM
To:  "Bradley, Andrew Michael" <ambradl at sandia.gov<mailto:ambradl at sandia.gov>>,
"trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>" <trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>>
Subject:  Re: [Trilinos-Users] [EXTERNAL] Failed to compile
Teuchos_CommandLineProcessor.cpp on MinGW-w64 x86_64


Hi Andrew,


You did it. I tried your first suggestion

-D Teuchos_ENABLE_LONG_LONG_INT:BOOL=ON


and it worked. Now I'm able to compile the particular file, but
unfortunately it ended up with link error which is yet another story...


FAILED: cmd.exe /C "cd . && D:\msys64\mingw64\bin\g++.exe   -march=x86-64
-mtune=generic  -pipe  -O3  -pipe -shared -o
packages/teuchos/parameterlist/src/libteuchosparameterlist.dll
-Wl,--out-implib,packages\teuchos\parameterlist\src\libteuchosparameterlist
.dll.a
 -Wl,--major-image-version,11,--minor-image-version,12  ...<bunch of
.cpp.obj>...
  packages/teuchos/core/src/libteuchoscore.dll.a -lkernel32 -luser32
-lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32
-ladvapi32 && cd ."
packages/teuchos/parameterlist/src/CMakeFiles/teuchosparameterlist.dir/Teuc
hos_XMLPerfTestArchive.cpp.obj:Teuchos_XMLPerfTestArchive.cpp:(.text+0xf3d)
: undefined reference to `__imp_gethostname'
collect2.exe: error: ld returned 1 exit status


I checked stackoverflow and it say we need -lws2_32.
I thought CMake would take care of this but I must be wrong.
I can hack the relevant CMakeLists.txt but I'd rather prefer minimally
invasive solution.

Any thoughts?


Regards,

Ryuta




On Mon, Feb 16, 2015 at 12:21 PM, Ryuta Suzuki
<ryuuta at gmail.com<mailto:ryuuta at gmail.com>> wrote:

Hi Andrew,

Got it. I'll give them shot. Thanks for your assistance.

Regards,

Ryuta

On Mon, Feb 16, 2015 at 10:29 AM Bradley, Andrew Michael
<ambradl at sandia.gov<mailto:ambradl at sandia.gov>> wrote:

Hi Ryuta,

I think there's some history to this issue. There's probably less than a
50% chance I can solve this in one email, but let's see if I can get us
started. I will likely have to ask for help from some of the build
experts. I don't have access to Windows, so
 I can't try the following ideas first; sorry.


The issue has to do with something like:

    typedef unsigned long long int size_t
on Windows.


The first thing to try, on the super off chance that the "unsigned" part
is somehow not significant, is this flag:
    -D Teuchos_ENABLE_LONG_LONG_INT:BOOL=ON

When that fails, try this:
    -D CMAKE_CXX_FLAGS:STRING="-DHAVE_TEUCHOS___INT64"

After that, I'll have to consult with some experts.


Cheers,
Andrew


________________________________________
From:trilinos-users-bounces at software.sandia.gov<mailto:From%3Atrilinos-users-bounces at software.sandia.gov>
<trilinos-users-bounces at software.sandia.gov<mailto:trilinos-users-bounces at software.sandia.gov>>
 on behalf of Ryuta Suzuki <ryuuta at gmail.com<mailto:ryuuta at gmail.com>>
Sent: Sunday, February 15, 2015 5:51 PM
To: trilinos-users at software.sandia.gov<mailto:trilinos-users at software.sandia.gov>
Subject: [EXTERNAL] [Trilinos-Users] Failed to compile
Teuchos_CommandLineProcessor.cpp on MinGW-w64 x86_64



Hi,


I've got the following compiler error while building Teuchos:


FAILED: D:\msys64\mingw64\bin\g++.exe   -DTEUCHOSCORE_LIB_EXPORTS_MODE
-Dteuchoscore_EXPORTS -march=x86-64 -mtune=generic  -pipe  -O3 -I.
-Ipackages/teuchos/core/src
-ID:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packag
es/teuchos/core/src
 -MMD -MT
packages/teuchos/core/src/CMakeFiles/teuchoscore.dir/Teuchos_CommandLinePro
cessor.cpp.obj -MF
packages/teuchos/core/src/CMakeFiles/teuchoscore.dir/Teuchos_CommandLinePro
cessor.cpp.obj.d
 -o
packages/teuchos/core/src/CMakeFiles/teuchoscore.dir/Teuchos_CommandLinePro
cessor.cpp.obj -c
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp: In instantiation of 'static OutType
Teuchos::ValueTypeConversionTraits<OutType, std::basic_string<char>
 >::convert(const string&) [with OutType = long long unsigned int;
std::string = std::basic_string<char>]':
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:608:22:   required from 'static OutType
Teuchos::ValueTypeConversionTraits<OutType, std::basic_string<char>
 >::safeConvert(const string&) [with OutType = long long unsigned int;
std::string = std::basic_string<char>]'
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:2833:67:   required from 'TypeTo
Teuchos::asSafe(const TypeFrom&) [with TypeTo = long long unsigned int;
TypeFrom
 = std::basic_string<char>]'
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:334:81:   required from
here
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: error: no match for 'operator>>'
(operand types are 'const string {aka const std::basic_string<char>}'
 and 'long long unsigned int')
     t >> out;
       ^
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note: candidates are:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_VerbosityLevel.hpp:52:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_VerboseObject.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:48:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_iostream_helpers.hpp:72:15: note: std::istream&
Teuchos::operator>>(std::istream&, Teuchos::EVerbosityLevel&)
 std::istream& operator>>(std::istream& std_is, ENUMTYPE& enum_value) \
               ^
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_VerbosityLevel.hpp:73:1: note: in expansion of
macro 'TEUCHOS_ENUM_INPUT_STREAM_OPERATOR'
 TEUCHOS_ENUM_INPUT_STREAM_OPERATOR(EVerbosityLevel)
 ^
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_iostream_helpers.hpp:72:15: note:   no known
conversion for argument 1 from 'const string {aka const
 std::basic_string<char>}' to 'std::istream& {aka
std::basic_istream<char>&}'
 std::istream& operator>>(std::istream& std_is, ENUMTYPE& enum_value) \
               ^
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_VerbosityLevel.hpp:73:1: note: in expansion of
macro 'TEUCHOS_ENUM_INPUT_STREAM_OPERATOR'
 TEUCHOS_ENUM_INPUT_STREAM_OPERATOR(EVerbosityLevel)
 ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:93:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/complex:488:5: note: template<class
_Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, std::complex<_Tp>&)
     operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
     ^
D:/msys64/mingw64/include/c++/4.9.2/complex:488:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:88:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/iomanip:230:5: note: template<class
_CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setw)
     operator>>(basic_istream<_CharT, _Traits>& __is, _Setw __f)
     ^
D:/msys64/mingw64/include/c++/4.9.2/iomanip:230:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:88:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/iomanip:200:5: note: template<class
_CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setprecision)
     operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
     ^
D:/msys64/mingw64/include/c++/4.9.2/iomanip:200:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:88:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/iomanip:170:5: note: template<class
_CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&,
std::_Setfill<_CharT>)
     operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
     ^
D:/msys64/mingw64/include/c++/4.9.2/iomanip:170:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:88:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/iomanip:132:5: note: template<class
_CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setbase)
     operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
     ^
D:/msys64/mingw64/include/c++/4.9.2/iomanip:132:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:88:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/iomanip:101:5: note: template<class
_CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setiosflags)
     operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
     ^
D:/msys64/mingw64/include/c++/4.9.2/iomanip:101:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:88:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/iomanip:71:5: note: template<class
_CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Resetiosflags)
     operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
     ^
D:/msys64/mingw64/include/c++/4.9.2/iomanip:71:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/iostream:40:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:87,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/istream:779:5: note: template<class
_Traits> std::basic_istream<char, _Traits>&
std::operator>>(std::basic_istream<char, _Traits>&, signed char*)
     operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
     ^
D:/msys64/mingw64/include/c++/4.9.2/istream:779:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<char, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/iostream:40:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:87,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/istream:774:5: note: template<class
_Traits> std::basic_istream<char, _Traits>&
std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)
     operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
     ^
D:/msys64/mingw64/include/c++/4.9.2/istream:774:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<char, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/iostream:40:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:87,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/istream:732:5: note: template<class
_Traits> std::basic_istream<char, _Traits>&
std::operator>>(std::basic_istream<char, _Traits>&, signed char&)
     operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
     ^
D:/msys64/mingw64/include/c++/4.9.2/istream:732:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<char, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/iostream:40:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:87,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/istream:727:5: note: template<class
_Traits> std::basic_istream<char, _Traits>&
std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)
     operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
     ^
D:/msys64/mingw64/include/c++/4.9.2/istream:727:5: note:   template
argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<char, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/istream:879:0,
                 from D:/msys64/mingw64/include/c++/4.9.2/iostream:40,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:87,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/bits/istream.tcc:923:5: note:
template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)
     operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
     ^
D:/msys64/mingw64/include/c++/4.9.2/bits/istream.tcc:923:5: note:
template argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/istream:879:0,
                 from D:/msys64/mingw64/include/c++/4.9.2/iostream:40,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:87,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/bits/istream.tcc:955:5: note:
template<class _CharT2, class _Traits2> std::basic_istream<_CharT,
_Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT2*)
     operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
     ^
D:/msys64/mingw64/include/c++/4.9.2/bits/istream.tcc:955:5: note:
template argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^
In file included from D:/msys64/mingw64/include/c++/4.9.2/string:53:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ConfigDefs.hpp:84,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_map.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.hpp:53,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:46:
D:/msys64/mingw64/include/c++/4.9.2/bits/basic_string.tcc:996:5: note:
template<class _CharT, class _Traits, class _Alloc>
std::basic_istream<_CharT, _Traits>&
std::operator>>(std::basic_istream<_CharT, _Traits>&,
std::basic_string<_CharT,
 _Traits, _Alloc>&)
     operator>>(basic_istream<_CharT, _Traits>& __in,
     ^
D:/msys64/mingw64/include/c++/4.9.2/bits/basic_string.tcc:996:5: note:
template argument deduction/substitution failed:
In file included from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayRCP.hpp:50:0,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_ArrayView.hpp:47,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_GlobalMPISession.hpp:49,
                 from
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_CommandLineProcessor.cpp:47:
D:/msys64/home/20089/packages/trilinos/src/trilinos-11.12.1-Source/packages
/teuchos/core/src/Teuchos_as.hpp:614:7: note:   types
'std::basic_istream<_CharT, _Traits>' and 'const string {aka const
std::basic_string<char>}'
 have incompatible cv-qualifiers
     t >> out;
       ^


platform: mingw-w64 msys2

compiler: gcc/libstdc++ 4.9.2


Here's how I build Trilinos,

  cmake -G "Ninja" \
    -DCMAKE_INSTALL_PREFIX:PATH=/mingw64 \
    -DCMAKE_BUILD_TYPE:STRING="Release" \
    -DCMAKE_C_COMPILER:FILEPATH=/mingw64/bin/gcc.exe \
    -DCMAKE_CXX_COMPILER:FILEPATH=/mingw64/bin/g++.exe \
    -DCMAKE_LINKER:FILEPATH=/mingw64/bin/ld.exe \
    -DBUILD_SHARED_LIBS:BOOL=ON \
    -DBLAS_LIBRARY_DIRS:PATH=/mingw64/lib \
    -DTrilinos_INSTALL_INCLUDE_DIR:PATH=include/trilinos \
    -DTrilinos_ASSERT_MISSING_PACKAGES:BOOL=OFF \
    -DTrilinos_ENABLE_Fortran:STRING=OFF \
    -DTrilinos_ENABLE_Amesos:STRING=ON \
    -DTrilinos_ENABLE_AztecOO:STRING=ON \
    -DTrilinos_ENABLE_Belos:STRING=ON \
    -DTrilinos_ENABLE_EpetraExt:STRING=ON \
    -DEpetraExt_BUILD_BTF:BOOL=ON \
    -DEpetraExt_BUILD_EXPERIMENTAL:BOOL=ON \
    -DEpetraExt_BUILD_GRAPH_REORDERINGS:BOOL=ON \
    -DTrilinos_ENABLE_Ifpack:STRING=ON \
    -DTrilinos_ENABLE_NOX:STRING=ON \
    -DNOX_ENABLE_LOCA:BOOL=ON \
    -DTrilinos_ENABLE_Sacado:STRING=ON \
    -DTrilinos_ENABLE_Teuchos:STRING=ON \
    -DTeuchos_ENABLE_COMPLEX:BOOL=ON \
    -DTeuchos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON \
    -DTrilinos_ENABLE_TrilinosCouplings:STRING=ON \
    -DTPL_ENABLE_AMD:STRING=ON \
    -DTPL_ENABLE_Cholmod:STRING=ON \

-DCholmod_LIBRARY_NAMES:STRING="libcholmod.dll.a;libamd.dll.a;libcolamd.dll
.a;libsuitesparseconfig.dll.a" \
    -DTPL_ENABLE_UMFPACK:STRING=ON \
    -DTPL_FIND_SHARED_LIBS:BOOL=ON \
  ../trilinos-${pkgver}-Source

  ninja

I'm not sure whethter this is MinGW-w64-specific issue or not. Any help
will be greatly appreciated. Thanks!


Regards,


Ryuta Suzuki

















-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://software.sandia.gov/pipermail/trilinos-users/attachments/20150225/a8b8c7e2/attachment-0001.html>


More information about the Trilinos-Users mailing list