-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Can't build Bazel with Intel compiler (2) #663
Comments
Well, we intentionally don't propagate environment variables from outside the bazel binary; generally speaking, they can cause builds to be non-deterministic and non-reproducible. However, we probably want to add a mechanism to poke specific holes into that policy to allow things such as license files (it's not just the Intel C++ compiler). As a workaround, you can change your crosstool to use a wrapper script that sets the env variable and then calls through to the actual binary. If we make C++-specific changes here, we'll want to make sure that we can also handle the Apple C++ toolchain requirements for iOS and OSX builds. |
Is there a work-around to solve the issue? |
You should try setting --action_env=INTEL_LICENSE_FILE on the command line (or in your bazelrc file). It may not work yet, since not all actions handle --action_env correctly (#3320) in which case I'll prioritize getting it to work for the relevant C++ actions. |
I tried - unfortunately, it did not help :( I really need to build TensorFlow with ICC, but I can't deal with this issue. |
Wrapper icc in a shell script that sets the envvar appropriately
#!/bin/sh
export INTEL_LICENSE_FILE=xxx
/path/to/icc.bin "$*"
or similar.
…On 21 July 2017 at 09:55, GearFear ***@***.***> wrote:
I tried - unfortunately, it did not help :( I really need to build
TensorFlow with ICC, but I can't deal with this issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#663 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHh-DU1T3Yotoe-zVBdsCP8Nrm-mjHZ3ks5sQGdogaJpZM4GrnZR>
.
--
<https://www.acellera.com>
<https://twitter.com/acellera?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor>
<https://www.youtube.com/user/acelleralive>
<https://www.linkedin.com/company/acellera>
<https://www.acellera.com/md-simulation-blog-news/> [image:
skype:acellera] <http://is.gd/1eXkbS>
|
Is this issue still valid? |
Can you confirm this is still an issue? |
It turned out to be trivially worked-around by shimming the compiler in a wrapper. |
Following on from case #662
Commenting out the static_asserts() that break the build, the compile then breaks at:
'''
$ ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh build /path/to/bazel
🍃 Building Bazel from scratch............
🍃 Building Bazel with Bazel.
.Extracting Bazel installation...
...........
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
INFO: From Compiling src/main/cpp/blaze_util.cc:
Error: A license for CCompL could not be obtained (-1,359,2).
Is your license file in the right location and readable?
The location of your license file should be specified via
the $INTEL_LICENSE_FILE environment variable.
License file(s) used were (in this order):
1. Trusted Storage
** 2. /raid-1/apps/intel/2013/composer_xe_2013.0.079/Licenses
** 3. /opt/intel/licenses
** 4. /Users/Shared/Library/Application Support/Intel/Licenses
* 5. /raid-1/apps/intel/2013/composer_xe_2013.0.079/bin/intel64/.lic
Please visit http://software.intel.com/sites/support/ if you require technical assistance.
icpc: error #10052: could not checkout FLEXlm license
ERROR: /raid-1/apps/bazelbuild/bazel/src/main/cpp/BUILD:7:1: C++ compilation of rule '//src/main/cpp:blaze_util' failed: icpc failed: error executing command /apps/intel/2013/bin/icpc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -DBLAZE_OPENSOURCE ... (remaining 24 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 8.513s, Critical Path: 2.18s
Building output/bazel
'''
You are running the compiler in such a way that the value of the required environment variable INTEL_LICENSE_FILE is not being propagated. the compiler thus can't find its license server.
The text was updated successfully, but these errors were encountered: