toon-members
[Top][All Lists]
Advanced

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

Re: [Toon-members] pkgconfig support


From: Pekka Paalanen
Subject: Re: [Toon-members] pkgconfig support
Date: Tue, 22 Jun 2010 10:46:23 +0300

On Tue, 22 Jun 2010 12:04:35 +0930
Michael Marner <address@hidden> wrote:

> I have been attempting to package TooN a bit nicer for Ubuntu/Debian.
> One of the things I've done is add support for pkg-config. This is
> needed so that projects using TooN will correctly link against lapack,
> etc. when using pkg-config to set linker flags. Attached is a diff of
> the cvs repository which adds support for pkg-config. All that is
> needed is to re-execute autoconf to bring the configure script up to
> date.
> 
> It would be good if other people could test this, and maybe get the
> changes added to the cvs repository. If there are any problems let me
> know.

Hi,

I haven't tested this, but I have some comments.


--- TooN/TooN.pc.in     1970-01-01 09:30:00.000000000 +0930
+++ TooN_new/TooN.pc.in 2010-06-22 11:49:23.460045915 +0930
@@ -0,0 +1,10 @@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
+
+Name: TooN
+Description: Tom's Object-oriented numerics library
+Version: @VERSION@
+Libs: -L${libdir} -llapack -lblas -lg2c
+Cflags: -I${includedir}

Isn't $libdir here the directory where TooN is, not where
lapack is? That is, is it necessary?

You are hardcoding, what libraries to link for LAPACK, I don't
think this is good, since different LAPACK implementations
need different libraries, for instance, see the discussion:
https://bugs.gentoo.org/show_bug.cgi?id=321815#c9

If you look at the original levmar Makefile, you see many
different configurations for linking to different LAPACK
implementations.

For instance, with lapack-atlas, I do not need -lg2c, but
the library itself links to libgfortran. On Gentoo
'pkg-config --libs lapack' gives "-llapack -lblas -lcblas -latlas", but
that seems redundant, since liblapack.so already links blas, cblas and
atlas.

I'm just saying that this is not as trivial as it may look like.
Since Ubuntu does not provide (to my knowledge, I use only Gentoo)
a lapack.pc file, I'm not sure there is a good solution.

Since TooN has autoconf, why not use an autoconf LAPACK macro?
Perhaps http://www.gnu.org/software/autoconf-archive/ax_lapack.html
I'm sure there are also ready-made macros for pkg-config.

It would be excellent if this whole LAPACK linking issue was solved in
TooN, and other projects could simply use 'pkg-config --libs TooN'.

Just my 2c.


Cheers.

-- 
Pekka Paalanen, M.Sc. (Eng.)   LUT/IT, room 6505
doctoral student               http://www.it.lut.fi/project/rtmosaic/
address@hidden          http://www.iki.fi/pq/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]