Cabal and c2hs

Dominic Steinitz dominic.steinitz at blueyonder.co.uk
Sat Jul 5 03:30:48 EDT 2008


Dominic Steinitz wrote:
> Ignore my previous message, it was a lot simpler than I thought it was
> 
>> import Distribution.Simple
>> import Distribution.Simple.PreProcess
>>
>> main = 
>>    defaultMainWithHooks 
>>       defaultUserHooks {
>>          hookedPreProcessors =  
>>             [("chs", ppC2hs)]
>>       }
> 
> Dominic.
> 

But now I get a build error

> dom at lagrange:~/networktools/ping> ./Setup build
> Preprocessing executables for Ping-0.0...
> dist/build/ping/ping-tmp/IP_ICMP.chs.h:1:21: error: ip_icmp.h: No such file or directory
> c2hs: Error during preprocessing custom header file

But ip_icmp.h is there!

> dom at lagrange:~/networktools/ping> ls -ltr
> total 3104
> drwxr-xr-x 7 dom users    4096 2008-07-05 06:50 _darcs
> -rw-r--r-- 1 dom users    5487 2008-07-05 06:50 test.hs
> -rw-r--r-- 1 dom users     307 2008-07-05 06:50 Setup.hs~
> -rw-r--r-- 1 dom users     250 2008-07-05 06:50 ping.cabal
> -rw-r--r-- 1 dom users     591 2008-07-05 06:50 Makefile
> -rw-r--r-- 1 dom users     787 2008-07-05 06:50 ip_icmp.h
> -rw-r--r-- 1 dom users     212 2008-07-05 06:50 IP_ICMP.chs
> -rw-r--r-- 1 dom users   18011 2008-07-05 06:50 gpl.txt
> -rw-r--r-- 1 dom users     487 2008-07-05 08:03 Setup.hi
> -rw-r--r-- 1 dom users    3684 2008-07-05 08:16 Setup.o
> -rwxr-xr-x 1 dom users 3048919 2008-07-05 08:16 Setup
> -rw-r--r-- 1 dom users     195 2008-07-05 08:17 Setup.hs
> drwxr-xr-x 3 dom users    4096 2008-07-05 08:22 dist
> -rw-r--r-- 1 dom users     128 2008-07-05 08:26 IP_ICMP.i

How do I tell cabal that ip_icmp.h is in the current directory not
buried somewhere?

Thanks, Dominic.



More information about the Libraries mailing list