This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Trying to build libc with --disable-shared and --enable-static-nssfails
- From: Vivek Goyal <vgoyal at redhat dot com>
- To: libc-help at sourceware dot org
- Date: Tue, 6 Nov 2012 16:13:54 -0500
- Subject: Trying to build libc with --disable-shared and --enable-static-nssfails
Hi,
I cloned glibc tree and trying to build it with --disable-shared and
--enable-static-nss and build fails. Following is part of the long
list of error message.
/root/git/glibc/nis/nis_callback.c:373: undefined reference to
`xprt_unregister'
/root/git/glibc/nis/nis_callback.c:376: undefined reference to `xdr_free'
/root/git/glibc-build/nis/libnsl.a(nis_clone_obj.o): In function
`nis_clone_object':
/root/git/glibc/nis/nis_clone_obj.c:36: undefined reference to
`xdr_sizeof'
/root/git/glibc/nis/nis_clone_obj.c:48: undefined reference to
`xdrmem_create'
/root/git/glibc/nis/nis_clone_obj.c:52: undefined reference to
`xdrmem_create'
/root/git/glibc-build/nis/libnsl.a(nis_file.o): In function
`write_nis_obj':
/root/git/glibc/nis/nis_file.c:66: undefined reference to
`xdrstdio_create'
/root/git/glibc-build/nis/libnsl.a(nis_file.o): In function
`read_nis_obj':
/root/git/glibc/nis/nis_file.c:42: undefined reference to
`xdrstdio_create'
collect2: error: ld returned 1 exit status
make[2]: *** [/root/git/glibc-build/nscd/nscd] Error 1
make[2]: Leaving directory `/root/git/glibc/nscd'
make[1]: *** [nscd/others] Error 2
make[1]: Leaving directory `/root/git/glibc'
make: *** [all] Error 2
I did following
- git clone git://sourceware.org/git/glibc.git
- create another directory for build
- ../glibc/configure --enable-static-nss --disable-shared --prefix=/root/vivek-glibc/
- make
Is there something wrong with my process?
I just want to build a glibc I can statically link against. And I don't
want glibc to dynamically open any of the nss modules.
Thanks
Vivek