dreal / dreal4

Automated Reasoning in Nonlinear Theories of Reals
https://dreal.github.io
Apache License 2.0
150 stars 31 forks source link

Unable to build dreal #281

Closed alre5639 closed 2 years ago

alre5639 commented 2 years ago

While I am able to install dreal using: curl -fsSL https://raw.githubusercontent.com/dreal/dreal4/master/setup/ubuntu/20.04/install.sh | sudo bash I am unable to do the python binding pip3 install dreal

I am running this on a nvidia jetson agx orin (ARM processor, Ubuntu 20.04) Error

Collecting dreal
  Using cached dreal-4.20.4.1.tar.gz (266 kB)
Building wheels for collected packages: dreal
  Building wheel for dreal (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k_papjsp/dreal/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k_papjsp/dreal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-80478f8w
       cwd: /tmp/pip-install-k_papjsp/dreal/
  Complete output (17 lines):
  running bdist_wheel
  running build
  Building dReal
  Starting local Bazel server and connecting to it...
  Loading:
  Loading: 0 packages loaded
  Analyzing: 2 targets (2 packages loaded)
  Analyzing: 2 targets (2 packages loaded, 0 targets configured)
  ERROR: /tmp/pip-install-k_papjsp/dreal/third_party/com_github_google_kythe/tools/build_rules/lexyacc.bzl:27:64: invalid escape sequence: \.. Use '\\' to insert '\'.
  ERROR: /tmp/pip-install-k_papjsp/dreal/BUILD.bazel:23:10: While resolving toolchains for target //:libdreal.so: invalid registered toolchain '@dreal//third_party/com_github_google_kythe/tools/build_rules:lexyacc_remote_toolchain': error loading package 'third_party/com_github_google_kythe/tools/build_rules': compilation of module 'third_party/com_github_google_kythe/tools/build_rules/lexyacc.bzl' failed
  ERROR: Analysis of target '//:libdreal.so' failed; build aborted:
  INFO: Elapsed time: 3.475s
  INFO: 0 processes.
  FAILED: Build did NOT complete successfully (16 packages loaded, 7 targets configured)
  FAILED: Build did NOT complete successfully (16 packages loaded, 7 targets configured)
  error: Unable to build dReal.
  Please visit https://pypi.org/project/dreal and follow the instructions to install the prerequsites.
  ----------------------------------------
  ERROR: Failed building wheel for dreal
  Running setup.py clean for dreal
Failed to build dreal
Installing collected packages: dreal
    Running setup.py install for dreal ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k_papjsp/dreal/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k_papjsp/dreal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fb2w_5eh/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/arpg/.local/include/python3.8/dreal
         cwd: /tmp/pip-install-k_papjsp/dreal/
    Complete output (15 lines):
    running install
    running build
    Building dReal
    Loading:
    Loading: 0 packages loaded
    Analyzing: 2 targets (0 packages loaded, 0 targets configured)
    ERROR: /tmp/pip-install-k_papjsp/dreal/third_party/com_github_google_kythe/tools/build_rules/lexyacc.bzl:27:64: invalid escape sequence: \.. Use '\\' to insert '\'.
    ERROR: /tmp/pip-install-k_papjsp/dreal/dreal/BUILD.bazel:58:21: While resolving toolchains for target //dreal:_dreal_py.so: invalid registered toolchain '@dreal//third_party/com_github_google_kythe/tools/build_rules:lexyacc_remote_toolchain': error loading package 'third_party/com_github_google_kythe/tools/build_rules': compilation of module 'third_party/com_github_google_kythe/tools/build_rules/lexyacc.bzl' failed
    ERROR: Analysis of target '//dreal:_dreal_py.so' failed; build aborted:
    INFO: Elapsed time: 0.298s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    error: Unable to build dReal.
    Please visit https://pypi.org/project/dreal and follow the instructions to install the prerequsites.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k_papjsp/dreal/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k_papjsp/dreal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-fb2w_5eh/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/arpg/.local/include/python3.8/dreal Check the logs for full command output.

Bazel Version 5.3.0

soonhokong commented 2 years ago

Hi, for now, we have a dependency which doesn't support ARM64 architecture and that's why it fails to build in that platform.