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

Boost build failure - Boost 1.60/1.61, Intel 16.0 (version 3), VS2013/2015

Andrew_R_3
Beginner
842 Views

 

I'm having some issues building Boost 1.60 and 1.61 with the Intel 16.0 compiler using Visual Studio.

I've followed the instructions given here:

https://software.intel.com/en-us/forums/intel-c-compiler/topic/596450

and on getting a "catastrophic error: unable to obtain mapped memory" I adjusted the shift as given here:

https://software.intel.com/en-us/articles/unable-to-obtain-mapped-memory

without luck.

Can I get any confirmation that a 32/64 bit build can be done successfully?

Kind regards,

Andrew.

 

 

 

0 Kudos
14 Replies
Melanie_B_Intel
Employee
842 Views

That diagnostic message only appears if "precompiled headers" are being used by the compiler. Recommendation is to *not* use the pch options for the boost build.  

0 Kudos
Andrew_R_3
Beginner
842 Views

 

Thanks for the recommendation. Looking at the intel C++ compiler flags here:

https://software.intel.com/en-us/node/513057

I can only see one option related to pre-compiled headers:

0 Kudos
Melanie_B_Intel
Employee
842 Views

Yes, the Windows pch options are Yc (create pch) Yu (use pch) Y- (ignore /Y compiler options except this one) 

0 Kudos
Andrew_R_3
Beginner
842 Views

 

I've tried to pass this option through to the intel compiler with the use of cxxflags:

b2 -a define="__builtin_nan=nan" define="__builtin_huge_val()=HUGE_VAL" define="__builtin_huge_valf()=HUGE_VALF" define="__builtin_nanf=nanf" define="__builtin_nans=nan" define="__builtin_nansf=nanf" toolset=intel-16.0-vc12 cxxflags="/Y-"

 

No luck.  The compiler complains about ignoring /Y flag.  So I tried:

b2 -a define="__builtin_nan=nan" define="__builtin_huge_val()=HUGE_VAL" define="__builtin_huge_valf()=HUGE_VALF" define="__builtin_nanf=nanf" define="__builtin_nans=nan" define="__builtin_nansf=nanf" toolset=intel-16.0-vc12 cxxflags="Y-"

however this does not work as it still used PCHs.

So I am still back to my original problem or how to build boost with the intel compiler with or without precompied headers?  If there is anyone in intel or otherwise who has done this, can they please post their b2 command?

Thanks,

Andrew.

0 Kudos
Melanie_B_Intel
Employee
842 Views

As far as i know, the boost build does not ordinarily use any pch flags on the windows build.  

Can you paste the icl command line which is crashing with the diagnostic "unable to obtain mapped memory". We could check that line and make sure there are no pch options coming from the boost build process, by inspecting this string.

However, it's possible that your environment is inserting the pch options in a hidden way, i.e. via the Intel compiler configuration file. You can read about that at this url: https://software.intel.com/en-us/node/522780

There's another method to insert command line options, using the __INTEL_POST_CFLAGS environment variable. You can set this environment variable to "/Y-", then do the boost build. This would have the effect of neutralizing the pch options.

0 Kudos
Anoop_M_Intel
Employee
842 Views

Which VS compatibility mode are you using to build Boost library? If you are using VS2013, you need not use the defines as shown below:

define="__builtin_nan=nan" define="__builtin_huge_val()=HUGE_VAL" define="__builtin_huge_valf()=HUGE_VALF" define="__builtin_nanf=nanf" define="__builtin_nans=nan" define="__builtin_nansf=nanf"

Above defines are only required when using VS2015 + Intel Compiler 16.0. Like Melanie suggested, could you please share the icl invocation which results in this error?

Thanks and Regards
Anoop

0 Kudos
Anoop_M_Intel
Employee
842 Views

We have documented the procedure to build Boost library on Windows using Intel C++ Compiler at https://software.intel.com/en-us/articles/building-boost-with-intel-c-compiler-150. 

Thanks and Regards
Anoop

0 Kudos
TimP
Honored Contributor III
842 Views

Anoop Madhusoodhanan Prabha (Intel) wrote:

Which VS compatibility mode are you using to build Boost library? If you are using VS2013, you need not use the defines as shown below:

define="__builtin_nan=nan" define="__builtin_huge_val()=HUGE_VAL" define="__builtin_huge_valf()=HUGE_VALF" define="__builtin_nanf=nanf" define="__builtin_nans=nan" define="__builtin_nansf=nanf"

Above defines are only required when using VS2015 + Intel Compiler 16.0. Like Melanie suggested, could you please share the icl invocation which results in this error?

Thanks and Regards
Anoop

