boostorg / boostorg/config

Boost is not correctly configured on modern Mac with Intel C++ Compiler

Open
#235 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
80
Forks
184
Avg merge
1h 16m
Merged PRs (30d)
3

Description

Boost does not work properly on modern macOS, for example 10.11, with Intel C++ Compiler.

When compiling with default language/standard/compatibility flags, select_compiler_config.hpp picks up intel.hpp which does not define BOOST_NO_RTTI and BOOST_NO_RTTI due to __INTEL_RTTI__. This is wrong, since Intel C++ 2016 builds upon LLVM/Clang which does not have RTTI. As a result, if your application uses RTTI-dependent operators (like typeid()), it breaks.

When you compile with the following flags:

-no-use-intel-optimized-headers -no-intel-extensions -no-icc -no-gcc

...then Boost picks up clang.hpp. But the Clang version handling in this header file is broken since Apple has different versioning scheme for Clang.

However, if you use the flag -clangxx-name= with a custom Clang version, then the Clang versioning scheme is back to normal.

When building with Intel C++ on macOS, both Clang and Intel compiler specific settings need to be considered.

Moved from Trac.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read select_compiler_config.hpp, intel.hpp, and clang.hpp first to trace how Intel C++ and Apple Clang are detected on macOS. The fix is done when Intel C++ 2016's RTTI configuration is correct and Apple’s Clang version handling works both with default flags and with -clangxx-name=.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.