eurecom-s3 / loaders_modeling

22 stars 3 forks source link

Error when running generate.py on Ubuntu 22.04 and 20.04 #3

Open clemoctohub opened 1 year ago

clemoctohub commented 1 year ago

Hi, I tried your tool which I like a lot but I have an issue when running the generate.py file.

I ran the installation process just as you explained it on Ubuntu 22.04 and 20.04. Everything went well, the file verify.py seems to work perfectly. However when I ran the generate.py file as you did in the example I got this error :

Traceback (most recent call last):
  File "/home/xxxxx/Documents/loaders_modeling/./generate.py", line 68, in <module>
    backend = Z3Backend(name=modelname, voi=voi)
  File "/home/xxxxx/Documents/loaders_modeling/modelLang/backends/z3_backend.py", line 21, in __init__
    self.z3_funcs = { 'ADD'       : Sum,
NameError: name 'Sum' is not defined. Did you mean: 'sum'?

I did some research about where it could come from but didn't find anything..

Do you have any idea about what is the problem ?

P.S. : I installed z3 as explained using apt

mpuzz commented 1 year ago

Hello!

Apparently there is a bug in the version of the cffi package specified in the requirements file, which made if fail to build with modern gcc (like the one shipped with Ubuntu 22.04).

80d105df90169b54539360cd100fd8bd238cc348 updates the requirement file to fetch a newer version of this package. Can you check that it fixes the problem for you?