cabal posix build-depends issue

Simon Marlow simonmar at
Tue Jan 18 05:14:53 EST 2005

On 17 January 2005 18:24, Malcolm Wallace wrote:

> Isaac Jones writes:
>>> If it depends on posix, on a non-posix system, the user will get an
>>> error because the posix package doesn't exist.
>>> If it doesn't depend on posix on a posix-based system, then ghc
>>> won't get the -package posix flag, and so cabal will fail to link.
> There is a further problem: nhc98 has neither posix nor util packages,
> so a straightforward dependency on either would be wrong.

In general yes - in this particular case I don't see why nhc98 can't
provide the unix package (not the posix package - that's the old
non-hierarchical version, sorry for the confusion).  There might be
minor porting issues, but it's mostly just FFI code.

> Simon Marlow writes:
>> My gut feeling is that we should be able to say something like
>>   build-depends: if-not-os("mingw32",unix >= 1.0)
> I would agree that we need platform-selected dependencies.  Platform
> includes compiler, compiler version, OS, and possibly OS version.



More information about the Libraries mailing list