LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2010, 07:16 AM   #1
hosantosh
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Glibc 2.11.1 installation error with NSCD


I am a non-root user on my Lab computer with RHEL4 OS and am trying to install Glibc-2.11.1 on it ..
for proper installation I used a directory other than the source directory of Glibc and ran configure which was fine, then I ran make which also ran fine.. but when I ran "make install" an error came up which was :

make subdir=nscd -C nscd ..=../ subdir_install
make[2]: Entering directory `/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd'
gcc -pie -Wl,-O1 -nostdlib -nostartfiles -o /data/sandy/Desktop/Gotten/glibc-build/nscd/nscd -Wl,-dynamic-linker=/data/sandy/program2/glibc/lib/ld-linux.so.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,now /data/sandy/Desktop/Gotten/glibc-build/csu/Scrt1.o /data/sandy/Desktop/Gotten/glibc-build/csu/crti.o `gcc --print-file-name=crtbeginS.o` /data/sandy/Desktop/Gotten/glibc-build/nscd/nscd.o /data/sandy/Desktop/Gotten/glibc-build/nscd/connections.o /data/sandy/Desktop/Gotten/glibc-build/nscd/pwdcache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/getpwnam_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/getpwuid_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/grpcache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/getgrnam_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/getgrgid_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/hstcache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/gethstbyad_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/gethstbynm3_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/getsrvbynm_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/getsrvbypt_r.o /data/sandy/Desktop/Gotten/glibc-build/nscd/servicescache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/dbg_log.o /data/sandy/Desktop/Gotten/glibc-build/nscd/nscd_conf.o /data/sandy/Desktop/Gotten/glibc-build/nscd/nscd_stat.o /data/sandy/Desktop/Gotten/glibc-build/nscd/cache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/mem.o /data/sandy/Desktop/Gotten/glibc-build/nscd/nscd_setup_thread.o /data/sandy/Desktop/Gotten/glibc-build/nscd/xmalloc.o /data/sandy/Desktop/Gotten/glibc-build/nscd/xstrdup.o /data/sandy/Desktop/Gotten/glibc-build/nscd/aicache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/initgrcache.o /data/sandy/Desktop/Gotten/glibc-build/nscd/gai.o /data/sandy/Desktop/Gotten/glibc-build/nscd/res_hconf.o /data/sandy/Desktop/Gotten/glibc-build/nscd/selinux.o /data/sandy/Desktop/Gotten/glibc-build/rt/librt.so /data/sandy/Desktop/Gotten/glibc-build/nptl/libpthread_nonshared.a /data/sandy/Desktop/Gotten/glibc-build/nptl/libpthread.so /data/sandy/Desktop/Gotten/glibc-build/nis/libnsl.so -lselinux -Wl,-rpath-link=/data/sandy/Desktop/Gotten/glibc-build:/data/sandy/Desktop/Gotten/glibc-build/math:/data/sandy/Desktop/Gotten/glibc-build/elf:/data/sandy/Desktop/Gotten/glibc-build/dlfcn:/data/sandy/Desktop/Gotten/glibc-build/nss:/data/sandy/Desktop/Gotten/glibc-build/nis:/data/sandy/Desktop/Gotten/glibc-build/rt:/data/sandy/Desktop/Gotten/glibc-build/resolv:/data/sandy/Desktop/Gotten/glibc-build/crypt:/data/sandy/Desktop/Gotten/glibc-build/nptl /data/sandy/Desktop/Gotten/glibc-build/libc.so.6 /data/sandy/Desktop/Gotten/glibc-build/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed `gcc --print-file-name=crtendS.o` /data/sandy/Desktop/Gotten/glibc-build/csu/crtn.o
/data/sandy/Desktop/Gotten/glibc-build/nscd/connections.o(.text+0x1efb): In function `nscd_init':
/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/connections.c:850: warning: warning: inotify_add_watch is not implemented and will always fail
/data/sandy/Desktop/Gotten/glibc-build/nscd/connections.o(.text+0x2911):/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/connections.c:532: warning: warning: inotify_init is not implemented and will always fail
/data/sandy/Desktop/Gotten/glibc-build/nscd/connections.o(.text+0x1d41):/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/connections.c:528: warning: warning: inotify_init1 is not implemented and will always fail
/data/sandy/Desktop/Gotten/glibc-build/nscd/nscd.o(.text+0x17a): In function `nscd_open_socket':
/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/nscd.c:442: undefined reference to `__stack_chk_guard'
/data/sandy/Desktop/Gotten/glibc-build/nscd/nscd.o(.text+0x1eb):/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/nscd.c:460: undefined reference to `__stack_chk_guard'
/data/sandy/Desktop/Gotten/glibc-build/nscd/nscd.o(.text+0x281): In function `parse_opt':
/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/nscd.c:291: undefined reference to `__stack_chk_guard'
/data/sandy/Desktop/Gotten/glibc-build/nscd/nscd.o(.text+0x29e):/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd/nscd.c:405: undefined reference to `__stack_chk_guard'
/data/sandy/Desktop/Gotten/glibc-build/nscd/connections.o(.text+0x2b6): In function `restart':
: undefined reference to `__stack_chk_guard'
/data/sandy/Desktop/Gotten/glibc-build/nscd/connections.o(.text+0x3fd): more undefined references to `__stack_chk_guard' follow
collect2: ld returned 1 exit status
make[2]: *** [/data/sandy/Desktop/Gotten/glibc-build/nscd/nscd] Error 1
make[2]: Leaving directory `/data/sandy/Desktop/Gotten/glibc-2.11.1/nscd'
make[1]: *** [nscd/subdir_install] Error 2
make[1]: Leaving directory `/data/sandy/Desktop/Gotten/glibc-2.11.1'
make: *** [install] Error 2


then I did a clean install again following these commands in the glibc-build directory (other than the source dir)

make clean ; rm -rf ;
case `uname -m` in i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;; esac
which gave a configparms file containing => "CFLAGS += -march=i486 -mtune=native"

Even though while running configure I get
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu


so I guess I don't need to specify the configparms .. but anyway I did it as earlier I wasn't sure what would solve my problem with NSCD..
Then I moved to make and all went fine, but the same error popped up during "make install"

Can somebody help me to install the Glibc package being a non-root user?
 
Old 05-05-2010, 10:09 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,912

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
I trust you know what you are doing. . . if you're not sure, stop

Glibc is one of the 3 components of the toolchain: gcc, kernel headers, & glibc. These are the basic things everything is compiled against. So if something compiled against glibc sees the other version, problems could occur.

Glibc is not as much a set of programs (It does have a few - ldd for instance) as a libc, or set of libraries, or common subroutines that everything else uses. Everything is linked against various libs (try ldd </path/to/some_program>) which glibc provides.

That sort of long, going-down-in-flames error is usually because of an include problem. The compile is probably using the includes or header files from /usr/include when it needs the ones buried low in glibc somewhere. Check the includes in connection.c
grep \#include connections.c (untested). Where are they?

Build it in one lump, and look at the linuxfromscratch book in chapter 6 for suggestions on compiling

http://www.linuxfromscratch.org
 
1 members found this post helpful.
Old 05-06-2010, 04:57 AM   #3
hosantosh
LQ Newbie
 
Registered: May 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
I trust you know what you are doing. . . if you're not sure, stop

Glibc is one of the 3 components of the toolchain: gcc, kernel headers, & glibc. These are the basic things everything is compiled against. So if something compiled against glibc sees the other version, problems could occur.

Glibc is not as much a set of programs (It does have a few - ldd for instance) as a libc, or set of libraries, or common subroutines that everything else uses. Everything is linked against various libs (try ldd </path/to/some_program>) which glibc provides.

That sort of long, going-down-in-flames error is usually because of an include problem. The compile is probably using the includes or header files from /usr/include when it needs the ones buried low in glibc somewhere. Check the includes in connection.c
grep \#include connections.c (untested). Where are they?

Build it in one lump, and look at the linuxfromscratch book in chapter 6 for suggestions on compiling

http://www.linuxfromscratch.org

Thanks for the reply business_kid.

Actually, my system can't load new versions of the softwares as they complain about mising GLIBC files

>> libc.so.6: version `GLIBC_2.4' not found

