Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
I have a problem using bazel to build the rules_scala on a custom platform. I am sure it is because the shell envs are not propagated correctly to a subprocess that is spawned by some actions of bazel. Please see the log information that I provide in the last section.
If possible, provide a minimal example to reproduce the problem:
Environment info
-
Operating System:
CentOS 6.7
-
Bazel version (output of bazel info release):
0.8.1
-
If bazel info release returns "development version" or "(@Non-Git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD):
Have you found anything relevant by searching the web?
(e.g. StackOverflow answers,
GitHub issues,
email threads on the bazel-discuss Google group)
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
The command I ran to build rules_scala is bazel build -s --verbose_failures --sandbox_debug //src/...
>>>>> # //src/scala/io/bazel/rules_scala/tut_support:tut_compiler [action 'scala //src/scala/io/bazel/rules_scala/tut_support:tut_compiler']
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
/bin/bash -c '
rm -f bazel-out/local-fastbuild/bin/src/scala/io/bazel/rules_scala/tut_support/tut_compiler.jar
external/bazel_tools/tools/zip/zipper/zipper c bazel-out/local-fastbuild/bin/src/scala/io/bazel/rules_scala/tut_support/tut_compiler.jar @bazel-out/local-fastbuild/bin/src/scala/io/bazel/rules_scala/tut_support/bazel-out/local-fastbuild/bin/src/scala/io/bazel/rules_scala/tut_support/tut_compiler.jar_zipper_args
')
>>>>> # @scala//:scala-reflect [action 'Extracting interface @scala//:scala-reflect [for host]']
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
LD_LIBRARY_PATH=/cm/shared/gcc/6.4.0/lib64:/cm/shared/gcc/6.4.0/lib:/cm/shared/apps/mpc/1.0.3/lib:/cm/shared/apps/gcc/4.9.2/gmp-6.0/lib:/cm/shared/apps/mpfr/3.1.3/lib:/cm/shared/apps/sqlite3/3.15.0/lib:/cm/shared/apps/libevent/2.1.5-beta/lib:/cm/shared/apps/cudnn/6.0/lib64:/cm/shared/apps/java/jdk1.8.0_112/lib:/cm/shared/apps/python/3.6.0/lib:/cm/shared/apps/cuda/8.0/lib64:/cm/shared/apps/binutils/2.25/src/lib:/cm/shared/apps/slurm/current/lib/slurm:/cm/shared/apps/slurm/current/lib:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64:/home-4/[email protected]/lib:/home-4/[email protected]/opt/lib \
PATH=/cm/shared/gcc/6.4.0/bin:/home-4/[email protected]/go/bin:/home-4/[email protected]/.local/bin:/home-4/[email protected]/opt/go/bin:/home-4/[email protected]/maven/bin:/home-4/[email protected]/arcanist/bin:/home-4/[email protected]/opt/bin:/cm/shared/apps/sqlite3/3.15.0/bin:/cm/shared/apps/tmux/2.1/bin:/cm/shared/apps/libevent/2.1.5-beta/bin:/cm/shared/apps/java/jdk1.8.0_112/bin:/cm/shared/apps/python/3.6.0/bin:/cm/shared/apps/cuda/8.0/bin:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/binutils:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin \
external/bazel_tools/tools/jdk/ijar/ijar external/scala/lib/scala-reflect.jar bazel-out/host/genfiles/external/scala/_ijar/scala-reflect/external/scala/lib/scala-reflect-ijar.jar)
>>>>> # @scala//:scala-reflect [action 'Extracting interface @scala//:scala-reflect']
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
LD_LIBRARY_PATH=/cm/shared/gcc/6.4.0/lib64:/cm/shared/gcc/6.4.0/lib:/cm/shared/apps/mpc/1.0.3/lib:/cm/shared/apps/gcc/4.9.2/gmp-6.0/lib:/cm/shared/apps/mpfr/3.1.3/lib:/cm/shared/apps/sqlite3/3.15.0/lib:/cm/shared/apps/libevent/2.1.5-beta/lib:/cm/shared/apps/cudnn/6.0/lib64:/cm/shared/apps/java/jdk1.8.0_112/lib:/cm/shared/apps/python/3.6.0/lib:/cm/shared/apps/cuda/8.0/lib64:/cm/shared/apps/binutils/2.25/src/lib:/cm/shared/apps/slurm/current/lib/slurm:/cm/shared/apps/slurm/current/lib:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64:/home-4/[email protected]/lib:/home-4/[email protected]/opt/lib \
PATH=/cm/shared/gcc/6.4.0/bin:/home-4/[email protected]/go/bin:/home-4/[email protected]/.local/bin:/home-4/[email protected]/opt/go/bin:/home-4/[email protected]/maven/bin:/home-4/[email protected]/arcanist/bin:/home-4/[email protected]/opt/bin:/cm/shared/apps/sqlite3/3.15.0/bin:/cm/shared/apps/tmux/2.1/bin:/cm/shared/apps/libevent/2.1.5-beta/bin:/cm/shared/apps/java/jdk1.8.0_112/bin:/cm/shared/apps/python/3.6.0/bin:/cm/shared/apps/cuda/8.0/bin:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/binutils:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin \
external/bazel_tools/tools/jdk/ijar/ijar external/scala/lib/scala-reflect.jar bazel-out/local-fastbuild/genfiles/external/scala/_ijar/scala-reflect/external/scala/lib/scala-reflect-ijar.jar)
>>>>> # @scala//:scala-compiler [action 'Extracting interface @scala//:scala-compiler']
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
LD_LIBRARY_PATH=/cm/shared/gcc/6.4.0/lib64:/cm/shared/gcc/6.4.0/lib:/cm/shared/apps/mpc/1.0.3/lib:/cm/shared/apps/gcc/4.9.2/gmp-6.0/lib:/cm/shared/apps/mpfr/3.1.3/lib:/cm/shared/apps/sqlite3/3.15.0/lib:/cm/shared/apps/libevent/2.1.5-beta/lib:/cm/shared/apps/cudnn/6.0/lib64:/cm/shared/apps/java/jdk1.8.0_112/lib:/cm/shared/apps/python/3.6.0/lib:/cm/shared/apps/cuda/8.0/lib64:/cm/shared/apps/binutils/2.25/src/lib:/cm/shared/apps/slurm/current/lib/slurm:/cm/shared/apps/slurm/current/lib:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64:/home-4/[email protected]/lib:/home-4/[email protected]/opt/lib \
PATH=/cm/shared/gcc/6.4.0/bin:/home-4/[email protected]/go/bin:/home-4/[email protected]/.local/bin:/home-4/[email protected]/opt/go/bin:/home-4/[email protected]/maven/bin:/home-4/[email protected]/arcanist/bin:/home-4/[email protected]/opt/bin:/cm/shared/apps/sqlite3/3.15.0/bin:/cm/shared/apps/tmux/2.1/bin:/cm/shared/apps/libevent/2.1.5-beta/bin:/cm/shared/apps/java/jdk1.8.0_112/bin:/cm/shared/apps/python/3.6.0/bin:/cm/shared/apps/cuda/8.0/bin:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/binutils:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin \
external/bazel_tools/tools/jdk/ijar/ijar external/scala/lib/scala-compiler.jar bazel-out/local-fastbuild/genfiles/external/scala/_ijar/scala-compiler/external/scala/lib/scala-compiler-ijar.jar)
>>>>> # @io_bazel_rules_scala_org_tpolecat_tut_core//jar:jar [action 'Extracting interface @io_bazel_rules_scala_org_tpolecat_tut_core//jar:jar']
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
LD_LIBRARY_PATH=/cm/shared/gcc/6.4.0/lib64:/cm/shared/gcc/6.4.0/lib:/cm/shared/apps/mpc/1.0.3/lib:/cm/shared/apps/gcc/4.9.2/gmp-6.0/lib:/cm/shared/apps/mpfr/3.1.3/lib:/cm/shared/apps/sqlite3/3.15.0/lib:/cm/shared/apps/libevent/2.1.5-beta/lib:/cm/shared/apps/cudnn/6.0/lib64:/cm/shared/apps/java/jdk1.8.0_112/lib:/cm/shared/apps/python/3.6.0/lib:/cm/shared/apps/cuda/8.0/lib64:/cm/shared/apps/binutils/2.25/src/lib:/cm/shared/apps/slurm/current/lib/slurm:/cm/shared/apps/slurm/current/lib:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/compiler/lib/intel64:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/mkl/lib/intel64:/home-4/[email protected]/lib:/home-4/[email protected]/opt/lib \
PATH=/cm/shared/gcc/6.4.0/bin:/home-4/[email protected]/go/bin:/home-4/[email protected]/.local/bin:/home-4/[email protected]/opt/go/bin:/home-4/[email protected]/maven/bin:/home-4/[email protected]/arcanist/bin:/home-4/[email protected]/opt/bin:/cm/shared/apps/sqlite3/3.15.0/bin:/cm/shared/apps/tmux/2.1/bin:/cm/shared/apps/libevent/2.1.5-beta/bin:/cm/shared/apps/java/jdk1.8.0_112/bin:/cm/shared/apps/python/3.6.0/bin:/cm/shared/apps/cuda/8.0/bin:/cm/shared/apps/binutils/2.25/src/bin:/cm/shared/apps/binutils:/cm/shared/apps/slurm/current/sbin:/cm/shared/apps/slurm/current/bin:/cm/shared/apps/parallel_studio_xe_2015_update2/composer_xe_2015.2.164/bin/intel64:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/3.2.10/bin:/opt/dell/srvadmin/bin \
external/bazel_tools/tools/jdk/ijar/ijar external/io_bazel_rules_scala_org_tpolecat_tut_core/jar/tut-core_2.11-0.4.8.jar bazel-out/local-fastbuild/genfiles/external/io_bazel_rules_scala_org_tpolecat_tut_core/jar/_ijar/jar/external/io_bazel_rules_scala_org_tpolecat_tut_core/jar/tut-core_2.11-0.4.8-ijar.jar)
ERROR: /home-4/[email protected]/rules_scala/src/scala/scripts/BUILD:41:1: error executing shell command: '
rm -f bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar
external/bazel_tools/tools/zip/zipper/zipper c bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar @ba...' failed (Exit 1): process-wrapper failed: error executing command
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
/home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala/_bin/process-wrapper '--timeout=-1' '--kill_delay=15' /bin/bash -c '
rm -f bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar
external/bazel_tools/tools/zip/zipper/zipper c bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar @bazel-out/local-fastbuild/bin/src/scala/scripts/bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar_zipper_args
').
/home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala/_bin/process-wrapper: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala/_bin/process-wrapper)
INFO: Elapsed time: 0.820s, Critical Path: 0.14s
From the log message, you can see the last command doesn't have PATH and LD_LIBRARY_PATH propagated but the others have. I highlighted the command that reports the error:
(cd /home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala && \
exec env - \
/home-4/[email protected]/.cache/bazel/[email protected]/12dd3863654b107695e643fa774ca856/execroot/io_bazel_rules_scala/_bin/process-wrapper '--timeout=-1' '--kill_delay=15' /bin/bash -c '
rm -f bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar
external/bazel_tools/tools/zip/zipper/zipper c bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar @bazel-out/local-fastbuild/bin/src/scala/scripts/bazel-out/local-fastbuild/bin/src/scala/scripts/scalapb_generator.jar_zipper_args
')
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
I have a problem using bazel to build the rules_scala on a custom platform. I am sure it is because the shell envs are not propagated correctly to a subprocess that is spawned by some actions of bazel. Please see the log information that I provide in the last section.
If possible, provide a minimal example to reproduce the problem:
Environment info
Operating System:
CentOS 6.7
Bazel version (output of
bazel info release):0.8.1
If
bazel info releasereturns "development version" or "(@Non-Git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD):Have you found anything relevant by searching the web?
(e.g. StackOverflow answers,
GitHub issues,
email threads on the
bazel-discussGoogle group)Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
The command I ran to build rules_scala is
bazel build -s --verbose_failures --sandbox_debug //src/...From the log message, you can see the last command doesn't have PATH and LD_LIBRARY_PATH propagated but the others have. I highlighted the command that reports the error: