Re: 1,000 packages, so let's build a few!

Duncan Coutts wrote:
Some are trivial and should be done away with. For example the ones that just check if a C header / lib is present are unnecessary (and typically do not work correctly). The next point release of Cabal can do these checks automatically, eg:
Configuring foo-1.0... cabal: Missing dependencies on foreign libraries: * Missing header file: foo.h * Missing C libraries: foo, bar, baz This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Thank you! Thank you! Thank you! For those of us who want to write cross-platform (i.e. Windows) bindings to C libraries, this is great news. John Lato

jwlato:
Duncan Coutts wrote:
Some are trivial and should be done away with. For example the ones that just check if a C header / lib is present are unnecessary (and typically do not work correctly). The next point release of Cabal can do these checks automatically, eg:
Configuring foo-1.0... cabal: Missing dependencies on foreign libraries: * Missing header file: foo.h * Missing C libraries: foo, bar, baz This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Thank you! Thank you! Thank you!
For those of us who want to write cross-platform (i.e. Windows) bindings to C libraries, this is great news.
It will be important now to report the lack of uses of these portability tests back to the authors of packages. A start would be to have hackage warn, I suppose. -- Don

On Mon, 2009-02-02 at 08:29 -0800, Don Stewart wrote:
jwlato:
Duncan Coutts wrote:
Some are trivial and should be done away with. For example the ones that just check if a C header / lib is present are unnecessary (and typically do not work correctly). The next point release of Cabal can do these checks automatically, eg:
Configuring foo-1.0... cabal: Missing dependencies on foreign libraries: * Missing header file: foo.h * Missing C libraries: foo, bar, baz This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Thank you! Thank you! Thank you!
For those of us who want to write cross-platform (i.e. Windows) bindings to C libraries, this is great news.
It will be important now to report the lack of uses of these portability tests back to the authors of packages.
Note that to get the above checks authors don't have to do anything except list the C libs in the extra-libraries field as normal. No Setup.hs code or ./configure scripts are required (though it should work with packages that do use ./configure scripts).
A start would be to have hackage warn, I suppose.
I'm not quite sure what we can warn about here except the general use of configure scripts (which is not a good idea at least at the moment). We need to work out what everone is using them for first: http://hackage.haskell.org/trac/hackage/ticket/482 Duncan

On Mon, 2009-02-02 at 13:22 +0000, John Lato wrote:
Duncan Coutts wrote:
Some are trivial and should be done away with. For example the ones that just check if a C header / lib is present are unnecessary (and typically do not work correctly). The next point release of Cabal can do these checks automatically, eg:
Configuring foo-1.0... cabal: Missing dependencies on foreign libraries: * Missing header file: foo.h * Missing C libraries: foo, bar, baz This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Thank you! Thank you! Thank you!
Gleb Alexeyev did the majority of the work on this one. I'm most grateful to him for heeding my recent calls for more volunteers for Cabal hacking.
For those of us who want to write cross-platform (i.e. Windows) bindings to C libraries, this is great news.
Yes. The next step will be for the cabal-install dependency planner to use this information and to complain at the planning stage rather than failing once it starts to try to build things. Duncan

Duncan Coutts wrote:
Gleb Alexeyev did the majority of the work on this one. I'm most grateful to him for heeding my recent calls for more volunteers for Cabal hacking.
I guess you're overstating my contribution a little, but thanks :).
participants (4)
-
Don Stewart
-
Duncan Coutts
-
Gleb Alexeyev
-
John Lato