on this I thought if I could compile seperately for my account I wud be able to use newer versions of the programs..
However, even after several updates to several libraries etc. I haven't been able to get things going and am still using the older versions of several programs..
Its not a real necessity but more of a curiosity. But thanks for the warning about system's safety.

I have checked for the include files

grep \#include ../glibc-2.11.1/nscd/connections.c
#include <alloca.h>
#include <assert.h>
#include <atomic.h>
#include <error.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <libintl.h>
#include <pthread.h>
#include <pwd.h>
#include <resolv.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include "nscd.h"
#include "dbg_log.h"
#include "selinux.h"
#include <resolv/resolv.h>


all these files are present in /usr/include and the Glibc source dir as well. But still am not sure how to proceed..
 
Old 05-06-2010, 07:02 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
You may be able to compile and install glibc-2.4 (2.5 ?)
to /home/"user"/ or another hideaway location.

I would never expect glibc-2.11 to build on an OS, that old.

..
 
1 members found this post helpful.
Old 05-08-2010, 03:10 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,912

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
If you're compiling at this stage for the fun of it, try
./configure --with-includedir=/home/you/glibc-top-source/include.

As someone who has built LFS and a few others from scratch, the comment that you'll never do it on a system that old is the sense in this. Is root generous with disk space? If so, this approach is a possibility.

dd if=/dev/zero of=somefile count=2G
mke2fs somefile
mount -o loop somefile /home/you/somewhere

and then build linuxfromscratch into that! You won't be without issues, but it _just_might_ get you somewhere until root finds out :-).
 
1 members found this post helpful.
Old 05-10-2010, 02:03 AM   #6
hosantosh
LQ Newbie
 
Registered: May 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
If you're compiling at this stage for the fun of it, try
./configure --with-includedir=/home/you/glibc-top-source/include.

As someone who has built LFS and a few others from scratch, the comment that you'll never do it on a system that old is the sense in this. Is root generous with disk space? If so, this approach is a possibility.

