Opened 12 years ago

Last modified 11 years ago

#5305 new Bugs

Compiling boost 1.46.1 with bjam under Windows 7 using MSVC 2010 and Intel Compiler XE 2011.0.154

Reported by: Edward Rankin <erankin@…> Owned by:
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.46.0 Severity: Problem
Keywords: Cc:

Description

I noticed an issue with bjam when trying to compile boost 1.46.1 using MSVC 2010 and Intel Compiler XE 2011. Bjam is trying to execute "C:\Program Files\Intel\ComposerXE-2011\bin\ia21//iclvars.bat" when iclvars.bat is actually located in ""C:\Program Files\Intel\ComposerXE-2011\bin". According to Intel's release notes (http://software.intel.com/file/31856), the build environment command script has been changed (Section 3.4.1) which I have copied/pasted for convenience.

3.4.1 Build Environment Command Script Change The command window script used to establish the build environment allows the optional specification of the version of Microsoft Visual Studio to use. If you are not using the predefined Start menu shortcut to open a build environment window, use the following command to establish the proper environment: "<install-dir>\bin\compilervars.bat" arch [vs] Where arch is one of followings as appropriate for the target architecture you want to build for:

  • ia32
  • ia32_intel64
  • intel64

vs is optional and can be one of followings. If vs is not specified, the version of Visual Studio specified at installation time for command-line integration is used by default.

  • vs2010
  • vs2008
  • vs2005

If you also have Intel® Visual Fortran Composer XE 2011 installed, this command will also establish the environment for using that compiler. The script file names iclvars.bat and ifortvars.bat have been retained for compatibility with previous releases.

The workaround is to use the predefined start menu shortcut to open a build window for building boost.

Attachments (3)

build_intel_win.patch (2.6 KB ) - added by lelouch <lelouch.g34ss@…> 11 years ago.
Allows build with Intel Composer Studio
build_intel_win_v2.patch (4.9 KB ) - added by lelouch <lelouch.g34ss@…> 11 years ago.
revised patch should support 64 and 32 bit
intel-win.jam (7.8 KB ) - added by lelouch <lelouch.g34ss@…> 11 years ago.
Modified intel-win.jam

Download all attachments as: .zip

Change History (14)

comment:1 by Edward Rankin <erankin@…>, 11 years ago

This problem is still present in Boost 1.47 Beta 1

by lelouch <lelouch.g34ss@…>, 11 years ago

Attachment: build_intel_win.patch added

Allows build with Intel Composer Studio

comment:2 by lelouch <lelouch.g34ss@…>, 11 years ago

I have a patch which allows to build boost with Intel Composer Studio. After applying the patch i have the following lines in user-config.jam: path-constant intel-compiler-12 : [ os.environ ICPP_COMPILER12 ] ;

using intel : 12.0 : $(intel-compiler-12)/bin/ia32/icl.exe : <compatibility>vc10 <cxxflags>/Qstd=c++0x ;

The patch is missing the 64-bit build. Another problem what i encountered that it is not possible to build boost with multiple visual studio versions. And what would be cleaned up for patch to be applied?

comment:3 by Joshua Boyce <raptorfactor@…>, 11 years ago

If someone can come up with a full patch for both x86 and x64 I'd gladly test it on my machine. I'd love to see ICC working for BBv2 ASAP.

comment:4 by Edward Rankin <erankin@…>, 11 years ago

Just in case you are not aware, ICL already works without making any changes. You will need to open the command prompt shortcut provided by Intel which will load all the necessary environment variables required to compile.

comment:5 by Joshua Boyce <raptorfactor@…>, 11 years ago

Ah okay, thanks. I'll have to modify my build process to do that, but it shouldn't be too hard to automate.

comment:6 by Edward, 11 years ago

This really should be fixed, but at least there is a workaround. I am not sure I have the time to dig through Boost Build to apply a proper fix, so hopefully someone knowledgeable about it can figure out a proper patch.

by lelouch <lelouch.g34ss@…>, 11 years ago

Attachment: build_intel_win_v2.patch added

revised patch should support 64 and 32 bit

