tulip-control/dd

steps for installing BuDDy and `dd.buddy`

h3ssto opened this issue · 2 comments

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

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):

dd/download.py

Lines 110 to 113 in b7d625e

buddy=Extension(
'dd.buddy',
sources=['dd/buddy' + pyx],
libraries=['bdd']),

936d460 added the above (#50 (comment)) installation instructions for BuDDy to the file README.md.