This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Failed compile with glibc-2.0.103


> Cc: Linux Alpha-Glibc <libc-alpha@cygnus.com>
> Reply-To: drepper@cygnus.com (Ulrich Drepper)
> From: Ulrich Drepper <drepper@cygnus.com>
> Date: 21 Nov 1998 12:09:54 -0800
> 
> Alex Buell <alex.buell@tahallah.demon.co.uk> writes:
> 
> > `__nscd_getgrgid_r'
> > /home/alex/src/glibc/objdir/libc.so.6: undefined reference to
> 
> You have the same problem as others as posts to this list showed.  I
> have no idea what's the reason, it works for me.  THe sympton is that
> the directories named in sysd-dirs are not in the list in sysd-sorted.

Further investigation reveals that make is doing this:

make -r PARALLELMFLAGS="" CVSOPTS="" -C ../libc objdir=`pwd` all
make[1]: Entering directory `/home/geoffk/libc-autotest/libc'
[build sysd-Makefile]
[build sysd-dirs]
[build sysd-sorted]
[build soversions.mk]
make[1]: Leaving directory `/home/geoffk/libc-autotest/libc'
make[1]: Entering directory `/home/geoffk/libc-autotest/libc'
[build Versions.all]
[build sysd-versions]
[build sysd-rules]
[build sysd-syscalls]
make[1]: Leaving directory `/home/geoffk/libc-autotest/libc'
make[1]: Entering directory `/home/geoffk/libc-autotest/libc'
[touch stamp.*]
make  -C csu subdir_lib
make[2]: Entering directory `/home/geoffk/libc-autotest/libc/csu'
[and so on.]


The problem is that it is not re-reading the Makefiles between
building sysd-dirs and sysd-sorted.

I tried this patch, which removes the dependency on sysd-dirs, and it
seems to work---at least, the contents of sysd-sorted are independent
of whether sysd-dirs exists at the start of the make.

You could probably tidy this up a lot by removing all-subdirs
altogether, and defining a new variable that is all-subdirs but
excludes sysdep-subdirs and binfmt-subdir.  Then you wouldn't need the
change to gen-sorted.awk, or the $(filter-out ...).

-- 
Geoffrey Keating <geoffk@ozemail.com.au>

===File ~/patches/glibc-33.diff=============================
1998-11-22  Geoff Keating  <geoffk@drongo.anu.edu.au>

	* Makeconfig (sysd-sorted): Don't rely on $(sysdep-subdirs).
	* scripts/gen-sorted.awk: Only use the first occurrence of a
	directory.

diff -u -r1.203 Makeconfig
--- Makeconfig	1998/11/20 17:20:49	1.203
+++ Makeconfig	1998/11/22 02:11:40
@@ -788,7 +788,8 @@
 
 all-Depend-files = $(wildcard $(..)*/Depend)
 $(common-objpfx)sysd-sorted: $(..)scripts/gen-sorted.awk $(all-Depend-files) \
-			     $(common-objpfx)sysd-dirs $(..)Makeconfig
+			     $(common-objpfx)config.make $(all-Subdirs-files) \
+			     $(..)Makeconfig
 	(files="$(all-Depend-files)";					\
 	 for f in $$files; do						\
 	   dir=`echo $$f | sed 's/^$(..)\(.*\)\/[^/]*$$/\1/'`;		\
@@ -796,9 +797,11 @@
 	     echo "depend $$dir $$on";					\
 	   done < $$f;							\
 	 done;								\
-	 for f in $(all-subdirs); do					\
+	 for f in $(filter-out $(binfmt-subdir),$(all-subdirs)); do	\
 	   echo $$f;							\
-	 done								\
+	 done;								\
+	 sed 's/[#-].*$$//' $(all-Subdirs-files) /dev/null;		\
+	 echo $(binfmt-subdir)						\
 	) | $(AWK) -f $(..)scripts/gen-sorted.awk > $@-tmp
 	mv -f $@-tmp $@
 
diff -u -r1.1 scripts/gen-sorted.awk
--- scripts/gen-sorted.awk	1998/11/19 11:23:08	1.1
+++ scripts/gen-sorted.awk	1998/11/22 02:08:00
@@ -14,7 +14,8 @@
     to[dnt] = $3
     ++dnt
   } else {
-    all[cnt++] = $1
+    if (!seen[$1]) { all[cnt++] = $1 }
+    seen[$1] = 1
   }
 }
 END {
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]