scallop-lang / scallop

Framework and Language for Neurosymbolic Programming. Join Our Discord: https://discord.gg/RavzdND229
https://www.scallop-lang.org
MIT License
182 stars 9 forks source link

Failed to build Scallopy #7

Closed QianLongLongLong closed 1 year ago

QianLongLongLong commented 1 year ago

Encountered the following issue when trying to build Scallop:

(scallop-lab) ql@dcd222:~/repos/scallop/etc/scallopy$ make
maturin develop --release
šŸ¹ Building a mixed python/rust project
šŸ”— Found pyo3 bindings
šŸ Found CPython 3.8 at /home/ql/anaconda3/envs/scallop-lab/bin/python
warning: /home/ql/repos/scallop/etc/scallopy/Cargo.toml: unused manifest key: package.default
   Compiling pyo3-ffi v0.18.3
   Compiling pyo3 v0.18.3
   Compiling scallop-core v0.1.8 (/home/ql/repos/scallop/core)
error: failed to run custom build command for `scallop-core v0.1.8 (/home/ql/repos/scallop/core)`

Caused by:
  process didn't exit successfully: `/home/ql/repos/scallop/target/release/build/scallop-core-4685a492c91fb3f6/build-script-build` (exit status: 1)
  --- stdout
  processing file `./src/compiler/front/grammar.lalrpop`
  ./src/compiler/front/grammar.lalrpop:110:3: 110:35 error: invalid regular expression: regex parse error:
      -?\d+(\.\d+)(e-?\d+)?
        ^^
  error: Unicode-aware Perl class not found (make sure the unicode-perl feature is enabled)

  --- stderr
      r"-?\d+(\.\d+)(e-?\d+)?" => float,
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: build failed, waiting for other jobs to finish...
šŸ’„ maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit" PYO3_PYTHON="/home/ql/anaconda3/envs/scallop-lab/bin/python" PYTHON_SYS_EXECUTABLE="/home/ql/anaconda3/envs/scallop-lab/bin/python" "cargo" "rustc" "--release" "--manifest-path" "/home/ql/repos/scallop/etc/scallopy/Cargo.toml" "--message-format" "json" "--lib"`
make: *** [makefile:2: all] Error 1
Liby99 commented 1 year ago

It seems that our parser generation library LALRPOP introduced this breaking change. I have already fixed the problem in my local branch; will push shortly.

Liby99 commented 1 year ago

The bug has been fixed; closing due to the latest commit.