[Ipopt] Cannot build Ipopt on Windows with MSVC

Stefan Vigerske stefan at math.hu-berlin.de
Wed Aug 31 07:59:00 EDT 2016


you might want to decide first whether you want to build 32bit or 64bit 
binaries. That is, use -arch ia32 for the ifortvars if your MSVC is 
32bit and use -arch intel64 for the ifortvars if your MSVC is 64bit.

In the output you send, configure tried to use the Intel C/C++ compiler 
(icl) and that didn't seem to work. There is this strange line in 

link: cannot create link 'conftest.obj' to 
''$'\357\273\277''-out:conftest.exe': No such file or directory

Maybe it didn't work because you only run ifortvars (?).
You can force it to use the MS compiler by passing CC=cl CXX=cl to 


On 08/31/2016 12:36 PM, Chuan Liu wrote:
> 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


More information about the Ipopt mailing list