zsh-workers
 help / color / mirror / code / Atom feed
* 3.0.0 configure failure (bug in autoconf 2.10?)
@ 1996-08-20  5:43 Bart Schaefer
  1996-08-20 15:16 ` Bob Glickstein
  1996-08-22 20:43 ` Zoltan Hidvegi
  0 siblings, 2 replies; 5+ messages in thread
From: Bart Schaefer @ 1996-08-20  5:43 UTC (permalink / raw)
  To: zsh-workers

Linux 1.3.15, gcc 2.7.0, ELF.

....
checking for tcsetpgrp... yes
checking for tcgetattr... yes
checking for strstr... yes
checking for lstat... no
checking for getlogin... yes
checking for setpgid... yes
....

The message from config.log is:
/tmp/cca194791.o(.text+0x14): undefined reference to `lstat'

The problem seems to be in the AC_CHECK_FUNCS macro.  Zsh's configure,
which says it is from autoconf 2.10, produces a conftest.c containing
the equivalent of:

char lstat();
int t() {
 lstat();
 return 0;
}

If I look at a different software package whose configure was generated by
autoconf 1.11, the code is:

int t() {
 extern char lstat(); lstat();
 return 0;
}

This latter compiles successfully and thus defines HAVE_LSTAT.

So just exactly who is wrong here?  autoconf?  gcc 2.7.0?

In any case, I suggest the following change to glob.c, just to prevent the
(@) glob modifier from producing wildly inaccurate results when configure
makes this kind of error.

--- Src/glob.c.0	Sat Jul 27 13:24:36 1996
+++ Src/glob.c	Mon Aug 19 22:39:47 1996
@@ -212,7 +212,7 @@
 			/* Toggle matching of symbolic links */
 			sense ^= 2;
 			break;
-#ifdef S_IFLNK
+#if defined(S_IFLNK) && defined(HAVE_LSTAT)
 		    case '@':
 			/* Match symbolic links */
 			func = qualmode;

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 3.0.0 configure failure (bug in autoconf 2.10?)
  1996-08-20  5:43 3.0.0 configure failure (bug in autoconf 2.10?) Bart Schaefer
@ 1996-08-20 15:16 ` Bob Glickstein
  1996-08-20 17:24   ` Bart Schaefer
  1996-08-22 20:43 ` Zoltan Hidvegi
  1 sibling, 1 reply; 5+ messages in thread
From: Bob Glickstein @ 1996-08-20 15:16 UTC (permalink / raw)
  To: schaefer; +Cc: zsh-workers

> So just exactly who is wrong here?  autoconf?  gcc 2.7.0?

It could be either.  What causes the autoconf 2.10 version of the
lstat test to fail?  (Find out by looking in config.log after running
configure.)

Of course, gcc 2.7.0 is three versions out of date; the current one is
2.7.2.1.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 3.0.0 configure failure (bug in autoconf 2.10?)
  1996-08-20 15:16 ` Bob Glickstein
@ 1996-08-20 17:24   ` Bart Schaefer
  1996-08-20 17:44     ` Bob Glickstein
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 1996-08-20 17:24 UTC (permalink / raw)
  To: Bob Glickstein; +Cc: zsh-workers

On Aug 20,  8:16am, Bob Glickstein wrote:
} Subject: Re: 3.0.0 configure failure (bug in autoconf 2.10?)
}
} > So just exactly who is wrong here?  autoconf?  gcc 2.7.0?
} 
} It could be either.  What causes the autoconf 2.10 version of the
} lstat test to fail?  (Find out by looking in config.log after running
} configure.)

I included that in the original message.

/tmp/cca194791.o(.text+0x14): undefined reference to `lstat'

That's all, nothing else.  I just figured out why it fails, though:  lstat
is an *inline function only* that expands to a call to _lxstat.  If you
don't include <sys/stat.h> (which the conftest does not), you can't detect
lstat.

Perhaps AC_CHECK_FUNCS is the wrong way to test for lstat?  I don't have
autoconf 2.10 installed to check the info for a more specific AC_* test.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 3.0.0 configure failure (bug in autoconf 2.10?)
  1996-08-20 17:24   ` Bart Schaefer
@ 1996-08-20 17:44     ` Bob Glickstein
  0 siblings, 0 replies; 5+ messages in thread
From: Bob Glickstein @ 1996-08-20 17:44 UTC (permalink / raw)
  To: schaefer; +Cc: zsh-workers

> Perhaps AC_CHECK_FUNCS is the wrong way to test for lstat?  I don't
> have autoconf 2.10 installed to check the info for a more specific
> AC_* test.

Well, there's AC_PROG_LN_S, which tests whether "ln -s" works; that
should indirectly indicate the availability of lstat().  But
AC_CHECK_FUNCS should work, and I consider it a bug in autoconf that
it doesn't.  I suggest sending a bug report to
bug-gnu-utils@prep.ai.mit.edu.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 3.0.0 configure failure (bug in autoconf 2.10?)
  1996-08-20  5:43 3.0.0 configure failure (bug in autoconf 2.10?) Bart Schaefer
  1996-08-20 15:16 ` Bob Glickstein
@ 1996-08-22 20:43 ` Zoltan Hidvegi
  1 sibling, 0 replies; 5+ messages in thread
From: Zoltan Hidvegi @ 1996-08-22 20:43 UTC (permalink / raw)
  To: schaefer; +Cc: zsh-workers

> Linux 1.3.15, gcc 2.7.0, ELF.
[...]
> checking for lstat... no
[...]

This is an autoconf bug but only happens with obsolate libc versions like
5.0.9 which used some preprocessor hacks on lstat because of some
incompatible kernel changes made sometime between linux-1.0 and linux-1.2.
Recent libc's use elf hacks to solve the problem.  You should better
upgrade your libc and your kernel.  It is also mentioned in Etc/MACHINES.

Zoltan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1996-08-22 20:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-20  5:43 3.0.0 configure failure (bug in autoconf 2.10?) Bart Schaefer
1996-08-20 15:16 ` Bob Glickstein
1996-08-20 17:24   ` Bart Schaefer
1996-08-20 17:44     ` Bob Glickstein
1996-08-22 20:43 ` Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).