Closed guolin1 closed 3 years ago
Wow, thanks for the detailed bug report! I'll try reproducing this tomorrow once I get access to a machine with Docker. Looks like CMake failed to detect both the compiler and make executable.
Awesome. Thank you!
Hi @guolin1, I figured out what's going on. Bazel, the build system, has a bug that prevents it from working correctly with conda installed build tools.
I would recommend including your C++ compiler directly in your docker as a workaround for now. I tried that locally and it seems to work on my side.
I'll submit a pull request upstream to bazel later this week with the corresponding fix on their side (it's a subtle bug in their compiler detection code, it forgets to check the AR environmental variable).
Sorry for the trouble!
https://github.com/bazelbuild/bazel/pull/12541 appears to fix this issue.
Hi,
I ran into "Build failed" while attempting to install ehr_ml following your guide on 'https://som-shahlab.github.io/ehr_ml/setup.html'.
Output:
Creating virtualenv ehr-ml-81KIsM5H-py3.8 in /root/.cache/pypoetry/virtualenvs Installing dependencies from lock file
Package operations: 58 installs, 0 updates, 0 removals
• Installing certifi (2020.11.8) • Installing chardet (3.0.4) • Installing idna (2.10) • Installing markupsafe (1.1.1) • Installing pyparsing (2.4.7) • Installing pytz (2020.4) • Installing six (1.15.0) • Installing urllib3 (1.26.2) • Installing alabaster (0.7.12) • Installing babel (2.9.0) • Installing docutils (0.16) • Installing imagesize (1.2.0) • Installing jinja2 (2.11.2) • Installing lazy-object-proxy (1.4.3) • Installing mccabe (0.6.1) • Installing numpy (1.19.1) • Installing packaging (20.4) • Installing pycodestyle (2.6.0) • Installing pyflakes (2.2.0) • Installing pygments (2.7.2) • Installing requests (2.25.0) • Installing snowballstemmer (2.0.0) • Installing sphinxcontrib-applehelp (1.0.2) • Installing sphinxcontrib-devhelp (1.0.2) • Installing sphinxcontrib-htmlhelp (1.0.3) • Installing sphinxcontrib-jsmath (1.0.1) • Installing sphinxcontrib-qthelp (1.0.3) • Installing sphinxcontrib-serializinghtml (1.1.4) • Installing wrapt (1.12.1) • Installing appdirs (1.4.4) • Installing astroid (2.4.2) • Installing attrs (20.3.0) • Installing click (7.1.2) • Installing flake8 (3.8.4) • Installing joblib (0.17.0) • Installing more-itertools (8.6.0) • Installing mypy-extensions (0.4.3) • Installing pathspec (0.8.1) • Installing pluggy (0.13.1) • Installing py (1.9.0) • Installing pyyaml (5.3.1) • Installing regex (2020.11.11) • Installing scipy (1.5.4) • Installing sphinx (3.3.1) • Installing threadpoolctl (2.1.0) • Installing toml (0.10.2) • Installing typed-ast (1.4.1) • Installing typing-extensions (3.7.4.3) • Installing unidecode (1.1.1) • Installing wcwidth (0.2.5) • Installing black (19.10b0) • Installing flake8-future-import (0.4.6) • Installing isort (5.6.4) • Installing mypy (0.782) • Installing pytest (5.4.3) • Installing scikit-learn (0.23.2) • Installing sphinx-autoapi (1.5.1) • Installing sphinx-rtd-theme (0.5.0)
Installing the current project: ehr_ml (0.1.0) EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/ehr-ml-81KIsM5H-py3.8/bin/pip', 'install', '-e', '/home/lawrence/ehr_ml', '--no-deps'] errored with the following return code 1, and output: Obtaining file:///home/lawrence/ehr_ml Installing collected packages: ehr-ml Running setup.py develop for ehr-ml ERROR: Command errored out with exit status 1: command: /root/.cache/pypoetry/virtualenvs/ehr-ml-81KIsM5H-py3.8/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/lawrence/ehr_ml/setup.py'"'"'; file='"'"'/home/lawrence/ehr_ml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps cwd: /home/lawrence/ehr_ml/ Complete output (180 lines): running develop running egg_info creating ehr_ml.egg-info writing ehr_ml.egg-info/PKG-INFO writing dependency_links to ehr_ml.egg-info/dependency_links.txt writing entry points to ehr_ml.egg-info/entry_points.txt writing requirements to ehr_ml.egg-info/requires.txt writing top-level names to ehr_ml.egg-info/top_level.txt writing manifest file 'ehr_ml.egg-info/SOURCES.txt' reading manifest file 'ehr_ml.egg-info/SOURCES.txt' writing manifest file 'ehr_ml.egg-info/SOURCES.txt' running build_ext Extracting Bazel installation... Starting local Bazel server and connecting to it... Loading: Loading: 0 packages loaded INFO: SHA256 (https://github.com/bazelbuild/rules_foreign_cc/archive/master.zip) = 3e6b0691fc57db8217d535393dcc2cf7c1d39fc87e9adb6e7d7bab1483915110 DEBUG: Rule 'rules_foreign_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "3e6b0691fc57db8217d535393dcc2cf7c1d39fc87e9adb6e7d7bab1483915110" DEBUG: Repository rules_foreign_cc instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule http_archive defined at: /root/.cache/bazel/_bazel_root/b8e4070296da67f000f3840fb7b9b7a3/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in
Loading: 0 packages loaded
Analyzing: target //:extension.so (1 packages loaded)
Analyzing: target //:extension.so (1 packages loaded, 0 targets configured)
Analyzing: target //:extension.so (16 packages loaded, 35 targets configured)
Analyzing: target //:extension.so (16 packages loaded, 35 targets configured)
Analyzing: target //:extension.so (39 packages loaded, 577 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (41 packages loaded, 732 targets configured)
Analyzing: target //:extension.so (42 packages loaded, 794 targets configured)
Analyzing: target //:extension.so (42 packages loaded, 794 targets configured)
Analyzing: target //:extension.so (42 packages loaded, 794 targets configured)
Analyzing: target //:extension.so (42 packages loaded, 794 targets configured)
INFO: Analyzed target //:extension.so (47 packages loaded, 5926 targets configured).
INFO: Found 1 target...
[0 / 89] [Prepa] BazelWorkspaceStatusAction stable-status.txt ... (2 actions, 0 running)
ERROR: /home/lawrence/ehr_ml/native/BUILD:43:15: error executing shell command: '/bin/bash -c #!/usr/bin/env bash
function cleanup_function() {
local ecode=$?
if [ $ecode -eq 0 ]; then
cleanup_on_success
else
cleanup_on_failure
fi
}
set -e
function cleanup_on_success() {
printf...' failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)
ERROR: Command errored out with exit status 1: /root/.cache/pypoetry/virtualenvs/ehr-ml-81KIsM5H-py3.8/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/lawrence/ehr_ml/setup.py'"'"'; file='"'"'/home/lawrence/ehr_ml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
at /opt/conda/lib/python3.8/site-packages/poetry/utils/env.py:1074 in _run 1070│ output = subprocess.checkoutput( 1071│ cmd, stderr=subprocess.STDOUT, **kwargs 1072│ ) 1073│ except CalledProcessError as e: → 1074│ raise EnvCommandError(e, input=input) 1075│ 1076│ return decode(output) 1077│ 1078│ def execute(self, bin, *args, **kwargs):
conda list
Name Version Build Channel _libgcc_mutex 0.1 main brotlipy 0.7.0 py38h7b6447c_1000 anaconda ca-certificates 2020.10.14 0 anaconda certifi 2020.6.20 py38_0 anaconda cffi 1.14.3 py38he30daa8_0 anaconda chardet 3.0.4 py38_1003 anaconda conda 4.9.0 py38_0 anaconda conda-package-handling 1.7.2 py38h03888b9_0 anaconda cryptography 3.1.1 py38h1ba5d50_0 anaconda idna 2.10 py_0 anaconda ld_impl_linux-64 2.33.1 h53a641e_7 libedit 3.1.20181209 hc058e9b_0 libffi 3.3 he6710b0_2 anaconda libgcc-ng 9.1.0 hdf63c60_0 libstdcxx-ng 9.1.0 hdf63c60_0 ncurses 6.2 he6710b0_0 openssl 1.1.1h h7b6447c_0 anaconda pip 20.2.4 py38_0 anaconda pycosat 0.6.3 py38h7b6447c_1 anaconda pycparser 2.20 py_2 anaconda pyopenssl 19.1.0 py_1 anaconda pysocks 1.7.1 py38_0 anaconda python 3.8.3 hcff3b4d_0 anaconda readline 8.0 h7b6447c_0 anaconda requests 2.24.0 py_0 anaconda ruamel_yaml 0.15.87 py38h7b6447c_0 anaconda setuptools 50.3.0 py38hb0f4dca_1 anaconda six 1.15.0 py_0 anaconda sqlite 3.31.1 h7b6447c_0 tk 8.6.8 hbc83047_0 tqdm 4.42.1 py_0 urllib3 1.25.11 py_0 anaconda wheel 0.35.1 py_0 anaconda xz 5.2.5 h7b6447c_0 anaconda yaml 0.1.7 had09818_2 zlib 1.2.11 h7b6447c_3