
I'm trying to build PortMidi on the mac, and get the error shown below. It appears that an OSX header is trying to include a Block.h file and getting the GHC Block.h instead of the one it expects. I'm new to Haskell and even newer to cabal, so I'm not sure how to go about solving this. Incidentally, cabal, cabal-install, and the system PortMidi libraries are all up-to-date. %cabal install PortMidi Resolving dependencies... Configuring PortMidi-0.1.3... Preprocessing library PortMidi-0.1.3... Building PortMidi-0.1.3... [1 of 1] Compiling Sound.PortMidi ( Sound/PortMidi.hs, dist/build/Sound/PortMidi.o ) In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:28, from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:218, from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20, from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21, from portmidi/pm_mac/pmmacosxcm.c:38:0: /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:51:0: error: expected specifier-qualifier-list before ‘StgPtr’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:108:0: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bdescr’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:163:0: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:174:0: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:187:0: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:198:0: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:219:0: error: expected ‘)’ before ‘n’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:223:0: error: expected ‘)’ before ‘n’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:235:0: error: expected declaration specifiers or ‘...’ before ‘nat’ /Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include/Block.h:241:0: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘StgWord’ cabal: Error: some packages failed to install: PortMidi-0.1.3 failed during the building phase. The exception was: exit: ExitFailure 1 -- Brian