Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

Cannot build Boost 1.54 with Composer 2013 SP1 on Win7

James_d_
Beginner
786 Views

Hi

I am unable to build Boost 1.54 with Composer 2013 SP1 on Win7 (VS2012). I keep getting dialogs popping up saying "Windows can't open this file: positional_options.obj.rsp" and many other .obj.rsp files.

I've patched Boost according to this: http://software.intel.com/en-us/articles/boost-compiler-error-class-has-no-member-type (When will this be fixed?)

I've updated intel-win.jam according to this: http://boost.2283326.n4.nabble.com/BOOST-BUILD-Building-Boost-with-Intel-Composer-XE-v12-Windows-issues-td4015638.html

I'm starting the "Intel 64 Visual Studio 2012 mode" command shell. I have built b2.exe with the help of this: http://software.intel.com/en-us/forums/topic/392988 but I still get the error.

I've tried Googling this all day and I'm still stuck. What have I missed?

regards

James

 

0 Kudos
1 Solution
Bernhard_B_
Novice
786 Views

I extended the intel-win.jam to set the microsoft assembler for x86 and amd64.
It results in following build line for x86:
call "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\\iclvars.bat" ia32 vs2010 > nul 
    ml -coff -nologo -c -Zp4 -Cp -Cx -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG /W3  -Fo "bin.v2\libs\context\build\intel-vc10-win-14.0\release\address-model-32\threading-multi\asm\jump_i386_ms_pe_masm.obj" "libs\context\src\asm\jump_i386_ms_pe_masm.asm"

It builds correctly a dll. Hope it helps.
I attached the full file. Rename the intel-win.jam.txt to intel-win.jam . The Forum only allows .txt files.

 

View solution in original post

0 Kudos
7 Replies
Bernhard_B_
Novice
786 Views

Have you also edited the user-config.jam? The step is descriped in comment 10 ( https://svn.boost.org/trac/boost/ticket/5305 )

 

user-config.jam should look like this

<code>

import os ;

path-constant intel-compiler-13 : [ os.environ ICPP_COMPILER13 ] ;

using intel : 13.0 : $(intel-compiler-13)/bin/ia32/icl.exe : <compatibility>vc11 ;

</code>

 

boost.build should pick up automatically the correct setting for intel compiler.

0 Kudos
Ingo_L_
Beginner
786 Views

This is a bug in the jam scripts for boost 1.54 and boost 1.55. I already reported those bugs on the boost mailing list, but didn't get any response yet. Be aware that for boost 1.55 compiler flag forwarding via the user-config.jam is at least broken for msvc (can be validated by checking the response files written for objfiles compilation).

As a quick workaround for the intel compilation problem with boost, I propose that you modify the intel-win.jam or what is appropriate for you build and remove the $(setup) prefix from the commands defintions, i.e. modified commands, then look like

    toolset.flags intel-win.compile .CC $(condition) : icl ;
    toolset.flags intel-win.link .LD $(condition) : xilink ;
    toolset.flags intel-win.archive .LD $(condition) : xilink /lib ;
    toolset.flags intel-win.link .MT $(condition) : mt -nologo ;
    toolset.flags intel-win.compile .MC $(condition) : mc ;
    toolset.flags intel-win.compile .RC $(condition) : rc ;

from intel-win.jam, line 77 ...

Good Luck, ILo.

0 Kudos
James_d_
Beginner
786 Views

Thanks for the replies. Slightly further along now but still can't build. Following Bernhard's suggestion, modified for my environment, I have the following in the user-config file:

[plain]import os ;

path-constant intel-compiler-14 : [ os.environ ICPP_COMPILER14 ] ;

using intel : 14.0 : $(intel-compiler-14)/bin/intel64/icl.exe : <compatibility>vc11 ;[/plain]

This will progress somewhat but then fails with:

[plain]intel-win.compile.asm bin.v2/libs/context/build/intel-vc11-win-14.0/debug/address-model-64/architecture-x86/link-static/threading-multi/asm/make_x86_64_ms_pe_masm.obj
'-c' is not recognized as an internal or external command,
operable program or batch file.

     -c -Zp4 -Cp -Cx -DBOOST_ALL_NO_LIB=1 -DBOOST_ALL_NO_LIB=1 /Zi /Zd /W3  -Fo " bin.v2/libs/context/build/intel-vc11-win-14.0/debug/address-model-64/architecture-x86/link-static/threading-multi/asm/make_x86_64_ms_pe_masm.obj" "libs/context/src/asm/make_x86_64_ms_pe_masm.asm"[/plain]

This seems to be a problem using the assembler. On the command line if I enter ml64 followed by the options beginning with -c then the file is assembled and rerunning the build stops at a new file. This looks like this ticket: https://svn.boost.org/trac/boost/ticket/8235 but I can't find any resolution for it.

0 Kudos
Bernhard_B_
Novice
787 Views

I extended the intel-win.jam to set the microsoft assembler for x86 and amd64.
It results in following build line for x86:
call "C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin\\iclvars.bat" ia32 vs2010 > nul 
    ml -coff -nologo -c -Zp4 -Cp -Cx -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DBOOST_CONTEXT_SOURCE -DNDEBUG /W3  -Fo "bin.v2\libs\context\build\intel-vc10-win-14.0\release\address-model-32\threading-multi\asm\jump_i386_ms_pe_masm.obj" "libs\context\src\asm\jump_i386_ms_pe_masm.asm"

It builds correctly a dll. Hope it helps.
I attached the full file. Rename the intel-win.jam.txt to intel-win.jam . The Forum only allows .txt files.

 

0 Kudos
James_d_
Beginner
786 Views

Fantastic, thanks Bernhard, you are a gentleman and a scholar. I've now got Boost built and linking fine.

In the hope that this may prove useful to others, here's the full sequence used to build Boost 1.54 with VS2012 in 64 bit:

  1. Unpack Boost
  2. Patch boost\phoenix\core\actor.hpp according to: http://software.intel.com/en-us/articles/boost-compiler-error-class-has-no-member-type
  3. Apply patches from http://www.boost.org/patches/
  4. Create user.jam as attached to this post (adapted to 64 bit from Bernhard's).
  5. Replace intel-win.jam with the one attached to this post (copy of Bernhard's).
  6. Start the command window installed by Composer 2013: "Intel 64 Visual Studio 2012 mode"
  7. Bootstrap according to: http://software.intel.com/en-us/forums/topic/392988

  8. Run b2.exe to build Boost. My command line was: b2.exe --build-type=complete --prefix="c:\Boost\intel" -q architecture=x86 address-model=64 toolset=intel --without-mpi --without-python variant=debug,release link=static,shared threading=multi --user-config=user.jam install

On reflection I would have used -d0 and -j 16 as well but I wasn't certain everything would work but it did.

0 Kudos
Price__Jeff
Beginner
786 Views

I've tried repeatedly to duplicate the 8 steps suggested about in the last post by "James d." but I am still getting "Windows can't open this file: *.obj.rsp" many times and failure to build. I'm trying to build a 32 bit version of boost 1.54 that is VS2010 compatible. Any other ideas?

0 Kudos
Bernhard_B_
Novice
786 Views

Hi,

have you adopted the user.jam file for 32-bit? You can try to execute the command from step8 with the option: --debug-configuration it will print some "notice" lines about the compiler configuration like: 
notice: [intel-cfg] condition: '<toolset>intel-win-13.0-vc10/<architecture>/<address-model>', setup: 'call "C:\Program Files (x86)
\Intel\Composer XE 2013\bin\\iclvars.bat" ia32 vs2010 > nul

Another option is to use the new intel-win.jam file i have extended to better setup the intel compiler environment.
1. Replace intel-win.jam (in folder boost_1_54_0\tools\build\v2\tools) with the attached intel-win.jam.txt
2. Open Command prompt in Folder boost_1_54_0\tools\build\v2
3. Execute bootstrap.bat vc10 (This will only build the build engine b2 with visual studio 2010)
4. Change path to boost_1_54_0
5. Execute: .\tools\build\v2\b2.exe -j%NUMBER_OF_PROCESSORS% --toolset=intel-14.0-vc10 address-model=32 --without-mpi --without-python threading=multi

No user-config necessary just edit the compiler version in intel-14.0-vc10 to suit your installed version tested versions are 14.0, 13.0 or 12.0
 

0 Kudos
Reply