[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Compiling binaries on package installation



Hi,

On Tue, Oct 14, 2014 at 02:00:08PM +0200, L.C. Karssen wrote:
> I'm working on a tool that uses linear algebra libraries like Lapack and
> OpenBLAS.
> Normally I would compile the tool on the user's machine upon
> installation (using e.g. the -march=native GCC option) in order to
> achieve proper performance. Is there a way to do this in a Debian
> package so that it compiles the binary when you install the package?
> Maybe in a similar way as some kernel modules are compiled?

Building a whole package on install looks like the wrong (from a Debian
point of view) approach.

I think what we need is a tool more like module-assistent, which makes
it easy to rebuild some performace-critical packages on the user's box
with native optimisation.
 
If your project is using advanced CPU instructions (I guess not,
but...), then runtime detection like fftw3 is doing it would be an
option.

> Or should I point out how to "compile your own", like it is done in the
> "Building an optimized OpenBLAS packages on your architecture" in the
> README.Debian file of openblas-base?

Not sure what's in those files, but I suggest to support
DEB_BUILD_OPTIONS=custom in your Debian packaging, which would build an
optimized package for a the user.  That's what the ATLAS package are
(were?) doing, and if we have enough packages like that, doing the m-a
like tool as mentioned above would be a matter of knowing which packages
do support it.


Michael


Reply to: