<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic This should just require in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943039#M17536</link>
    <description>&lt;P&gt;This should just require compiling to object using /Qmic and using xiar. It appears you are running MPSS 3.1 and I'm seeing that xiar is not compensating for some k1om binutils name changes under MPSS 3.1. I'll figure out why and what's needed and post&amp;nbsp;an update&amp;nbsp;shortly.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2013 12:36:41 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2013-12-19T12:36:41Z</dc:date>
    <item>
      <title>Build Native Libraries on windows</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943034#M17531</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am trying to build a library (static and shared) for the MIC on windows. I have compiled my src using the /Qmic flag but now I don't get how to generate a library. For example I compile a src file as:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;ifort /Qmic -nologo -auto -fp -align array64byte -fp-model precise -mp1 -mkl -openmp -fpp -c -o performance_parameters_sb1.o c:/modules/performance_parameters_sb1.f90&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;then have tried these three methods to turn it into being a static library . . .&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;xilink -lib /OUT:c:/BUILD_win64-MIC_MKL_64/engine/LIBS/mkl/perflibs/performance_parameters_sb1.a c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o&lt;BR /&gt;
	xilib: executing 'k1om-mpss-linux-ar.exe'&lt;BR /&gt;
	xilib: executing 'lib'&lt;BR /&gt;
	Microsoft (R) Library Manager Version 10.00.30319.01&lt;BR /&gt;
	Copyright (C) Microsoft Corporation.&amp;nbsp; All rights reserved.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;/OUT:c:/BUILD_win64-MIC_MKL_64/engine/LIBS/mkl/perflibs/performance_parameters_sb1.a&lt;BR /&gt;
	c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o&lt;BR /&gt;
	c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o :&lt;BR /&gt;
	fatal error LNK1107: invalid or corrupt file: cannot read at 0x2F88&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;and I also tried&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;$ xilib /OUT:c:/BUILD_win64-MIC_MKL_64/engine/LIBS/mkl/perflibs/performance_parameters_sb1.a c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;xilib: executing 'k1om-mpss-linux-ar.exe'&lt;BR /&gt;
	xilib: executing 'lib'&lt;BR /&gt;
	Microsoft (R) Library Manager Version 10.00.30319.01&lt;BR /&gt;
	Copyright (C) Microsoft Corporation.&amp;nbsp; All rights reserved.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;/OUT:c:/BUILD_win64-MIC_MKL_64/engine/LIBS/mkl/perflibs/performance_parameters_sb1.a&lt;BR /&gt;
	c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o&lt;BR /&gt;
	c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o :&lt;BR /&gt;
	fatal error LNK1107: invalid or corrupt file: cannot read at 0x2F88&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;so I went looking for the linux tools and tried them directly:&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	k1om-mpss-linux-ar.exe ar c:/BUILD_win64-MIC_MKL_64/engine/LIBS/mkl/perflibs/performance_parameters_sb1.a c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o&lt;BR /&gt;
	C:\Program Files\Intel\MPSS\x86_64-mpsssdk-linux\usr\bin\k1om-mpss-linux\k1om-mpss-linux-ar.exe:&lt;BR /&gt;
	c:/BUILD_win64-MIC_MKL_64/engine/OBJECTS/performance_parameters_sb1.o: File format not recognized&lt;/P&gt;

&lt;P&gt;What is the correct way to do this ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 11:45:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943034#M17531</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T11:45:30Z</dc:date>
    </item>
    <item>
      <title>To follow up my own post, I</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943035#M17532</link>
      <description>&lt;P&gt;To follow up my own post, I now notice that, despite the errors, a .a file is created for the first two cases (xilib and xilink) but not using the k1om-mpss-linux-ar.exe command directly. Not sure if this is a valid file (will try and use it and see), but I need to find a way to generate the libraries without the command throwing an error as it causes make to stop. Any ideas ?&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 11:52:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943035#M17532</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T11:52:05Z</dc:date>
    </item>
    <item>
      <title>When making a linux hosted</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943036#M17533</link>
      <description>&lt;P&gt;When making a linux hosted build, it has been necessary to use xiar for this purpose.&lt;/P&gt;

