[Ipopt] Cannot build Ipopt on Windows with MSVC

Chuan Liu chuanliu1992 at gmail.com
Wed Aug 31 06:36:32 EDT 2016


Hi,
Here is the thing.
If in Cygwin.bat, I add following line:

call
> D:\ProgrammingTools\IntelSWTools\compilers_and_libraries_2016.3.207\windows\bin\ifortvars.bat
> -arch ia32_intel64 vs2013 -platform linux

then Cygwin cannot find ifort command.

If in I add following line instead:

call
> D:\ProgrammingTools\IntelSWTools\compilers_and_libraries_2016.3.207\windows\bin\ifortvars.bat
> -arch intel64 vs2013 -platform linux

then Cygwin can find ifort command, but when configure, there are other
errors saying:

> $ ./configure -enable-doscompile=msvc
> checking build system type... x86_64-unknown-cygwin
> checking whether we want to compile in debug mode... no
> checking for icl... icl
> checking for C compiler default output file name... configure: error: C
> compiler cannot create executables
> See `config.log' for more details.

The full log is in the attachment.

As for the flag -platform, the manual says it has only 2 choices: "linux"
or "android". So, I think android mustn't be the right one, I choose linux.
You can refer to this about ifortvars.bat:

> ifortvars.bat [-arch] <arch> [vs] [-platform <platform>]
>    <arch> must be is one of the following
>        ia32         : Set up for IA-32 host and target
>        ia32_intel64 : Set up for IA-32 host and Intel(R)64 target
>        intel64      : Set up for Intel(R) 64 host and target
>    If specified, <vs> must be one of the following
>        vs2010      : Set to use Microsoft Visual Studio 2010
>        vs2010shell : Set to use Microsoft Visual Studio Shell 2010
>        vs2012      : Set to use Microsoft Visual Studio 2012
>        vs2013      : Set to use Microsoft Visual Studio 2013
>        vs2013shell : Set to use Microsoft Visual Studio Shell 2013
>        vs2015      : Set to use Microsoft Visual Studio 2015
>    If <vs> is not specified, the version of Visual Studio detected at
> install
>    time is used.
>    <platform> must be of the following.
>        linux          : Set to Linux target.
>        android        : Set to Android target.


Can you figure out what is wrong?

2016-08-31 17:21 GMT+08:00 Stefan Vigerske <stefan at math.hu-berlin.de>:

> Hi,
>
> it seems that configure failed to recognize your Fortran compiler:
>
> configure: Trying to determine Fortran compiler name
> checking for ifort... no
> checking for fl32... no
> checking for compile_f2c... no
> configure: WARNING: Failed to find a Fortran compiler!
>
>
> Without a Fortran compiler, it will not build ThirdParty/Blas. Therefore,
> the configure in the Ipopt subdirectory didn't "find" Blas (i.e., recognize
> that "coinblas" will be build):
>
> checking for COIN-OR package Blas... skipped check via pkg-config,
> redirect to fallback
> checking for COIN-OR package Blas (fallback)... no, dependency coinblas
> not available
>
> I don't recall at the moment what all the flags to ifortvars.bat mean, but
> are you sure that "-platform linux" is correct.
> After you started cygwin and the MSVC/Intel batch files went through, the
> ifort executable should be in your path.
>
> Stefan
>
> PS: The installation instructions in the Ipopt manual might be a bit
> outdated. Could be that one now should use --enable-msvc instead of
> --enable-doscompile=msvc. But without GCC in the path, it may also work
> without any options to configure.
>
> On 08/31/2016 09:14 AM, Chuan Liu wrote:
>
>> I'm trying to insatll Ipopt on windows with msvc according to
>> Installation with Cygwin using the MSVC++ compiler
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.
>> coin-2Dor.org_Ipopt_documentation_node15.html&d=CwMFaQ&c=
>> Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU2
>> 9t80hk2rsLc4vrlRySBDabuq0O1ZI&m=em6m_GUccwZUZByhfCden-
>> naEun0lMba_AC7kGj5sgQ&s=rFRz_F29buKnHVMcXUqg7G3YFeH4jfMhB-z9FfO-HNA&e=>.
>> I followed the instructions first install Cygwin with necessary
>> components, and download the external codes including:
>>
>>   * downloading BLAS, LAPACK, ASL, Mumps and Metis with "./get.BLAS",
>>     "./get.LAPACK", "./get.ASL", "./get.Mumps" and "./get.Metis".
>>   * downloading HSL source /coinhsl-2014.01.10.zip
>>     /from http://hsl.rl.ac.uk/ipopt
>>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__hsl.rl.
>> ac.uk_ipopt&d=CwMFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA
>> _2Wlc4&r=BRcuJnQr5NAzU29t80hk2rsLc4vrlRySBDabuq0O1ZI&m=em6m_
>> GUccwZUZByhfCden-naEun0lMba_AC7kGj5sgQ&s=Pw9xFc9gmqA6js_u_rq
>> 9pPW54MbnwqP_BP6j8uPCOxY&e=>,
>>     and unzip it to CoinIpopt/ThirdParty/HSL/coinhsl
>>
>> Then I add following 2 lines to Cygwin.bat
>>
>>     call "D:\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
>>     call
>>     D:\IntelSWTools\compilers_and_libraries_2016.3.207\windows\b
>> in\ifortvars.bat
>>     -arch ia32_intel64 vs2013 -platform linux
>>
>>
>> And then in Cygwin command line, I enter
>>
>>     ./configure -enable-doscompile=msvc
>>
>>
>> After a while, errors comes out says:
>>
>>     configure: for BLAS in MKL (32bit) using C linkage
>>     checking for daxpy... no
>>     configure: for BLAS in MKL (64bit) using C linkage
>>     checking for daxpy... no
>>     checking whether -lblas has BLAS... no
>>     checking for COIN-OR package Blas... skipped check via pkg-config,
>>     redirect to fallback
>>     checking for COIN-OR package Blas (fallback)... no, dependency
>>     coinblas not available
>>     configure: error: Required package BLAS not found.
>>     configure: error: /bin/sh './configure' failed for Ipopt
>>
>> The full configure output information is in the attachment.
>>
>> It seems that complier cannot find the BLAS, but I indeed download it to
>> CoinIpopt/ThirdPart/BLAS.
>> Does anyone know what is wrong and how to fix it?
>>
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__list.coi
>> n-2Dor.org_mailman_listinfo_ipopt&d=CwICAg&c=Ngd-ta5yRYsqe
>> UsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=BRcuJnQr5NAzU29t80hk2r
>> sLc4vrlRySBDabuq0O1ZI&m=em6m_GUccwZUZByhfCden-naEun0lMba_AC7
>> kGj5sgQ&s=QtidthPoNz8NxzFKiQNvv0QKChg_wbz3gQgAekDoh1Q&e=
>>
>>
>
> --
> http://www.gams.com/~stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20160831/7a04c6ef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 12712 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20160831/7a04c6ef/attachment-0001.obj>


More information about the Ipopt mailing list