Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intel-linux toolset detection broken #23

Closed
3 tasks done
Flamefire opened this issue Apr 27, 2021 · 0 comments
Closed
3 tasks done

intel-linux toolset detection broken #23

Flamefire opened this issue Apr 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Flamefire
Copy link
Contributor

Flamefire commented Apr 27, 2021

Make sure you completed the following tasks

Environment and version details

  • Operating System+version: RHEL 7.5
  • Compiler+version: icpc 19.1.2.254
  • Shell: Bash
  • B2 Version: 4.4-git
notice: found boost-build.jam at /tmp/boost_1_76_0/boost-build.jam
notice: loading B2 from /tmp/boost_1_76_0/tools/build/src/bootstrap.jam
notice: Searching '/etc' '/home/s3248973' '/tmp/boost_1_76_0/tools/build/src' '/tmp/boost_1_76_0/tools/build/src/kernel' '/tmp/boost_1_76_0/tools/build/src/util' '/tmp/boost_1_76_0/tools/build/src/build' '/tmp/boost_1_76_0/tools/build/src/tools' '/tmp/boost_1_76_0/tools/build/src/contrib' '/tmp/boost_1_76_0/tools/build/src/.' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/home/s3248973' '/tmp/boost_1_76_0/tools/build/src' '/tmp/boost_1_76_0/tools/build/src/kernel' '/tmp/boost_1_76_0/tools/build/src/util' '/tmp/boost_1_76_0/tools/build/src/build' '/tmp/boost_1_76_0/tools/build/src/tools' '/tmp/boost_1_76_0/tools/build/src/contrib' '/tmp/boost_1_76_0/tools/build/src/.'.
notice: Searching '/home/s3248973' '/tmp/boost_1_76_0/tools/build/src' '/tmp/boost_1_76_0/tools/build/src/kernel' '/tmp/boost_1_76_0/tools/build/src/util' '/tmp/boost_1_76_0/tools/build/src/build' '/tmp/boost_1_76_0/tools/build/src/tools' '/tmp/boost_1_76_0/tools/build/src/contrib' '/tmp/boost_1_76_0/tools/build/src/.' for user-config configuration file 'user-config.jam'.
notice: Configuration file 'user-config.jam' not found in '/home/s3248973' '/tmp/boost_1_76_0/tools/build/src' '/tmp/boost_1_76_0/tools/build/src/kernel' '/tmp/boost_1_76_0/tools/build/src/util' '/tmp/boost_1_76_0/tools/build/src/build' '/tmp/boost_1_76_0/tools/build/src/tools' '/tmp/boost_1_76_0/tools/build/src/contrib' '/tmp/boost_1_76_0/tools/build/src/.'.
notice: Searching '.' for project-config configuration file 'project-config.jam'.
notice: Loading project-config configuration file 'project-config.jam' from '.'.
notice: intel-linux command is icpc
notice: intel-linux version is 19.1.2.254
notice: will use 'icpc' for intel-linux, condition <toolset>intel-linux-19.1.2.254
notice: using intel libraries :: <toolset>intel-linux-19.1.2.254 :: /../lib/x86_64
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
notice: [lzma] Using pre-installed library
notice: [lzma] Condition
notice: [zstd] Using pre-installed library
notice: [zstd] Condition
notice: [python-cfg] Configuring python...

Brief problem description

Since 5ede4e8#diff-080a16b9c3fe0d92a5fc4bce7f4fe42dbdb2f33bac84510f8a50101ce81ed097 the intel-linux detection is broken making it impossible to use the intel compilers when installed in a non-standard location and relying on auto-detection via $PATH

Steps to reproduce the issue

  • Set up $PATH, $CXX, $CC so that icpc is found
  • ./bootstrap.sh --with-toolset=intel-linux
  • ./b2 --debug-configuration

Actual behavior summary

What happens is that

detected_command = [ common.find-tool icpc : $(bin_paths) : path-last ] ;
searches for icpc, finds it in $PATH but returns only the command, not the full path as per
# If found in PATH, returns 'name' and if found in additional paths, returns

Furthermore the current behavior does not match the description where $PATH is searched for the intel tools:

b2/src/tools/intel.jam

Lines 22 to 23 in b4e1a65

If compiler command is not specified, then B2 will look in PATH
for an executable `icpc` (on Linux), or `icl.exe` (on Windows).

I find this quite worrying: Choosing the tool currently in $PATH should always be preferred over hard-coded guesses

When running b2 as above it will then fail to run properly seemingly using an empty string to invoke the compiler unless b2 is invoked with toolset=intel-linux explicitely.
Furthermore putting the full path to the compiler into project-config.jam will lead to an empty command_lib_path used at

flags intel-linux.compile RUN_PATH $(condition) : $(command_lib_path) ;
flags intel-linux.link RUN_PATH $(condition) : $(command_lib_path) ;
which I'm not sure is correct. It is also not enough to use the default toolset specified in project-config.cam by the bootstrap process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant