C pre processor doing the wrong thing FreeBSD 12.1
Summary
As suggested from the mailing list thread there seems to be a bug in the c pre processor on FreeBSD. I was trying to build a a Haskell library which depended on the dbus package (haskell-dbus). It failed with Not in scope: type constructor or class ‘HsType’
. More on the error here. Nevermind that I set allow-newer. The error this is pasted from was a quick trail of building the haskell-dbus from cloning the git repo and there where some dep issues. I reproduced this error trying a few different stack lts's and nightly's as well as using a system ghc/cabal as well.
The lib/DBus/Internal/Types.hspp
ran with stack exec ghc -- -E -cpp
:
FreeBSD
VoidLinux
Steps to reproduce
From a fresh new install of 12.1 FreeBSD mkdir test && cd test && stack init && stack install dbus
Expected behavior
Would expect the dbus (haskell-dbus) package to be installed with no errors.
Environment
- GHC version used: 8.6.5 with stack and system installed, also tried stack with GHC 8.8.1
Optional:
- Operating System: FreeBSD 12.1
- System Architecture: x86_64