comment:7 by lelouch <lelouch.g34ss@…>, 11 years ago

The new patch should allow 64 & 32 bit builds like msvc as i used the msvc.jam as example. I haven't got the chance to test the 64-bit. Would be nice if anyone of you could try it.

in reply to:  7 comment:8 by anonymous, 11 years ago

Replying to lelouch <lelouch.g34ss@…>:

The new patch should allow 64 & 32 bit builds like msvc as i used the msvc.jam as example. I haven't got the chance to test the 64-bit. Would be nice if anyone of you could try it.

Does not work with V12.1 (build 258) of the compiler. Maybe please repost current intel-win.jam file and build command used.

comment:9 by lelouch <lelouch.g34ss@…>, 11 years ago

What doesn't work? For the 64-bit build you need a 64-bit bjam, because of the variable that is checked if it should build native 64-bit or cross compile. Perhaps someone knows a reliable way to determine if the os is 32-bit or 64-bit. To build bjam as a 64-bit version i executed the following command: F:\Libs\boost_1_48_0\tools\build\v2\engine>build vc10 amd64

In the config.jam i have the following line: using intel : 12.1 : "C:/Program Files (x86)/Intel/Composer XE 2011 SP1/bin/ia32/icl.exe" : <compatibility>vc10 <cxxflags>"/Qstd=c++0x /Qipo" <define>_CRT_SECURE_NO_WARNINGS ;

To build the 32-bit dlls: F:\Libs\boost_1_48_0>.\tools\build\v2\engine\bin.ntx86_64\bjam.exe -j8 --toolset=intel --user-config=config.jam variant=debug variant=release threading=multi link=shared runtime-link=shared address-model=32 --without-mpi --without-python stage

To build the 64-bit dlls F:\Libs\boost_1_48_0>.\tools\build\v2\engine\bin.ntx86_64\bjam.exe -j8 --toolset=intel --user-config=config.jam --stagedir=stage64 variant=debug variant=release threading=multi link=shared runtime-link=shared address-model=64 --without-mpi--without-python stage

Hope this helps. I'm also attaching the whole intel-win.jam

by lelouch <lelouch.g34ss@…>, 11 years ago

Attachment: intel-win.jam added

Modified intel-win.jam

in reply to:  9 comment:10 by anonymous, 11 years ago

Replying to lelouch <lelouch.g34ss@…>:

What doesn't work? For the 64-bit build you need a 64-bit bjam, because of the variable that is checked if it should build native 64-bit or cross compile. Perhaps someone knows a reliable way to determine if the os is 32-bit or 64-bit. To build bjam as a 64-bit version i executed the following command: F:\Libs\boost_1_48_0\tools\build\v2\engine>build vc10 amd64

In the config.jam i have the following line: using intel : 12.1 : "C:/Program Files (x86)/Intel/Composer XE 2011 SP1/bin/ia32/icl.exe" : <compatibility>vc10 <cxxflags>"/Qstd=c++0x /Qipo" <define>_CRT_SECURE_NO_WARNINGS ;

To build the 32-bit dlls: F:\Libs\boost_1_48_0>.\tools\build\v2\engine\bin.ntx86_64\bjam.exe -j8 --toolset=intel --user-config=config.jam variant=debug variant=release threading=multi link=shared runtime-link=shared address-model=32 --without-mpi --without-python stage

To build the 64-bit dlls F:\Libs\boost_1_48_0>.\tools\build\v2\engine\bin.ntx86_64\bjam.exe -j8 --toolset=intel --user-config=config.jam --stagedir=stage64 variant=debug variant=release threading=multi link=shared runtime-link=shared address-model=64 --without-mpi--without-python stage

Hope this helps. I'm also attaching the whole intel-win.jam

Ok... I'll re-test asap; probably next week. Just one question: Can you please take look at line 125 of the file? Is this intended or does a 'newline' simply not matter in JAM files?

comment:11 by lelouch <lelouch.g34ss@…>, 11 years ago

The linebreak is already in the original file. I don't know the intent of it.

Note: See TracTickets for help on using tickets.