[libdispatch-dev] [PATCH] missing kqueue libs in testing/Makefile.am
Mark Heily
mark at heily.com
Tue Nov 17 17:40:53 PST 2009
Paolo Bonzini wrote:
> On 11/17/2009 06:09 PM, Mario Schwalbe wrote:
>> Using -Wl,-rpath,/libkqueuedir is a better solution then and adding
>> libdispatch_la_LDFLAGS=-Wl,-rpath,/libkqueuedir works, but how do we
>> extract the path from the $(KQUEUE_LIBS)?
>
> You need to do that manually, or change libkqueue to use libtool. That
> would automagically fix the problem too.
>
Mario,
I just committed r100 which generates and installs a Libtool-compatible
libkqueue.la file into $LIBDIR. This should simplify the handling of
inter-library dependencies, as well as make it easier to use a non-standard
installation path.
I'm working on integrating libkqueue.la with libdispatch, and will send a
patch shortly.
Regards,
- Mark
P.S. Here is a transcript of my testing using libkqueue.la:
$ ./configure --prefix=/tmp/bar
checking operating system type.. linux
checking for a BSD-compatible install.. /usr/bin/install
checking for sys/epoll.h.. yes
checking for sys/inotify.h.. yes
checking for sys/signalfd.h.. yes
checking for sys/timerfd.h.. yes
checking for sys/eventfd.h.. yes
Creating libkqueue.pc
Creating libkqueue.la
Creating rpm.spec
Creating config.h
Creating config.mk
$ make
cc -fPIC -I./include -I./src/common -Wall -Werror -c src/common/*.c
src/linux/proc.c src/linux/signal.c src/linux/socket.c src/linux/timer.c
src/linux/user.c src/linux/vnode.c
ar rcs libkqueue.a *.o
gcc -shared -Wl,-soname,libkqueue.so -o libkqueue.so *.o
$ make install
/usr/bin/install -d -m 755 /tmp/bar/include/kqueue/sys
/usr/bin/install -m 644 include/sys/event.h /tmp/bar/include/kqueue/sys/event.h
/usr/bin/install -d -m 755 /tmp/bar/lib
/usr/bin/install -m 644 libkqueue.so libkqueue.la libkqueue.a /tmp/bar/lib
/usr/bin/install -d -m 755 /tmp/bar/lib/pkgconfig
/usr/bin/install -m 644 libkqueue.pc /tmp/bar/lib/pkgconfig
/usr/bin/install -d -m 755 /tmp/bar/share/man/man2
/usr/bin/install -m 644 kqueue.2 /tmp/bar/share/man/man2/kqueue.2
/usr/bin/install -m 644 kqueue.2 /tmp/bar/share/man/man2/kevent.2
$ cd test
$ ./configure
checking operating system type.. linux
checking for a BSD-compatible install.. /usr/bin/install
checking for sys/event.h.. no
checking ../include/sys/event.h for EV_DISPATCH.. yes
checking ../include/sys/event.h for EV_RECEIPT.. yes
checking ../include/sys/event.h for NOTE_TRUNCATE.. no
checking ../include/sys/event.h for EVFILT_TIMER.. yes
checking ../include/sys/event.h for EVFILT_USER.. yes
Creating config.h
Creating config.mk
$ gcc -I/tmp/bar/include/kqueue -c *.c
$ libtool --mode=link gcc -g -O0 -o a.out *.o /tmp/bar/lib/libkqueue.la
libtool: link: gcc -g -O0 -o a.out main.o proc.o read.o signal.o timer.o
user.o vnode.o /tmp/bar/lib/libkqueue.so -L/tmp/bar/lib -lpthread -lrt
-Wl,-rpath -Wl,/tmp/bar/lib -Wl,-rpath -Wl,/tmp/bar/lib
$ ldd a.out
linux-vdso.so.1 => (0x00007fff63fff000)
libkqueue.so => /tmp/bar/lib/libkqueue.so (0x00007f7f5bafa000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f7f5b8de000)
librt.so.1 => /lib/librt.so.1 (0x00007f7f5b6d6000)
libc.so.6 => /lib/libc.so.6 (0x00007f7f5b364000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7f5bd03000)
More information about the libdispatch-dev
mailing list