Hi Marc, * Marc Wuilleret (mwuilleret@vtxnet.ch) [20050119 02:02]:
The program "/usr/bin/which" produces a Segmentation fault.
You should rather see why and where which segfaults.
gcc -O2 -g -o which getopt.o getopt1.o bash.o which.o ./tilde/libtilde.a /usr/lib/libiberty.a
I suspect that these warnings about libiberty are the source of the problem, but I am not sure about how to fix that.
I doubt that that's the reason for the segfaults.
/usr/bin/which from the util-linux-*.x86_64.rpm is linked to the correct
libraries. On your system you have /usr/lib/libiberty.a, coming from the
installation of binutils-32bit.rpm. Try the following patch for configure,
rerun configure and then rebuild.
BTW, before anybody asks why I don't patch configure.in, have a look at
acinclude.m4 of which-2.13. If you can tell me how to rewrite
AC_CHECK_STATICLIB so that current autoconf groks it, I'll redo the patch.
Philipp
--- configure 2005/01/19 14:55:08 1.1
+++ configure 2005/01/19 14:56:34
@@ -1117,9 +1117,9 @@
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -r /etc/ld.so.conf ; then
- ld_so_paths="/lib /usr/lib at /etc/ld.so.conf"
+ ld_so_paths="/lib64 /usr/lib64 /lib /usr/lib at /etc/ld.so.conf"
else
- ld_so_paths="/lib /usr/lib"
+ ld_so_paths="/lib64 /usr/lib64 /lib /usr/lib"
fi
for path in $ld_so_paths; do
ac_save_LIBS="$LIBS"
--
Philipp Thomas