Package: dpkg Version: 1.13.22 Severity: serious Justification: no longer builds from source
Hello, Since libselinux (1.30.28-1), dpkg fails to build from source. The failing command is the following: gcc -std=gnu99 -Wall -g -O2 -Wl,-O1 -o dpkg archives.o cleanup.o configure.o depcon.o enquiry.o errors.o filesdb.o help.o main.o packages.o processarc.o remove.o select.o update.o ../lib/libdpkg.a -Wl,-Bstatic -lz -Wl,-Bdynamic -Wl,-Bstatic -lbz2 -Wl,-Bdynamic -Wl,-Bstatic -lselinux -lpthread -lsepol -Wl,-Bdynamic processarc.o: In function `process_archive': ../../src/processarc.c:166: warning: the use of `tmpnam' is dangerous, better use `mkstemp' /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(ptw-write.o): In function `write': <stdin>:(.text+0x25): undefined reference to `__syscall_error' <stdin>:(.text+0x55): undefined reference to `__syscall_error' /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(ptw-read.o): In function `read': <stdin>:(.text+0x25): undefined reference to `__syscall_error' <stdin>:(.text+0x55): undefined reference to `__syscall_error' /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(ptw-close.o): In function `close': <stdin>:(.text+0x1f): undefined reference to `__syscall_error' /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(ptw-close.o):<stdin>:(.text+0x4a): more undefined references to `__syscall_error' follow /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(pthread.o): In function `__pthread_reset_main_thread': /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:1153: undefined reference to `_errno' /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:1154: undefined reference to `_h_errno' /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:1155: undefined reference to `_res' /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(pthread.o): In function `pthread_initialize': /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:551: undefined reference to `_res' /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:617: undefined reference to `_dl_init_static_tls' /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libpthread.a(pthread.o): In function `__pthread_initialize_minimal': /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:319: undefined reference to `__libc_setup_tls' /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:377: undefined reference to `_errno' /build/buildd/glibc-2.3.6.ds1/build-tree/glibc-2.3.6/linuxthreads/pthread.c:378: undefined reference to `_h_errno' collect2: ld returned 1 exit status In libselinux (1.30.28-1), -lpthread was added to the libselinux's pkg-config. dpkg is statically linked against the SELinux library, thus against the libpthread, which requires some symbols from libc. Adding -lc (e.g. in m4/libs.m4) before -lpthread fixes this issue, but I'm not sure it's the right way. i.e. using: -lc -Wl,-Bstatic `pkg-config --static --libs libselinux` -Wl,-Bdynamic instead of: -Wl,-Bstatic `pkg-config --static --libs libselinux` -Wl,-Bdynamic Does anybody think it's correct? Is there a way to fix it in the libselinux's pkg-config? (I'm adding Manoj in CC in case he has an idea) Kind Regards, -- Nekral -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]