jrclogic / SMCDEL

A symbolic model checker for Dynamic Epistemic Logic.
https://w4eg.de/malvin/illc/smcdelweb
GNU General Public License v2.0
41 stars 9 forks source link

build with cabal #30

Closed m4lvin closed 10 months ago

m4lvin commented 1 year ago

Currently only stack build works, but cabal build fails.

Cabal seems to not deal with the CUDD and/or CacBDD dependency correctly. In particular it does not know about the custom cudd fork.

m4lvin commented 1 year ago

Small step of progress: after adding a cabal.project file (See https://cabal.readthedocs.io/en/3.4/cabal-project.html) cabal finds the fork, but it is unable to build it:

Configuring library for cudd-0.1.0.0..
Preprocessing library for cudd-0.1.0.0..
dist/build/Cudd/File.chs.h:2:10: fatal error: dddmp.h: No such file or directory
    2 | #include "dddmp.h"
      |          ^~~~~~~~~
compilation terminated.
c2hs: Error during preprocessing custom header file

A related issue came up (with HasCacBDD, not CUDD) around the release of Stack 2: https://github.com/commercialhaskell/stack/issues/4141 and the minimal example from back then is https://github.com/m4lvin/depender which depends on https://github.com/m4lvin/haskell-and-cpp and that combination also currently does not build with cabal.

m4lvin commented 10 months ago

There is also a build failure on Hackage, but it is not due to a missing header. Instead, it does not find a matching version of cudd at all, see here: https://hackage.haskell.org/package/smcdel-1.2.0/reports/2

m4lvin commented 10 months ago

The problem of not finding dddmp.h was actually due to the cudd haskell package from https://github.com/m4lvin/cudd which did not include header files. Since https://github.com/m4lvin/cudd/commit/d35e3101d44c85584d219a92836a644b3f6d0d0f there this is now fixed.

And here on the next branch, since https://github.com/jrclogic/SMCDEL/commit/901bf96bae71b6d95b82109818ecdeb93c2e6fa8 the cabal.project poins to a newer cudd commit and locally cabal build now works :tada:

However, it will probably still not work on Hackage where cudd refers to https://hackage.haskell.org/package/cudd and not my fork. Or does Hackage respect cabal.project files? :thinking: