Cool C libraries we could have on hackage server

Erik de Castro Lopo mle+hs at
Thu Jun 4 23:09:12 EDT 2009

Maurí­cio wrote:

> hsndfile actually carries the one file it needs (sndfile.h)
> with itself.

On Unix I would not consider that best practice but it is
understandable if you want windows compatibility.

> It doesn't ensure much
> compatibility between versions of the base library, although
> I don't know libsnd enough to say if this is a problem to this
> particular package.

As the upstream author of libsndfile I know that an early header
file with a later version of the library is ok as long as you stick
with version 1.0.x of the library.

Later header file with an earlier version of the library (with the
1.0.x series) can in theory, lead to problems that require runtime
checks of the libsndfile version to work around.

> My impression was that the server was kept at an old version,
> maybe for reliability issues, since I did 'apt-cache' and didn't
> find libusb-1.0, only the old libusb-0.1, but I understand
> nothing of debian or good practices on server management. I
> just thought that if upgrading the server was an issue, let us
> build packages outside its package management tool.

In my day job I am responsible for a quite sophisticated build
system built on top of Debian and producing Debian packages as
its main output.

This autobuilder builds everything in a minimal chroot environment
satisfies all the build dependancies, builds the package, uploads
it to our own debian respoitory before trying to install it (from 
the repositry) in a second chroot environment thereby ensuring
runtime dependancies are also working.

This system (a bit of a hack and lacks a bunch of generality and
configurability) works pretty damn well.

> Exactly! You need those libraries installed so that cabal accepts
> building your pkg-config dependent package. 

What I was getting at with my description above (and knowing nothing
about how hackage actually works) is that you should not have to
install the library on the server itself, but that the package should
be built in a minimal chroot and the build procedure should pull in
the required dependancies.

> I do want to release
> an installer with a set of libraries in my bindings-* packages
> with pkg-config for Windows too.

A system like I described above should work on any Unix-like system.
Windows (and to some extent Mac OSX), because it lacks :

  - A standard packaging tool.
  - A standard location for header files.
  - A standard location for library binaries.
  - A standard set of tools for asking the system what is installed.

makes building code in high level languages that link to C libraries
a royal PITA.

Erik de Castro Lopo

More information about the Libraries mailing list