ttuegel / alsa-mixer

Haskell bindings to the ALSA mixer API
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

c2hs error when installing #11

Closed lebensterben closed 3 years ago

lebensterben commented 3 years ago

I first tried to install this package via cabal, it shows error with c2hs.

Then I pulled the latest commit, and run cabal build,

Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
 - alsa-mixer-0.3.0 (lib:alsa-mixer) (first run)
Warning: alsa-mixer.cabal:34:38: version operators used. To use version
operators the package needs to specify at least 'cabal-version: >= 1.8'.
Configuring alsa-mixer-0.3.0...
Preprocessing library for alsa-mixer-0.3.0..
c2hs: C header contains errors:

/tmp/alsa-mixer/dist-newstyle/build/x86_64-linux/ghc-8.10.4/alsa-mixer-0.3.0/build/Sound/ALSA/Mixer/Internal.i:1: (column 1) [ERROR]  >>> Lexical error !
  The character '#' does not fit here.

If I go to Sound/ALSA/Mixer directory and manually run c2hs Internal.chs it throws the same error.


ghc: 8.10.4 c2hs: 0.28.7 gcc: 11.1.1

lebensterben commented 3 years ago

Closing since this is an upstream bug https://github.com/haskell/c2hs/issues/268