Hi,

Ian Wienand, le Tue 15 May 2007 10:04:57 +1000, a écrit :
> On 5/14/07, Brice.Goglin <[EMAIL PROTECTED]> wrote:
> >libnuma does not depend on the kernel interface as much as libc6 does,
> >but libc6-dev does provide libc.a.
> 
> The only argument I really buy is that static libraries can be faster,

Ok.

> I don't see what part of libnuma could be on the critical-path
> (and if it is, the extra jump will be nothing compared to the
> overheads of allocating/migrating/pinning memory, etc).

Agreed.

> libc could conceivably be on the critical-path of an application
> ...

And libc is far from being alone.  Having to specify by hand (i.e.
giving the full .a path) all libraries that should get linked statically
is quite tedious, particularly since you have to specify the full path,
which can depend on the setup (/usr/local/, /opt/, ...), so just giving
-static is what people always do.

> IMO you're doing yourself a dis-service by not using it as a shared
> library; you can can't get the advantages of code sharing,

In high-performance computing case, usually only one application is
running on the machine (and libnuma is not so big ;) ).

> you can easily miss bug fix updates, you open yourself to bugs from
> version skew, etc.

As I said, people who use -static generally keep recompiling their
application, so that's fine.

> >If we send a patch, would you apply it?
> 
> I want the package to be useful, and if not having a static library is
> making your life difficult

It is indeed.  Here is a patch.

Thanks,
Samuel
diff -ur numactl-0.9.11/Makefile numactl-0.9.11-mine/Makefile
--- numactl-0.9.11/Makefile     2006-10-31 01:10:26.000000000 +0100
+++ numactl-0.9.11-mine/Makefile        2007-05-15 09:19:13.000000000 +0200
@@ -17,7 +17,7 @@
 endif
 
 CLEANFILES := numactl.o libnuma.o numactl numademo numademo.o distance.o \
-             memhog libnuma.so libnuma.so.1 numamon numamon.o syscall.o 
bitops.o \
+             memhog libnuma.so libnuma.so.1 libnuma.a numamon numamon.o 
syscall.o bitops.o \
              memhog.o util.o stream_main.o stream_lib.o shm.o stream \
              test/pagesize test/tshared test/mynode.o test/tshared.o mt.o \
              test/mynode test/ftok test/prefered test/randmap \
@@ -66,6 +66,10 @@
 libnuma.so.1: libnuma.o syscall.o distance.o
        ${CC} -shared -Wl,-soname=libnuma.so.1 -o libnuma.so.1 $^
 
+libnuma.a: libnuma.o syscall.o distance.o
+       ar rc $@ $^
+       ranlib $@
+
 libnuma.so: libnuma.so.1
        ln -sf libnuma.so.1 libnuma.so
 
@@ -106,7 +110,7 @@
 
 MANPAGES := numa.3 numactl.8 numastat.8 migratepages.8
 
-install: numactl migratepages numademo.c numamon memhog libnuma.so.1 numa.h 
numaif.h numastat ${MANPAGES}
+install: numactl migratepages numademo.c numamon memhog libnuma.so.1 libnuma.a 
numa.h numaif.h numastat ${MANPAGES}
        mkdir -p ${prefix}/bin
        cp numactl ${prefix}/bin
        cp migratepages ${prefix}/bin
@@ -119,6 +123,7 @@
        cp numa_maps.5 ${prefix}/share/man/man5
        mkdir -p ${libdir}
        cp libnuma.so.1 ${libdir}
+       cp libnuma.a ${libdir}
        cd ${libdir} ; ln -sf libnuma.so.1 libnuma.so
        mkdir -p ${prefix}/include
        cp numa.h numaif.h ${prefix}/include
diff -ur numactl-0.9.11/debian/libnuma-dev.install 
numactl-0.9.11-mine/debian/libnuma-dev.install
--- numactl-0.9.11/debian/libnuma-dev.install   2007-05-15 09:15:05.000000000 
+0200
+++ numactl-0.9.11-mine/debian/libnuma-dev.install      2007-05-15 
09:14:06.000000000 +0200
@@ -1,2 +1,3 @@
 debian/tmp/usr/include/
 debian/tmp/usr/lib/libnuma.so
+debian/tmp/usr/lib/libnuma.a

Reply via email to