This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
remove dependency on existing /usr/include/gnu/stubs.h
- To: libc-alpha at sources dot redhat dot com
- Subject: remove dependency on existing /usr/include/gnu/stubs.h
- From: Pete Wyckoff <pw at osc dot edu>
- Date: Sun, 15 Oct 2000 15:41:37 -0400
>Submitter-Id: net
>Originator: Pete Wyckoff
>Organization:
>Confidential: no
>Synopsis: make fails if /usr/include/gnu/stubs.h does not exist
>Severity: non-critical
>Priority: low
>Category: libc
>Class: sw-bug
>Release: libc-2.1.95
>Environment:
Host type: i686-pc-linux-gnu
System: Linux bigger 2.4.0-test9 #4 SMP Sat Oct 7 14:58:52 EDT 2000 i686 unknown
Architecture: i686
Addons: linuxthreads
Build CC: gcc
Compiler version: 2.95.2 19991024 (release)
Kernel headers: 2.4.0-test9
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
Dependency file bits/stdio_lim.d insists that bits/stdio_lim.st
depends on /usr/include/gnu/stubs.h.
>How-To-Repeat:
mkdir /tmp/build
cd /tmp/build
./configure ....
make
mv /usr/include /far/away
mkdir /usr/include
ln -s /usr/src/linux/include/linux /usr/include/linux
ln -s /usr/src/linux/include/asm /usr/include/asm
make install
Error is:
make[2]: Entering directory `/usr/src/glibc-2.1.95/csu'
make[2]: *** No rule to make target `/usr/include/gnu/stubs.h', needed by `/tmp/build/bits/stdio_lim.st'. Stop.
make[2]: Leaving directory `/usr/src/glibc-2.1.95/csu'
Note: if you wipe /usr/include before starting the build, a complaint
during dependency generation spins by, but doesn't stop the build:
In file included from ../misc/sys/uio.h:22,
from :1:
../include/features.h:311: gnu/stubs.h: No such file or directory
(Of course, in this scenario, make check will then fail in a few
cases later due to $(native-compile) not having a working
/usr/include.)
>Fix:
Arrange for _LIBC to be defined somehow during the generation of
bits/stdio_lim.d. That file is special and handled by explicit code
toward the end of Rules. A minimalist patch follows, but you may
want to pull in include/libc-symbols.h as is done for all other
dependency generation.
2000-10-15 Pete Wyckoff <pw@osc.edu>
* Rules: Define _LIBC during generation of bits/stdio_lim.d.
diff -ruN glibc-2.1.95/Rules glibc/Rules
--- glibc-2.1.95/Rules Sun Oct 15 14:58:27 2000
+++ glibc/Rules Sun Oct 15 14:47:15 2000
@@ -206,7 +206,7 @@
$(CC) $(+includes) -E -dM -xc - -o $(@:st=hT)
echo '#include "$(..)misc/sys/uio.h"' | \
SUNPRO_DEPENDENCIES='$(@:st=dT) $@' \
- $(CC) $(+includes) -E -dM -xc - | cat - >> $(@:st=hT)
+ $(CC) -D_LIBC=1 $(+includes) -E -dM -xc - | cat - >> $(@:st=hT)
ifdef sed-remove-objpfx
sed $(sed-remove-objpfx) $(@:st=dT) > $(@:st=dt)
cat $(@:st=dt) >> $(@:st=d)