Have built LFS-4.1 & -6.1, trying to build -6.6 on -6.1. Stage 1 seemed to go well. Building glibc early in Stage2 failed. I did a search, saw others had a similar problem, but didn't see a relevant solution. The /scripts in my $PATH is where I put my cut&pasted "build scripts". Suggestions appreciated. (I can supply my log.conf if relevant.)
BASH=/tools/bin/bash BASHOPTS=cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:inte ractive_comments:login_shell:progcomp:promptvars:sourcepath BASH_ALIASES=() BASH_ARGC=() BASH_ARGV=() BASH_CMDS=() BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="4" [1]="1" [2]="0" [3]="1" [4]="release" [5]="i686-p c-linux-gnu") BASH_VERSION='4.1.0(1)-release' COLUMNS=80 DIRSTACK=() EUID=0 GROUPS=() HISTFILE=/root/.bash_history HISTFILESIZE=500 HISTSIZE=500 HOME=/root HOSTNAME=polar HOSTTYPE=i686 IFS=$' \t\n' LINES=39 MACHTYPE=i686-pc-linux-gnu MAILCHECK=60 OLDPWD=/usr/local/src/glibc-2.11.1 OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/scripts PIPESTATUS=([0]="0") PPID=2658 PS1='\s-\v\$ ' PS2='> ' PS4='+ ' PWD=/root SHELL=/bin/bash SHELLOPTS=braceexpand:emacs:histexpand:history:interactive-comments:moni tor SHLVL=2 Build script I folded the book instructions into. Sorry if much of this seems extraneous, but this is the whole story. "pio" is a package manager I use, formerly known as "git" by Ingo Brueckl, renamed for obvious reasons. Basically it examines the directories before and after, then builds a script to delete what was added. #!/bin/bash -e function describe () { # Describe this package, and/or how it's built, however you want. if [ x$1 = "xshort" -o x$1 = "xbrief" ]; then echo " GNU C Library" else cat <<"EOF" The glibc package contains standard libraries which are used by multiple programs on the system. In order to save disk space and memory, as well as to make upgrading easier, common system code is kept in one place and shared between programs. This particular package contains the most important sets of shared libraries: the standard C library and the standard math library. Without these two libraries, a Linux system will not function. EOF fi } function setup () { # These are steps which must be taken before the code base can be # compiled & installed. For example, creating new daemon users/groups. # These things cannot be saved in the as-built pio backup. That could # cause inappropriate restoration of modified system files, overwriting, # say, etc/passwd. Very bad! During cloning, this function will be # called before the as-built package is restored. : # null command (empty functions disallowed) } function build () { # Compile, install, and save the code base. # Build glibc-2.11.1 echo "Estimated build time: 12.3SBU" DL=$(readelf -l /bin/sh | sed -n 's...@.*interpret.*/tools\(.*\)]...@\1@p') && sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" \ scripts/test-installation.pl && unset DL && sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in && unset CFLAGS && unset CXXFLAGS && mkdir -v ../glibc-build && cd ../glibc-build && case `uname -m` in i?86) echo "CFLAGS += -march=i486 -mtune=native -O3 -pipe" > configparms ;; esac (../glibc-2.11.1/configure --prefix=/usr --disable-profile --enable-add-ons \ --enable-kernel=2.6.18 --libexecdir=/usr/lib/glibc 2>&1 | \ tee log.conf && exit $PIPESTATUS) && (make 2>&1 | tee log.make && exit $PIPESTATUS) && echo "Please wait while tests are run." && # Some of these are expected to fail cp -v ../glibc-2.11.1/iconvdata/gconv-modules iconvdata && make -k check 2>&1 | tee glibc-check-log && grep Error glibc-check-log && echo "OK to continue with install?" && read answer && if [ $answer = "y" -o $answer = "Y" ]; then pio `basename $0` && touch /etc/ld.so.conf && make install && mkdir -pv /usr/lib/locale && localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 localedef -i de_DE -f ISO-8859-1 de_DE localedef -i de...@euro -f ISO-8859-15 de...@euro localedef -i de_DE -f UTF-8 de_DE.UTF-8 localedef -i en_HK -f ISO-8859-1 en_HK localedef -i en_PH -f ISO-8859-1 en_PH localedef -i en_US -f ISO-8859-1 en_US localedef -i en_US -f UTF-8 en_US.UTF-8 localedef -i es_MX -f ISO-8859-1 es_MX localedef -i fa_IR -f UTF-8 fa_IR localedef -i fr_FR -f ISO-8859-1 fr_FR localedef -i fr...@euro -f ISO-8859-15 fr...@euro localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 localedef -i it_IT -f ISO-8859-1 it_IT localedef -i ja_JP -f EUC-JP ja_JP localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 localedef -i zh_CN -f GB18030 zh_CN.GB18030 (cat > /etc/nsswitch.conf << "EOF" # Begin /etc/nsswitch.conf passwd: files group: files shadow: files hosts: files dns networks: files protocols: files services: files ethers: files rpc: files # End /etc/nsswitch.conf EOF ) && (cat > /etc/ld.so.conf << "EOF" # /etc/ld.so.conf /usr/local/lib /opt/lib EOF ) && ln -s ../usr/share/zoneinfo/PST8PDT /etc/localtime && echo f | pio `basename $0` && pio --backup `basename $0` else echo "Installation abandoned." exit 2 fi } function finish () { # These are the steps which must happen after the package is installed. # Generally they are special customizations & initializations. During # cloning, this function will be called after the as-built files are # restored, allowing new customizations for the new system to be # installed. : # null command (empty functions disallowed) } function remove () { # These are the steps necessary to remove what was done during setup & # finish to complete package removal. For example: deleting daemon # users/groups, removing initialization or operational files. Removal # of the installed code-base is currently handled by pio. : # null command (empty functions disallowed) } case "$1" in # The correct way to replace this package is to run the "remove" # function on the installed package, and have pio remove the as-builts. # Then you can build a replacement. When it comes to restoring a # damaged package, sometimes you can just have pio restore the files, # when nothing done in the setup or finish functions needs to be # changed. However, note carefully: the backups made by pio in the # build function are of the generic as-built package files. The # customizations done by the finish function are not saved in those # backups. They're not saved anywhere! They may have to be redone. describe) # short or brief produces a one-liner, anything else # produces a longer description. describe $2 ;; setup) setup ;; build) build ;; finish) finish ;; all) setup build finish ;; remove) remove ;; *) echo "Usage: $0 {describe|setup|build|finish|all|remove}" exit 1 ;; esac And finally, this is the end of the log.make, when the error occurred one step before the fatality. (apologies if my email client wrapped inappropriately.) gcc res_hconf.c -c -std=gnu99 -fgnu89-inline -O2 -O3 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -march=i486 -mtune=native -pipe -Wstrict-prototypes -mpreferred-stack-boundary=2 -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector -I../include -I/usr/local/src/glibc-build/nscd -I/usr/local/src/glibc-build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DNOT_IN_libc=1 -o /usr/local/src/glibc-build/nscd/res_hconf.o -MD -MP -MF /usr/local/src/glibc-build/nscd/res_hconf.o.dt -MT /usr/local/src/glibc-build/nscd/res_hconf.o gcc -pie -Wl,-O1 -nostdlib -nostartfiles -o /usr/local/src/glibc-build/nscd/nscd -Wl,-dynamic-linker=/lib/ld-linux.so.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,now -Wl,--hash-style=both /usr/local/src/glibc-build/csu/Scrt1.o /usr/local/src/glibc-build/csu/crti.o `gcc --print-file-name=crtbeginS.o` /usr/local/src/glibc-build/nscd/nscd.o /usr/local/src/glibc-build/nscd/connections.o /usr/local/src/glibc-build/nscd/pwdcache.o /usr/local/src/glibc-build/nscd/getpwnam_r.o /usr/local/src/glibc-build/nscd/getpwuid_r.o /usr/local/src/glibc-build/nscd/grpcache.o /usr/local/src/glibc-build/nscd/getgrnam_r.o /usr/local/src/glibc-build/nscd/getgrgid_r.o /usr/local/src/glibc-build/nscd/hstcache.o /usr/local/src/glibc-build/nscd/gethstbyad_r.o /usr/local/src/glibc-build/nscd/gethstbynm3_r.o /usr/local/src/glibc-build/nscd/getsrvbynm_r.o /usr/local/src/glibc-build/nscd/getsrvbypt_r.o /usr/local/src/glibc-build/nscd/servicescache.o /usr/local/src/glibc-build/nscd/dbg_log.o /usr/local/src/glibc-build/nscd/nscd_conf.o /usr/local/src/glibc-build/nscd/nscd_stat.o /usr/local/src/glibc-build/nscd/cache.o /usr/local/src/glibc-build/nscd/mem.o /usr/local/src/glibc-build/nscd/nscd_setup_thread.o /usr/local/src/glibc-build/nscd/xmalloc.o /usr/local/src/glibc-build/nscd/xstrdup.o /usr/local/src/glibc-build/nscd/aicache.o /usr/local/src/glibc-build/nscd/initgrcache.o /usr/local/src/glibc-build/nscd/gai.o /usr/local/src/glibc-build/nscd/res_hconf.o /usr/local/src/glibc-build/rt/librt.so /usr/local/src/glibc-build/nptl/libpthread_nonshared.a /usr/local/src/glibc-build/nptl/libpthread.so /usr/local/src/glibc-build/nis/libnsl.so -Wl,-rpath-link=/usr/local/src/glibc-build:/usr/local/src/glibc-build/math:/usr/local/src/glibc-build/elf:/usr/local/src/glibc-build/dlfcn:/usr/local/src/glibc-build/nss:/usr/local/src/glibc-build/nis:/usr/local/src/glibc-build/rt:/usr/local/src/glibc-build/resolv:/usr/local/src/glibc-build/crypt:/usr/local/src/glibc-build/nptl /usr/local/src/glibc-build/libc.so.6 /usr/local/src/glibc-build/libc_nonshared.a -lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed `gcc --print-file-name=crtendS.o` /usr/local/src/glibc-build/csu/crtn.o /usr/local/src/glibc-build/nscd/nscd.o: In function `nscd_open_socket': /usr/local/src/glibc-2.11.1/nscd/nscd.c:442: undefined reference to `__stack_chk_guard' /usr/local/src/glibc-build/nscd/nscd.o: In function `parse_opt': /usr/local/src/glibc-2.11.1/nscd/nscd.c:291: undefined reference to `__stack_chk_guard' /usr/local/src/glibc-build/nscd/connections.o: In function `restart': /usr/local/src/glibc-2.11.1/nscd/connections.c:1305: undefined reference to `__stack_chk_guard' /usr/local/src/glibc-2.11.1/nscd/connections.c:1461: undefined reference to `__stack_chk_guard' /usr/local/src/glibc-build/nscd/connections.o: In function `main_loop_epoll': /usr/local/src/glibc-2.11.1/nscd/connections.c:2005: undefined reference to `__stack_chk_guard' /usr/local/src/glibc-build/nscd/connections.o:/usr/local/src/glibc-2.11.1/nscd/connections.c:1795: more undefined references to `__stack_chk_guard' follow collect2: ld returned 1 exit status make[2]: *** [/usr/local/src/glibc-build/nscd/nscd] Error 1 make[2]: Leaving directory `/usr/local/src/glibc-2.11.1/nscd' make[1]: *** [nscd/others] Error 2 make[1]: Leaving directory `/usr/local/src/glibc-2.11.1' make: *** [all] Error 2 TIA! -- Paul Rogers paulgrog...@fastmail.fm http://www.xprt.net/~pgrogers/ Rogers' Second Law: "Everything you do communicates." (I do not personally endorse any additions after this line. TANSTAAFL :-) -- http://www.fastmail.fm - IMAP accessible web-mail -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page