zsh-workers
 help / color / mirror / code / Atom feed
* Re: 2 patches included to fix configure brokenness
@ 1999-02-21  7:19 Matt Armstrong
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Armstrong @ 1999-02-21  7:19 UTC (permalink / raw)
  To: martin, schaefer, pws, zsh-workers

>Bart> That's very odd, it builds fine for me all the 
>Bart> time.  And `dup' shouldn't
>Bart> be a macro, it's a system call.  You should 
>Bart> try to find out where that
>Bart> macro is coming from, I think your gcc installation 
>Bart> must be strange.
>
>Debian GNU Linux 2.0 seems to come with /usr/include/libc.h, 
>which has:
>
>/* Copyright (c) 1992 AT&T - All rights reserved. */
>
>	/* Plan 9 C library interface */
>
>
><flame on>
>I don't know what moron came up with the idea of including ANOTHER
>operating system's headers with Debian Linux.  When people talk about
>code reuse, I don't think this is what they had in mind.
><flame off>
>
>
>Here's a patch that work for me, but I'm not sure what other 
>systems require libc.h.  It's a non-standard header, no system 
>should need it anymore.

That header is coming from the libxg-dev package, described as "graphics 
libraries from plan 9."  That package isn't part of the default install, 
but it is available as part of the stable release.  You could try a 
"dpkg --purge libxg-dev" to get rid of it.

The moron that came up with the idea was Raul Miller <moth@debian.org>.  
You should file a Debian bug against the package -- having that 
incompatible libc.h in /usr/include just seems broken.

In any case, since the header can appear in stable release Debian 
systems, a fix to zsh seems warranted.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


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

* Re: 2 patches included to fix configure brokenness
  1999-02-21  6:17   ` 2 patches included to fix configure brokenness Martin Buchholz
@ 1999-02-22  9:41     ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-02-22  9:41 UTC (permalink / raw)
  To: zsh-workers

Martin Buchholz wrote:
> Here's a real live tested patch that fixes it right.
> 
> --- configure.in.orig	Fri Jan  1 01:01:00 1999
> +++ configure.in	Fri Jan  1 01:01:00 1999
> @@ -353,6 +353,11 @@
>    AC_CHECK_LIB(nsl, getdomainname)
>  fi
>  
> +AC_CHECK_FUNCS(yp_all)
> +if test $ac_cv_func_yp_all = no; then
> +  AC_CHECK_LIB(nsl, yp_all)
> +fi
> +

This is already there in configure.in for 3.1.5: it replaces the
getdomainname() test --- presumably, unless that only got added to 3.0,
which has been known to happen.  The libc change is new.  Is it certain
that no-one apart from NeXT needs libc.h?

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

* 2 patches included to fix configure brokenness
  1999-02-20 22:05 ` Bart Schaefer
@ 1999-02-21  6:17   ` Martin Buchholz
  1999-02-22  9:41     ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Buchholz @ 1999-02-21  6:17 UTC (permalink / raw)
  To: Bart Schaefer, Peter Stephenson, zsh-workers

>>>>> "Bart" == Bart Schaefer <schaefer@brasslantern.com> writes:

Bart> On Feb 20,  9:31pm, Martin Buchholz wrote:
Bart> } Subject: Bug report:  PWD environment variable broken!
Bart> }
Bart> } I tried to downgrade to 3.0.5.
Bart> } 
Bart> } 3.0.5 on BSDI coredumps on invocation. 

Bart> Try picking up <ftp://ftp.brasslantern.com/pub/zsh/patch-3.0.5-ext-2> and
Bart> see if that fixes you up.

Tried that.  No help.

zsh configuration
-----------------
zsh version           : 3.0.5-ext-2
host operating system : bsdi4.0
source code location  : .
compiler              : gcc
compiler flags        :  -Wall -Wno-implicit -Wmissing-prototypes -O2
binary install path   : /usr/local/bin
man page install path : /usr/local/man
info install path     : /usr/local/info

(martin@kowloon) ~/ex/src/zsh-3.0.5-ext-2/Src $ ./zsh
zsh: segmentation fault (core dumped)  ./zsh

Bart> Note that for some reason, very recent versions of the "patch" program
Bart> fail when they reach the second hunk of globals.h.  It works fine with
Bart> "patch" version 2.1, but at some point since then the FSF broke things.

Patch version 2.2 seemed to work fine.

Bart> } On Linux 3.0.5 failed to build:
Bart> } 
Bart> } gcc -c -I.. -I. -I.  -DHAVE_CONFIG_H -Wall -Wno-implicit -Wmissing-prototypes -O2 builtin.c
Bart> } builtin.c:4279: macro `dup' used with just one arg

Bart> That's very odd, it builds fine for me all the time.  And `dup' shouldn't
Bart> be a macro, it's a system call.  You should try to find out where that
Bart> macro is coming from, I think your gcc installation must be strange.