The same situation (and worse) obtains if trying to use VS2015.2 with Intel Compiler 15.0  The 15.0.7 release notes shouldn't have claimed that VS2015 is still supported, and the install should warn you if you select that integration.  As mentioned, VS2013 would be a more satisfactory choice if not using ICL 16.0.3 or 17.x (which don't require the redefines quoted above).

In my environment, the () in the define had to be escaped: __builtin_huge_val\(\) in order to use 16.0.2 with VS2015.2.

0 Kudos
Anoop_M_Intel
Employee
842 Views

Hi Tim,

You can more information on the 15.0 compiler integration support with VS2015 at https://software.intel.com/en-us/articles/support-of-visual-studio-2015-rtm-update-1-or-higher. I understand the release notes for 15.0 Update 7 mentions support for VS2015 but not specific that the support is only for VS2015 RTM.

Thanks and Regards
Anoop

0 Kudos
Andrew_R_3
Beginner
842 Views

 

Below is the "catastrophic error" that is received:

 

remark #11074: Inlining inhibited by limit max-size
remark #11074: Inlining inhibited by limit max-total-size
remark #11075: To get full report use -Qopt-report:4 -Qopt-report-phase ipo
compile-c-c++ bin.v2\libs\log\build\intel-vc12-win-16.0\release\link-static\log-api-winnt\threading-multi\formatter_parser.obj
formatter_parser.cpp
remark #11074: Inlining inhibited by limit max-size
remark #11074: Inlining inhibited by limit max-total-size
remark #11075: To get full report use -Qopt-report:4 -Qopt-report-phase ipo
compile-c-c++ bin.v2\libs\log\build\intel-vc12-win-16.0\release\link-static\log-api-winnt\threading-multi\matches_relation_factory.obj
matches_relation_factory.cpp
remark #11074: Inlining inhibited by limit max-size
remark #11074: Inlining inhibited by limit max-total-size
remark #11075: To get full report use -Qopt-report:4 -Qopt-report-phase ipo
common.mkdir bin.v2\libs\math\build
common.mkdir bin.v2\libs\math\build\intel-vc12-win-16.0
common.mkdir bin.v2\libs\math\build\intel-vc12-win-16.0\release
common.mkdir bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static
common.mkdir bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi
compile-c-c++-pch bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi\pch.pch
pch.pch.cpp
.\boost/concept_check.hpp(462): catastrophic error: unable to obtain mapped memory (see pch_diag.txt)
            BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
            ^

compilation aborted for bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi\pch.pch.cpp (code 4)

    call "C:\Users\tmp\AppData\Local\Temp\b2_intel-win_16.0_iclvars_ia32 vs2013.cmd" > nul
    icl @"bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi\pch.pch.rsp" "bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi\pch.pch.cpp"

...failed compile-c-c++-pch bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi\pch.pch bin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi\pch.obj...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>assoc_laguerre.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>assoc_legendre.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>beta.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>comp_ellint_1.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>comp_ellint_2.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>comp_ellint_3.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>cyl_bessel_i.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>cyl_bessel_j.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...
...skipped <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>cyl_bessel_k.obj for lack of <pbin.v2\libs\math\build\intel-vc12-win-16.0\release\link-static\threading-multi>pch.pch...

Unfortunately I am unable to directly adjust environment variables.  Any other suggestions which would have the same effect?

Thanks,

Andrew.

 

0 Kudos
Andrew_R_3
Beginner
842 Views

 

Attached is the full output file for the b2 call in case this is helpful.

Thanks,

Andrew.

0 Kudos
Melanie_B_Intel
Employee
842 Views

Andrew R. wrote:

 

Attached is the full output file for the b2 call in case this is helpful.

Thanks,

Andrew.

Thank you, yes that is very helpful.  You can see that there's lots of pch going on.  I did some google-ing (is that a verb?) and it appears that you can specify pch=off on the b2 command line.  That should do the trick.

0 Kudos
Andrew_R_3
Beginner
842 Views

 

Melanie your a champion.  The pch=off setting did the trick and your googling skills are beyond reproach. 

Regarding this page:

https://software.intel.com/en-us/articles/building-boost-with-intel-c-compiler-150

could I suggest that 2) is replaced with

2) cd <boost root>

as there is no need to go into the tool directory as the bootstrap.bat is in the <boost root> directory intentionally.

Might be a good idea to place the pch=off in the main b2 command as I'm sure other people will get the same issue that I have experienced.  For the record, I used the following b2 command without adjusting the intel_win.jam file:

b2 install --prefix=C:\Boost64 toolset=intel-16.0-vc12 cxxflags=/Qstd=c++11 pch=off variant=release address-model=64 -j4

Many thanks,

Andrew.

 

 

 

0 Kudos
Anoop_M_Intel
Employee
842 Views

Thanks Andrew for sharing that experience with us. I will update the article to reflect your findings too.

Regards
Anoop

0 Kudos
Reply