make LDFLAGS=-static gives error "undefined reference to `getloadavg'"

snoop at linuxfreak.com snoop at linuxfreak.com
Wed Nov 1 20:40:09 PST 2000


hi everyone,

i'm new to the list. it's great seeing the worldwide collaboration on
this list. 

i really admire you guys who have english as a second language; i can
only handle the 1 language i was taught as a kiddie.

name is greg scott, location is richardson, texas, usa.

hoping somebody has ideas about how to get past a problem with
installing make statically. i can install make dynamically, but then get
a problem using make from the chrooted xterm, when trying to install
ed-0.2 [make then gives error "make: /lib/libc.so.6: version
`GLIBC_2.2' not found (required by make)" (see "other info").


background
----------
debian potato (kernel 2.2.17), but i booted to redhat 6.1 (same
kernel) and got identical results.

following online lfs-book Intel-2.4.2; no problems or errors until
Chapter 5 section "Installing Make".

error
----
after bzcat on make-3.79.1.tar.bz2,

cd $LFS/usr/src/make-3.79.1/

../configure --prefix=$LFS/usr --disable-nls
     note that configure output includes:
        checking for getloadavg in -lutil... yes
        checking for getloadavg... yes
        checking whether getloadavg requires setgid... (cached) yes


make LDFLAGS=-static
   <deleted output until end>
   gcc  -g -O2 -static -o make  ar.o arscan.o commands.o dir.o
   expand.o file.o function.o getopt.o implicit.o job.o main.o misc.o
   read.o remake.o rule.o signame.o variable.o vpath.o default.o
   remote-stub.o version.o getopt1.o    -lutil -lrt 
   job.o: In function `load_too_high':
   /lfs/usr/src/make-3.79.1/job.c:1565: undefined reference to `getloadavg'
   collect2: ld returned 1 exit status
   make[2]: *** [make] Error 1 
   make[2]: Leaving directory `/lfs/usr/src/make-3.79.1'
   make[1]: *** [all-recursive] Error 1 
   make[1]: Leaving directory `/lfs/usr/src/make-3.79.1'
   make: *** [all-recursive-am] Error 2 


other info
----------
i can get past this make error by dropping the LDFLAGS=-static from
make. specifically, rm -rf the make-3.79.1 directory, and repeat
	bzcat make-3.79.1.tar.bz2 | tar xv
	./configure --prefix=$LFS/usr --disable-nls
	make
	make install

unfortunately, this doesn't get me very far, since after installing
make without the LDFLAGS=-static, things go fine until Chapter 6
section "Installing Ed", doing the install from the chrooted xterm:
	cd $LFS
	chroot $LFS env -i HOME=/root bash --login
	<next few sections go fine>
	bash-2.04# cd $LFS/usr/src/ed-0.2
	bash-2.04# pwd
	/usr/src/ed-0.2
	bash-2.04# 
	bash-2.04# ./configure --prefix=/usr
	<looks ok>
	bash-2.04# make	
	make: /lib/libc.so.6: version `GLIBC_2.2' not found (required by make) 


<some more info>
bash-2.04# ls -l /lib/libc.so.6
lrwxrwxrwx   1 root     root           13 Nov  1 04:42 /lib/libc.so.6 -> libc-2.1.3.so

bash-2.04# make -v
make: /lib/libc.so.6: version `GLIBC_2.2' not found (required by make)


try this from a non-chrooted xterm:

fuzzynuts:/lfs$ /lfs/usr/bin/make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
	Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make at gnu.org>.


any ideas?

thx for any help.

regards,
greg









-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list