&lt;P&gt;I think it's dangerous to sprinkle in possibly conflicting options (-fp -fp-model precise -mp1) or to attempt to pre-link against mkl libraries when making your own library. &amp;nbsp;As far as I know, -mp1 is available only as a substitute for the obsoleted option of that spelling.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:23:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943036#M17533</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-12-19T12:23:00Z</dc:date>
    </item>
    <item>
      <title>Quote:Tim Prince wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943037#M17534</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Tim Prince wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;When making a linux hosted build, it has been necessary to use xiar for this purpose.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I don't think that exists on windows.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Tim Prince wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I think it's dangerous to sprinkle in possibly conflicting options (-fp -fp-model precise -mp1) or to attempt to pre-link against mkl libraries when making your own library. &amp;nbsp;As far as I know, -mp1 is available only as a substitute for the obsoleted option of that spelling.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for that, I'll have a tidy up of the flags in the build system.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:32:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943037#M17534</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T12:32:34Z</dc:date>
    </item>
    <item>
      <title>I have just noticed that,</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943038#M17535</link>
      <description>&lt;P&gt;I have just noticed that, despite the error messages, a .a file is actually created for the first two options (but not calling the k1om-mpss-linux-ar.exe command directly.) I'll take a look at this file and see if it is what I need. However, I still need the command to not produce errors as this causes make to stop.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:36:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943038#M17535</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T12:36:16Z</dc:date>
    </item>
    <item>
      <title>This should just require</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943039#M17536</link>
      <description>&lt;P&gt;This should just require compiling to object using /Qmic and using xiar. It appears you are running MPSS 3.1 and I'm seeing that xiar is not compensating for some k1om binutils name changes under MPSS 3.1. I'll figure out why and what's needed and post&amp;nbsp;an update&amp;nbsp;shortly.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:36:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943039#M17536</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-12-19T12:36:41Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943040#M17537</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;This should just require compiling to object using /Qmic and using xiar. It appears you are running MPSS 3.1 and I'm seeing that xiar is not compensating for some k1om binutils name changes under MPSS 3.1. I'll figure out why and what's needed and post&amp;nbsp;an update&amp;nbsp;shortly.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It might just be that my PATH is wrong as xiar doesn't exist, but if search for it in file manager it is there. I'll try adding its location to my path and see how I get on with it, thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:43:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943040#M17537</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T12:43:20Z</dc:date>
    </item>
    <item>
      <title>Whether in PATH or run</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943041#M17538</link>
      <description>&lt;P&gt;Whether in PATH or&amp;nbsp;run explicitly, you'll likely face this:&lt;/P&gt;

&lt;P&gt;C:\temp\&amp;gt; "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\intel64_mic\xiar" rcs libbar.a bar.o&lt;BR /&gt;
	Error: fread returned 1555 bytes (719840 expected)&lt;BR /&gt;
	Error: cannot read section headers&lt;BR /&gt;
	xiar: executing &lt;STRONG&gt;'x86_64-k1om-linux-ar.exe'&lt;/STRONG&gt;&lt;BR /&gt;
	xiar: error #10037: could not find 'x86_64-k1om-linux-ar.exe'&lt;BR /&gt;
	xiar: error spawn_errno_default: spawn('C:\PROGRA~2\Intel\COMPOS~1\bin\INTEL6~1\xild') failed, errno=0&lt;/P&gt;

&lt;P&gt;The underlying "ar" under the MPSS 3.1 is now&amp;nbsp;&lt;STRONG&gt;k1om-mpss-linux-ar.exe &lt;/STRONG&gt;and there are also other directory name changes on top of this.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:26:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943041#M17538</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-12-19T13:26:14Z</dc:date>
    </item>
    <item>
      <title>Quote:jasno wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943042#M17539</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;jasno wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;&lt;EM&gt;Kevin Davis (Intel)&lt;/EM&gt; wrote:

	&lt;P&gt;This should just require compiling to object using /Qmic and using xiar. It appears you are running MPSS 3.1 and I'm seeing that xiar is not compensating for some k1om binutils name changes under MPSS 3.1. I'll figure out why and what's needed and post&amp;nbsp;an update&amp;nbsp;shortly.&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It might just be that my PATH is wrong as xiar doesn't exist, but if search for it in file manager it is there. I'll try adding its location to my path and see how I get on with it, thanks.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;So having looked into it a little, I see that I have "C:\Program Files (x86)\Intel\Composer XE 2013 SP1.139\bin\intel64" in my path and so I pick up ifort and icl from this location. xiar seems only to be in "C:\Program Files (x86)\Intel\Composer XE 2013 SP1.139\bin\intel64_mic" which is not in my path, but which also includes an ifort command (but no icl, rather it has icc). So whats the correct thing for me to be using ? Should my PATH be the latter option (C:\Program Files (x86)\Intel\Composer XE 2013 SP1.139\bin\intel64_mic) and should I use ifort from that directory ? Or should I add it to the end of my PATH so that I can call xiar directly but still pick up the other versions of ifort and icl ?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:27:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943042#M17539</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T13:27:42Z</dc:date>
    </item>
    <item>
      <title>For now the latter. i.e. "Or</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943043#M17540</link>
      <description>&lt;P&gt;For now the latter. i.e. "Or should I add it to the end of my PATH so that I can call xiar directly but still pick up the other versions of ifort and icl"&lt;/P&gt;

&lt;P&gt;It is important to&amp;nbsp;always use the compiler drivers (ifort/icl) from the intel64 directory and allow them to call intel64_mic versions as designed when offload code is detected in the source file or /Qmic is specified.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:42:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943043#M17540</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-12-19T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943044#M17541</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Whether in PATH or&amp;nbsp;run explicitly, you'll likely face this:&lt;/P&gt;

&lt;P&gt;C:\temp\&amp;gt; "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\intel64_mic\xiar" rcs libbar.a bar.o&lt;BR /&gt;
	Error: fread returned 1555 bytes (719840 expected)&lt;BR /&gt;
	Error: cannot read section headers&lt;BR /&gt;
	xiar: executing &lt;STRONG&gt;'x86_64-k1om-linux-ar.exe'&lt;/STRONG&gt;&lt;BR /&gt;
	xiar: error #10037: could not find 'x86_64-k1om-linux-ar.exe'&lt;BR /&gt;
	xiar: error spawn_errno_default: spawn('C:\PROGRA~2\Intel\COMPOS~1\bin\INTEL6~1\xild') failed, errno=0&lt;/P&gt;

&lt;P&gt;The underlying "ar" under the MPSS 3.1 is now&amp;nbsp;&lt;STRONG&gt;k1om-mpss-linux-ar.exe &lt;/STRONG&gt;and there are also other directory name changes on top of this.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;What about if I make a copy of the new one with the old name ? Or do the other directory changes make it a non starter ?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:48:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943044#M17541</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T13:48:15Z</dc:date>
    </item>
    <item>
      <title>The directory changes make it</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943045#M17542</link>
      <description>&lt;P&gt;The directory changes make it a non-starter. I'm closing in on a work around. Do you happen to have a system available with MPSS 2.1 still installed?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:55:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943045#M17542</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-12-19T13:55:12Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943046#M17543</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The directory changes make it a non-starter. I'm closing in on a work around. Do you happen to have a system available with MPSS 2.1 still installed?&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;We only have the one Windows system. However, while 2.1 is not the active installation, I think the MPSS 2.1 directory is still in place (renamed MPSS_old2) if it is just files in that directory that you are after . . .&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:01:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943046#M17543</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T14:01:49Z</dc:date>
    </item>
    <item>
      <title>Ok, that’s actually helpful.</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943047#M17544</link>
      <description>&lt;P&gt;Ok, that’s actually helpful. Until I can speak with the driver developer, try this.&lt;/P&gt;

&lt;P&gt;Before executing xiar, set the environment variable &lt;STRONG&gt;MIC_SYSROOT &lt;/STRONG&gt;(as shown below) and then unset it after running xiar to avoid confusing the compiler driver invocations that occur after running xiar.&amp;nbsp; For example:&lt;/P&gt;

&lt;P&gt;SET MIC_SYSROOT="C:\Program Files\Intel\MPSS_old2\sdk"&lt;BR /&gt;
	xiar ….&lt;BR /&gt;
	SET MIC_SYSROOT=&lt;/P&gt;

&lt;P&gt;Or do the equivalent within your makefile.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:19:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943047#M17544</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-12-19T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943048#M17545</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Ok, that’s actually helpful. Until I can speak with the driver developer, try this.&lt;/P&gt;

&lt;P&gt;Before executing xiar, set the environment variable &lt;STRONG&gt;MIC_SYSROOT &lt;/STRONG&gt;(as shown below) and then unset it after running xiar to avoid confusing the compiler driver invocations that occur after running xiar.&amp;nbsp; For example:&lt;/P&gt;

&lt;P&gt;SET MIC_SYSROOT="C:\Program Files\Intel\MPSS_old2\sdk"&lt;BR /&gt;
	xiar ….&lt;BR /&gt;
	SET MIC_SYSROOT=&lt;/P&gt;

&lt;P&gt;Or do the equivalent within your makefile.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;OK, I'll give that a go and get back to you, might take a while to reconfigure things and to start using xiar within our build system.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:41:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943048#M17545</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T14:41:41Z</dc:date>
    </item>
    <item>
      <title>Quote:jasno wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943049#M17546</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;jasno wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;&lt;EM&gt;Kevin Davis (Intel)&lt;/EM&gt; wrote:

	&lt;P&gt;Ok, that’s actually helpful. Until I can speak with the driver developer, try this.&lt;/P&gt;

	&lt;P&gt;Before executing xiar, set the environment variable &lt;STRONG&gt;MIC_SYSROOT &lt;/STRONG&gt;(as shown below) and then unset it after running xiar to avoid confusing the compiler driver invocations that occur after running xiar.&amp;nbsp; For example:&lt;/P&gt;

	&lt;P&gt;SET MIC_SYSROOT="C:\Program Files\Intel\MPSS_old2\sdk"&lt;BR /&gt;
		xiar ….&lt;BR /&gt;
		SET MIC_SYSROOT=&lt;/P&gt;

	&lt;P&gt;Or do the equivalent within your makefile.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;I'm afraid that doesn't work for me. If I have a directory of objects, compiled using ifort and /Qmic, and want to build the library foo.a I am doing:&lt;/P&gt;

&lt;P&gt;SET MIC_SYSROOT="C:\Program Files\Intel\MPSS_old2\sdk"&lt;/P&gt;

&lt;P&gt;C:\test5\test_g05&amp;gt;xiar -rs foo.a *.o&lt;BR /&gt;
	xiar: executing 'x86_64-k1om-linux-ar.exe'&lt;BR /&gt;
	xiar: error #10037: could not find 'x86_64-k1om-linux-ar.exe'&lt;BR /&gt;
	xiar: error spawn_errno_default: spawn('C:\PROGRA~2\Intel\COMPOS~1.139\bin\INTEL6~1\xild') failed, errno=0&lt;/P&gt;

&lt;P&gt;C:\tmp\test5\test_g05&amp;gt;dir %MIC_SYSROOT%&lt;BR /&gt;
	&amp;nbsp;Volume in drive C has no label.&lt;BR /&gt;
	&amp;nbsp;Volume Serial Number is 22E4-62C4&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Directory of C:\Program Files\Intel\MPSS_old2\sdk&lt;/P&gt;

&lt;P&gt;23/09/2013&amp;nbsp; 17:02&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DIR&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;
	23/09/2013&amp;nbsp; 17:02&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DIR&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ..&lt;BR /&gt;
	17/07/2013&amp;nbsp; 12:33&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DIR&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; linux-k1om-4.7&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 File(s)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 bytes&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3 Dir(s)&amp;nbsp; 872,776,159,232 bytes free&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 15:39:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943049#M17546</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T15:39:26Z</dc:date>
    </item>
    <item>
      <title>Quote:Kevin Davis (Intel)</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943050#M17547</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Ok, that’s actually helpful. Until I can speak with the driver developer, try this.&lt;/P&gt;

&lt;P&gt;Before executing xiar, set the environment variable &lt;STRONG&gt;MIC_SYSROOT &lt;/STRONG&gt;(as shown below) and then unset it after running xiar to avoid confusing the compiler driver invocations that occur after running xiar.&amp;nbsp; For example:&lt;/P&gt;

&lt;P&gt;SET MIC_SYSROOT="C:\Program Files\Intel\MPSS_old2\sdk"&lt;BR /&gt;
	xiar ….&lt;BR /&gt;
	SET MIC_SYSROOT=&lt;/P&gt;

&lt;P&gt;Or do the equivalent within your makefile.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;OK, so just using the k1om-mpss-linux-ar.exe command directly seems to work, I just gave it the wrong args before. Still can't get xiar to work but doing&lt;/P&gt;

&lt;P&gt;&amp;nbsp;k1om-mpss-linux-ar.exe rs foo.a *.o&lt;/P&gt;

&lt;P&gt;ifort /Qmic -o test_g05saf.exe test_g05.f90 foo.a -I./modules_native -mkl&lt;/P&gt;

&lt;P&gt;gives an exe that can be copied to the MIC and run successfully. I can just use that for now.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;jason&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 16:42:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943050#M17547</guid>
      <dc:creator>jasno</dc:creator>
      <dc:date>2013-12-19T16:42:00Z</dc:date>
    </item>
    <item>
      <title>You do something like below.</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943051#M17548</link>
      <description>&lt;P&gt;You do something like below. I tailored the demonstration below to your config.&lt;/P&gt;

&lt;P&gt;bar.f90&lt;BR /&gt;
	===============&lt;BR /&gt;
	subroutine bar&lt;BR /&gt;
	&amp;nbsp; print*,"MIC: in bar...."&lt;BR /&gt;
	end subroutine bar&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	foo.f90&lt;BR /&gt;
	================&lt;BR /&gt;
	program foo&lt;BR /&gt;
	!DIR$ ATTRIBUTES OFFLOAD : mic :: bar&lt;/P&gt;

&lt;P&gt;&amp;nbsp; print*,"Host: in foo..."&lt;/P&gt;

&lt;P&gt;&amp;nbsp; !DIR$ OFFLOAD begin target(mic)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; call bar&lt;BR /&gt;
	&amp;nbsp; !DIR$ end OFFLOAD&lt;BR /&gt;
	end program foo&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;C:\&amp;gt; ifort /Qmic -fpic -c bar.f90&lt;BR /&gt;
	Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.139 Build 20131008&lt;BR /&gt;
	Copyright (C) 1985-2013 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;C:\&amp;gt; set MIC_SYSROOT="C:\Program Files\Intel\MPSS_old2\sdk"&lt;/P&gt;

&lt;P&gt;C:\&amp;gt; "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\intel64_mic\xiar" rcs libbar.a bar.o&lt;BR /&gt;
	Error: fread returned 1555 bytes (719840 expected)&lt;BR /&gt;
	Error: cannot read section headers&lt;BR /&gt;
	xiar: executing 'x86_64-k1om-linux-ar.exe'&lt;/P&gt;

&lt;P&gt;C:\&amp;gt; set MIC_SYSROOT=&lt;/P&gt;

&lt;P&gt;C:\&amp;gt; ifort foo.f90 /Qoffload-option,mic,link,"-L. -lbar"&lt;BR /&gt;
	Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.1.139 Build 20131008&lt;BR /&gt;
	Copyright (C) 1985-2013 Intel Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;Microsoft (R) Incremental Linker Version 12.00.21005.1&lt;BR /&gt;
	Copyright (C) Microsoft Corporation.&amp;nbsp; All rights reserved.&lt;/P&gt;

&lt;P&gt;-out:foo.exe&lt;BR /&gt;
	-subsystem:console&lt;BR /&gt;
	foo.obj&lt;BR /&gt;
	C:\Users\xxxxxx\AppData\Local\Temp\2\44884.obj&lt;BR /&gt;
	-defaultlib:liboffload&lt;BR /&gt;
	-defaultlib:libiomp5md&lt;BR /&gt;
	ofldbegin.obj&lt;BR /&gt;
	ofldend.obj&lt;/P&gt;

&lt;P&gt;C:\&amp;gt; .\foo.exe&lt;BR /&gt;
	&amp;nbsp;Host: in foo...&lt;BR /&gt;
	&amp;nbsp;MIC: in bar....&lt;/P&gt;

&lt;P&gt;You can (as you did) also build a native executable and link the library as you showed too.&lt;/P&gt;

&lt;P&gt;You can safely ignore the error from xiar that appears above. That's known to be benign and will be fixed in a future update.&lt;/P&gt;

&lt;P&gt;You probably could use the k1om binutils "ar" for most programs but not when IPO optimization is used.&lt;/P&gt;

&lt;P&gt;I submitted this to Development (under the internal tracking id below) for further investigation.&lt;/P&gt;

&lt;P&gt;(Internal tracking id: DPD200250854)&lt;BR /&gt;
	&lt;STRONG&gt;(Resolution Update on 09/15/2014):&lt;/STRONG&gt; This defect is fixed in the Intel® Composer XE 2013 SP1 Update 4 release (2013.1.4.211 - Linux) -AND- the Intel® Parallel Studio XE 2015 Initial Release (2015.0.090 - Linux).&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:52:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943051#M17548</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2013-12-19T17:52:00Z</dc:date>
    </item>
    <item>
      <title>It seems like this problem</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943052#M17549</link>
      <description>&lt;P&gt;It seems like this problem was never fully resolved, as I am seeing almost exactly the same thing in the latest version of parallel studio. I am compiling a c++ project that includes offload regions and when the linking stage is reached I get the error:&lt;/P&gt;

&lt;P&gt;1&amp;gt;&amp;nbsp; xilib: executing 'k1om-mpss-linux-ar.exe'&lt;BR /&gt;
	1&amp;gt;xilib : error #10037: could not find 'ar.exe'&lt;BR /&gt;
	1&amp;gt;xilib : error spawn_errno_default: spawn('C:\PROGRA~2\Intel\COMPOS~1\bin\Intel64\xilink.exe') failed, errno=0&lt;/P&gt;

&lt;P&gt;Any suggestions for a fix or workaround?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 06:27:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943052#M17549</guid>
      <dc:creator>PKM</dc:creator>
      <dc:date>2014-07-31T06:27:55Z</dc:date>
    </item>
    <item>
      <title>The fix for the issue</title>
      <link>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943053#M17550</link>
      <description>&lt;P&gt;The fix for the issue discussed in this thread relates only to building native with &lt;STRONG&gt;/Qmic&lt;/STRONG&gt; which is only supported using the command line. That fix (to DPD200250854) is expected to be in the next Composer XE 2013 SP1 Update 4 tentatively scheduled for release next month (mid-August).&lt;/P&gt;

&lt;P&gt;The issue you experienced involves building a static library containing offloaded code under the Visual Studio IDE. There are two underlying issues impacting that. The first you experienced (ar.exe not found) and a second that surfaces after working around the first, and it takes some acrobatics both in and outside the IDE to work around both.&lt;/P&gt;

&lt;P&gt;The fix for the missing ar.exe issue (DPD200256240) is also expected to be in the next Composer XE 2013 SP1 Update 4 release. To work around this issue one needs have a copy of &lt;STRONG&gt;C:\Program Files\Intel\MPSS\sdk\linux-k1om-4.7\bin\x86_64-k1om-linux-ar.exe&lt;/STRONG&gt;&amp;nbsp; named as “&lt;STRONG&gt;ar.exe&lt;/STRONG&gt;” within any location that appears in your PATH setting; however, doing so leads to another error so you must also work around as discussed below.&lt;/P&gt;

&lt;P&gt;For a quick work around for the missing ar.exe issue, under a command-prompt running as Administrator, you can create a symbolic-link with &lt;STRONG&gt;mklink &lt;/STRONG&gt;as follows:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;mklink "C:\Program Files\Intel\MPSS\bin\ar.exe" "C:\Program Files\Intel\MPSS\sdk\linux-k1om-4.7\bin\x86_64-k1om-linux-ar.exe"&lt;/PRE&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;C:\&amp;gt; mklink "C:\Program Files\Intel\MPSS\bin\ar.exe" "C:\Program Files\Intel\MPSS\sdk\linux-k1om-4.7\bin\x86_64-k1om-linux-ar.exe"
symbolic link created for C:\Program Files\Intel\MPSS\bin\ar.exe &amp;lt;&amp;lt;===&amp;gt;&amp;gt; C:\Program Files\Intel\MPSS\sdk\linux-k1om-4.7\bin\x86_64-k1om-linux-ar.exe&lt;/PRE&gt;

&lt;P&gt;Once you work around that issue, you hit another defect when building under the MSVS IDE (DPD200252338 - discussed here: &lt;A href="http://software.intel.com/forums/topic/498728)" target="_blank"&gt;http://software.intel.com/forums/topic/498728)&lt;/A&gt; where the path to the &amp;lt;file&amp;gt;MIC.o files is mangled (Windows style backslashes are dropped) and the invocation of ar.exe fails with something like:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;1&amp;gt;xilib: executing 'x86_64-k1om-linux-ar.exe'
1&amp;gt;ar.exe: x64Debugtbo_sort_libMIC.o: No such file or directory&lt;/PRE&gt;

&lt;P&gt;For that issue there is no work around that permits building the static library entirely under the MSVS IDE, instead you compile &lt;EM&gt;under &lt;/EM&gt;the IDE and link &lt;EM&gt;outside &lt;/EM&gt;the IDE. As discussed in the other cited forum thread, you perform the build under the IDE which compiles and fails as noted above. After the xilib failure under the IDE, you then execute the xilib command under an Intel compiler initialized command-prompt ( &lt;STRONG&gt;Start Menu &amp;gt; All Programs &amp;gt; Intel Parallel Studio XE 2013 &amp;gt; Command Prompt &amp;gt; Parallel Studio XE with Intel Compiler XE v14.0 Update 3&lt;/STRONG&gt;) to create the static library.&lt;/P&gt;

&lt;P&gt;In my case above, I would cd into the static library Project’s “&lt;STRONG&gt;x64\Debug&lt;/STRONG&gt;” folder and manually execute:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;xilib -out:..\MyStaticLib.lib *.obj&lt;/PRE&gt;

&lt;P&gt;You do the same for the Release build and just cd into that output directory accordingly.&lt;/P&gt;

&lt;P&gt;One other change that you must make for this to work relates to a Solution containing the static library and other projects (like a console app) where they are configured with the static library being a dependent project of the other project(s). In a Solution with project dependencies setup, when you build the other project that depends on the static library, the static library project is rebuilt which includes removing the good static library that you just built manually. To avoid this situation you must temporarily undo your project dependencies and then add a hard reference to the static library in the dependent project under &lt;STRONG&gt;Properties &amp;gt; Linker &amp;gt; Additional Dependencies&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;My example Solution here contains two projects, a console app with a dependency on my static library. After&amp;nbsp; undoing the project dependencies (&lt;STRONG&gt;Project &amp;gt; Project Dependencies&lt;/STRONG&gt;), for the console application, under &lt;STRONG&gt;Properties &amp;gt; Linker &amp;gt; Additional Dependencies&lt;/STRONG&gt; I added the following:&amp;nbsp; &lt;STRONG&gt;$(SolutionDir)\MyStaticLib\$(OutDir)\MyStaticLib.lib&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Our apologies for this tangled mess. I do expect all this will be sorted out in the Composer XE 2013 SP1 Update 4 release next month. I will start evaluating internal packages with these fixes as those become available shortly to ensure all this is fixed.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 10:42:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Build-Native-Libraries-on-windows/m-p/943053#M17550</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-07-31T10:42:51Z</dc:date>
    </item>
  </channel>
</rss>