dd if=/dev/zero of=somefile count=2G
mke2fs somefile
mount -o loop somefile /home/you/somewhere

and then build linuxfromscratch into that! You won't be without issues, but it _just_might_ get you somewhere until root finds out :-).

when I ran configure with the option you mentioned it says

checking installed Linux kernel header files... TOO OLD!
configure: error: GNU libc requires kernel header files from
Linux 2.0.10 or later to be installed before configuring.


the actual output is following:

[sandy@linux9 glibc-build]$ ../glibc-2.11.1/configure --prefix=$PROGRAM2/glibc --with-headers=../glibc-2.11.1/include/
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: running configure fragment for add-on libidn
configure: running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /data/sandy/program2/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking whether as is GNU as... yes
checking whether ld is GNU ld... yes
checking for as... as
checking version of as... 2.15.92.0.2, ok
checking for ld... ld
checking version of ld... 2.15.92.0.2, ok
checking for pwd... /data/sandy/program2/bin/pwd
checking for gcc... gcc
checking version of gcc... 4.4.3, ok
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.80, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.14.1, ok
checking for makeinfo... makeinfo
checking version of makeinfo... 4.7, ok
checking for sed... sed
checking version of sed... 4.1.2, ok
checking for autoconf... autoconf
checking whether autoconf works... yes
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/bash
checking for gawk... gawk
checking for perl... /data/sandy/programs/perl/bin/perl
checking for install-info... /sbin/install-info
checking for bison... /usr/bin/bison
checking for signed size_t type... no
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for .set assembler directive... yes
checking for assembler .type directive prefix... @
checking for assembler gnu_unique_object symbol type... no
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... yes
checking for libunwind-support in compiler... no
checking for -z nodelete option... yes
checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -z relro option... yes
checking for -Bgroup option... yes
checking for libgcc_s suffix...
checking for --as-needed option... yes
checking whether --noexecstack is desirable for .S files... yes
checking for -z combreloc... yes
checking for -z execstack... yes
checking for -fpie... yes
checking for --hash-style option... no
checking for -fno-toplevel-reorder -fno-section-anchors... yes
checking for -fstack-protector... yes
checking for -fgnu89-inline... yes
checking whether cc puts quotes around section names... no
checking for assembler .weak directive... yes
checking whether CFI directives are supported... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking for __builtin_expect... yes
checking for __builtin_memset... yes
checking for redirection of built-in functions... yes
checking for __thread... yes
checking for tls_model attribute... yes
checking for libgd... yes
checking for is_selinux_enabled in -lselinux... yes
checking for NSCD Flask permissions in selinux/av_permissions.h... yes
checking for audit_log_user_avc_message in -laudit... no
checking for cap_init in -lcap... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of long double... 12
running configure fragment for sysdeps/i386/elf
checking for i386 TLS support... yes
running configure fragment for nptl/sysdeps/pthread
checking for forced unwind support... yes
checking for C cleanup handling... yes
running configure fragment for sysdeps/pthread
running configure fragment for sysdeps/unix/sysv/linux
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for egrep... (cached) /bin/grep -E
checking installed Linux kernel header files... TOO OLD!
configure: error: GNU libc requires kernel header files from
Linux 2.0.10 or later to be installed before configuring.
The kernel header files are found usually in /usr/include/asm and
/usr/include/linux; make sure these directories use files from
Linux 2.0.10 or later. This check uses <linux/version.h>, so
make sure that file was built correctly when installing the kernel header
files. To use kernel headers not from /usr/include/linux, use the
configure option --with-headers.


is there anyway out .. as I have read somewhere that I can download new kernel source and without installing the kernel I can point the GLIBC configure to its include directory ..
will this help?
 
Old 05-11-2010, 01:07 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,629

Rep: Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267Reputation: 3267
Why are you trying to compile glibc-2.11.1,
when glibc-2.4 will do. ? ?

Read posts #4 and #5 again : Do not expect to compile
glibc-2.11.1 on an old OS. Never. It's not just the
kernel headers. Lots of issues will prevent you from
getting any further.
Everything must be "new": binutils, headers, gcc ...

Building LFS, Linux From Scratch http://wiki.linuxfromscratch.org/
a couple of times will show it all.
..

Last edited by knudfl; 05-11-2010 at 03:01 PM.
 
Old 05-11-2010, 04:00 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,912

Rep: Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774Reputation: 774
Quote:
Originally Posted by hosantosh View Post
is there anyway out .. as I have read somewhere that I can download new kernel source and without installing the kernel I can point the GLIBC configure to its include directory ..
will this help?
As has been mentioned, Read posts #4 & #5. Goodbye.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need urgent help--getting error in glibc installation lokeshsingla Linux From Scratch 2 07-01-2009 06:03 AM
Glibc installation error kingkashif Linux From Scratch 5 06-28-2009 02:04 AM
GLIBC Error when attempting installation of software dmckenna Linux - Server 1 12-26-2008 10:16 AM
glibc installation error newcomer4 Linux - Software 1 02-03-2006 04:33 PM


All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration