tulip-control / dd

Binary Decision Diagrams (BDDs) in pure Python and Cython wrappers of CUDD, Sylvan, and BuDDy
https://pypi.org/project/dd
Other
182 stars 39 forks source link

steps for installing BuDDy and `dd.buddy` #50

Closed h3ssto closed 4 years ago

h3ssto commented 4 years ago

Python: Python 3.8.2 OS: 5.6.2-arch1-2

python setup.py install --fetch --buddy installs CUDD and then fails while compiling BuDDy with

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/home/h3ssto/_git/masterarbeit/code/dd_test/.venv/include -I/usr/include/python3.8 -c dd/buddy.c -o build/temp.linux-x86_64-3.8/dd/buddy.o
dd/buddy.c:541:10: fatal error: bdd.h: No such file or directory
  541 | #include "bdd.h"
      |          ^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
johnyf commented 4 years ago

BuDDy can be downloaded and compiled with the following (the option --fetch downloads and builds only CUDD):

curl -L https://sourceforge.net/projects/buddy/files/buddy/BuDDy%202.4/buddy-2.4.tar.gz/download -o buddy-2.4.tar.gz
tar -xzf buddy-2.4.tar.gz
cd buddy-2.4/
./configure  # as described in the README file of BuDDy
make
make install  # installs to `/usr/local/include/` and `/usr/local/lib/`
# The installation location can be changed with `./configure --prefix=/where/to/install`

pip uninstall -y dd
python setup.py install --buddy  # passes `-lbdd` to the compiler

and in another directory:

python -c "import dd.buddy"

The relevant lines for compiling the Cython extension dd.buddy are (the -lbdd above originates from these lines):

https://github.com/tulip-control/dd/blob/b7d625eb0f8b2b0455a847cc46512bbeed177414/download.py#L110-L113

johnyf commented 4 years ago

936d460aa3cd79ce47c1fe5a91140447b32f6bfe added the above (https://github.com/tulip-control/dd/issues/50#issuecomment-613483991) installation instructions for BuDDy to the file README.md.