Debian GNU Linux 2.0 seems to come with /usr/include/libc.h, which has:

(martin@mongkok) ~ $ g -w dup /usr/include/**/*.h
/usr/include/asm/fcntl.h:20:#define F_DUPFD		0	/* dup */
/usr/include/asm/unistd.h:279:static inline _syscall1(int,dup,int,fd)
/usr/include/fcntlbits.h:48:#define F_DUPFD		0	/* dup */
/usr/include/libc.h:10:#define	dup(a,b)			dup2(a,b)
/usr/include/linux/net.h:92:  int	(*dup)		(struct socket *newsock, struct socket *oldsock);
/usr/include/unistd.h:329:extern int dup __P ((int __fd));

libc.h is completely bogus.  It has this copyright notice:

/* Copyright (c) 1992 AT&T - All rights reserved. */

	/* Plan 9 C library interface */


<flame on>
I don't know what moron came up with the idea of including ANOTHER
operating system's headers with Debian Linux.  When people talk about
code reuse, I don't think this is what they had in mind.
<flame off>


Here's a patch that work for me, but I'm not sure what other systems
require libc.h.  It's a non-standard header, no system should need it anymore.

--- system.h.orig	Sun Feb 21 14:38:52 1999
+++ system.h	Sun Feb 21 14:40:37 1999
@@ -48,8 +48,10 @@
 # define _(Args) ()
 #endif
 
-#ifdef HAVE_LIBC_H     /* NeXT */
+#ifdef __NeXT__
+#ifdef HAVE_LIBC_H
 # include <libc.h>
+#endif
 #endif
 
 #ifdef HAVE_UNISTD_H


Also, on this system, domainname is in libc, and yp_all is in libnsl.

cd Src && make CC='gcc' CPPFLAGS='' DEFS='-DHAVE_CONFIG_H' CFLAGS='-Wall -Wno-implicit -Wmissing-prototypes -O2' LDFLAGS='' LIBS='-lcurses' prefix='/usr/local' exec_prefix='/usr/local' bindir='/usr/local/bin' infodir='/usr/local/info' mandir='/usr/local/man' manext='1'
make[1]: Entering directory `/amd/wanchai/root/export1/xemacs/src/zsh-3.0.5-ext-2/Src'
gcc  -o zsh builtin.o compat.o cond.o exec.o glob.o hashtable.o hist.o init.o input.o jobs.o lex.o linklist.o loop.o math.o mem.o params.o parse.o signals.o subst.o text.o utils.o watch.o zle_bindings.o zle_hist.o zle_main.o zle_misc.o zle_move.o zle_refresh.o zle_tricky.o zle_utils.o zle_vi.o zle_word.o -lcurses
zle_tricky.o: In function `maketildelist':
zle_tricky.o(.text+0x2aeb): undefined reference to `yp_all'
collect2: ld returned 1 exit status

Here's a real live tested patch that fixes it right.

--- configure.in.orig	Fri Jan  1 01:01:00 1999
+++ configure.in	Fri Jan  1 01:01:00 1999
@@ -353,6 +353,11 @@
   AC_CHECK_LIB(nsl, getdomainname)
 fi
 
+AC_CHECK_FUNCS(yp_all)
+if test $ac_cv_func_yp_all = no; then
+  AC_CHECK_LIB(nsl, yp_all)
+fi
+
 dnl I am told that told that unicos reqire these for nis_list
 if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
   LIBS="-lcraylm -lkrb -lnisdb -lnsl -lrpcsvc $LIBS"



configure output fragment:

checking for getdomainname... yes
checking for yp_all... no
checking for yp_all in -lnsl... yes


Oh, I guess you want a ChangeLog entry too:

1999-02-21  Martin Buchholz  <martin@xemacs.org>

	* Src/system.h: Only #include <libc.h> on NeXT systems.

	* configure.in: Check for domainname and yp_all separately.


After all these trials and tribulations, I managed to upgrade the zsh
on most of my systems to zsh-ext-2 and the PWD bug is gone!

Keep on saving the world,

Martin


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

end of thread, other threads:[~1999-02-22  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-21  7:19 2 patches included to fix configure brokenness Matt Armstrong
  -- strict thread matches above, loose matches on Subject: below --
1999-02-20 12:31 Bug report: PWD environment variable broken! Martin Buchholz
1999-02-20 22:05 ` Bart Schaefer
1999-02-21  6:17   ` 2 patches included to fix configure brokenness Martin Buchholz
1999-02-22  9:41     ` Peter Stephenson

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).