zsh-workers
 help / color / mirror / code / Atom feed
* zsh-3.1.2-zefram3 - first experience
@ 1998-01-13 12:08 Andrej Borsenkow
  1998-01-13 12:50 ` Andrew Main
  0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 1998-01-13 12:08 UTC (permalink / raw)
  To: Zsh workers mailing list

1. mkmakemod.sh scripts doesn't work with default OS /bin/sh. It *does*
work with zsh-3.1.2 in /bin/sh mode :-) I put set -x at the top:

gmake[1]: Entering directory `/SAM/home/bor/build/zsh-3.1.2-zefram3/Src'
( cd /home/bor/src/zsh-3.1.2-zefram3 && /bin/sh Src/mkmodindex.sh Src ) \
    > modules.index.tmp
`modules.index' is up to date.
cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod
sed_normalise=
    s,^,/,
    s,$,/,
    :1
    s,/\./,/,
    t1
    :2
    s,/[^/.][^/]*/\.\./,/,
    s,/\.[^/.][^/]*/\.\./,/,
    s,/\.\.[^/][^/]*/\.\./,/,
    t2
    s,^/$,.,
    s,^/,,
    s,\(.\)/$,\1,

first_stage=true
second_stage=true
+ test .Src = .-m 
+ test .Src = .-i 
+ echo /home/bor/src/zsh-3.1.2-zefram3 
+ sed 
    s,^,/,
    s,$,/,
    :1
    s,/\./,/,
    t1
    :2
    s,/[^/.][^/]*/\.\./,/,
    s,/\.[^/.][^/]*/\.\./,/,
    s,/\.\.[^/][^/]*/\.\./,/,
    t2
    s,^/$,.,
    s,^/,,
    s,\(.\)/$,\1,
 
top_srcdir=/home/bor/src/zsh-3.1.2-zefram3
the_subdir=Src
the_makefile=Makemod
/home/bor/src/zsh-3.1.2-zefram3/Src/mkmakemod.sh: syntax error at line 239: `(' unexpected
gmake[1]: *** [Makemod] Error 2
gmake[1]: Leaving directory `/SAM/home/bor/build/zsh-3.1.2-zefram3/Src'
gmake: *** [Src] Error 2

I tried two shells (Bourne shell and XPG4 shell) and they bail out in
different places, but with the same message.


2. I don't quite understand what mkmakemod.sh does at the end. Here is
relevant part:

if $second_stage; then

    trap "rm -f $the_subdir/${the_makefile}" 1 2 15

    # config.status requires the pathname for the .in file to be relative
    # to the top of the source tree.  As we have it in the build tree, it
    # is necessary to construct an appropriate pathname.

    case $top_srcdir in
	/*) sdir=$top_srcdir ;;
	*) sdir=`pwd`/$top_srcdir; sdir=`echo $sdir | sed "$sed_normalise"` ;;
    esac
    top_builddir=`echo $sdir | sed -e 's,[^/][^/]*,..,g;s,^/,,'``pwd`

    CONFIG_FILES=$the_subdir/${the_makefile}:$top_builddir/$the_subdir/${the_makefile}.in CONFIG_HEADERS= ./config.status

My setup:

  /home -> /SAM/home
  srcdir = ~/src/zsh-3.1.2-zefram3 == /home/bor/src/zsh-3.1.2-zefram3
   (I run ~/src/zsh-3.1.2-zefram3/configure)
  builddir = ~/build/zsh-3.1.2-zefram3

Now, what hapens when script runs:

+ true
+ trap rm -f Src/Makemod 1 2 15
+ sdir=/home/bor/src/zsh-3.1.2-zefram3 
+ top_builddir=+ echo /home/bor/src/zsh-3.1.2-zefram3
+ top_builddir=+ sed -e s,[^/][^/]*,..,g -e s,^/,,
+ top_builddir=+ pwd
+ top_builddir=../../../../SAM/home/bor/build/zsh-3.1.2-zefram3 
+ CONFIG_FILES=Src/Makemod:../../../../SAM/home/bor/build/zsh-3.1.2-zefram3/Src/Makemod.in CONFIG_HEADERS= ./config.status
creating Src/Makemod
sed: Cannot open /home/bor/src/zsh-3.1.2-zefram3/../../../../SAM/home/bor/build/zsh-3.1.2-zefram3/Src/Makemod.in: No such file or directory
+ exit 0

The problem is, that `pwd' returns "true" pathname, but the srcdir has one
level hidden. I am not shure, if it is a problem of configure (which
should resolve given name) or mkmakemod.sh (ditto). Yes, I know, that I
can always run it in different way. But it should work this way as well.

2. mkmodindex.sh:

   At least my /bin/sh is not happy with [^xyz] pattern. Here is patch:

--- Src/mkmodindex.sh.org	Mon Jan 12 19:19:12 1998
+++ Src/mkmodindex.sh	Mon Jan 12 19:40:47 1998
@@ -16,7 +16,7 @@
     dosubs=false
     for mod in `echo '' $dir/*.mdd '' | sed 's, [^ ]*/, ,g;s,\.mdd , ,g'`; do
 	case "$mod@ $module_list " in
-	    *[^_0-9A-Za-z]*@*)
+	    *[!_0-9A-Za-z]*@*)
 		echo >&2 "WARNING: illegally named module \`$mod' in $dir"
 		echo >&2 "         (ignoring it)"
 		;;

3. makepro.awk fails. I am using nawk. It fails because of unquoted `{' -
it is metacaracter in extended regexp.

--- Src/makepro.awk.org	Mon Jan 12 19:19:11 1998
+++ Src/makepro.awk	Tue Jan 13 12:38:27 1998
@@ -50,7 +50,7 @@
 	if(line ~ /\/\*/)
 	    continue
 	# If it is a function definition, note so.
-	if(line ~ /\) *{.*$/) #}
+	if(line ~ /\) *\{.*$/) #}
 	    isfunc = 1
 	if(sub(/ *[{;].*$/, "", line)) #}
 	    break
@@ -101,7 +101,7 @@
 	sub(/@-.*$/, "", dnam)
 
 	# Put parens etc. back
-	gsub(/@{/, " _((", dcltor)
+	gsub(/@\{/, " _((", dcltor)
 	gsub(/@}/, "))", dcltor)
 	gsub(/@</, "(", dcltor)
 	gsub(/@>/, ")", dcltor)


4. Finally, after I managed to compile it, I lost ZLE!!! All seems to
work, zle.so, comp1.so, compctl.so are loaded, bindkey shows all bindings,
but when I try to use *any* bound character, I get no effects. '^P' gives
fine message `'^P' not found" :-)

Any idea?


-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------






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

* Re: zsh-3.1.2-zefram3 - first experience
  1998-01-13 12:08 zsh-3.1.2-zefram3 - first experience Andrej Borsenkow
@ 1998-01-13 12:50 ` Andrew Main
  1998-01-13 14:36   ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Main @ 1998-01-13 12:50 UTC (permalink / raw)
  To: borsenkow.msk; +Cc: zsh-workers

Andrej Borsenkow wrote:
>the_makefile=Makemod
>/home/bor/src/zsh-3.1.2-zefram3/Src/mkmakemod.sh: syntax error at line 239: `(' unexpected
>gmake[1]: *** [Makemod] Error 2
>gmake[1]: Leaving directory `/SAM/home/bor/build/zsh-3.1.2-zefram3/Src'
>gmake: *** [Src] Error 2

Well that localises it a little.

>+ sdir=/home/bor/src/zsh-3.1.2-zefram3 
>+ top_builddir=+ echo /home/bor/src/zsh-3.1.2-zefram3
>+ top_builddir=+ sed -e s,[^/][^/]*,..,g -e s,^/,,
>+ top_builddir=+ pwd
>+ top_builddir=../../../../SAM/home/bor/build/zsh-3.1.2-zefram3 
>+ CONFIG_FILES=Src/Makemod:../../../../SAM/home/bor/build/zsh-3.1.2-zefram3/Src/Makemod.in CONFIG_HEADERS= ./config.status
>creating Src/Makemod
>sed: Cannot open /home/bor/src/zsh-3.1.2-zefram3/../../../../SAM/home/bor/build/zsh-3.1.2-zefram3/Src/Makemod.in: No such file or directory

Ouch.  I hadn't thought about symbolic links in the pathname.  At least
this one's easily soluble.

>   At least my /bin/sh is not happy with [^xyz] pattern. Here is patch:

I don't think all sh's are happy with [!xyz].  I'll do this bit another
way -- all sed's can handle [^xyz].

>3. makepro.awk fails. I am using nawk. It fails because of unquoted `{' -
>it is metacaracter in extended regexp.

Sorted.

>4. Finally, after I managed to compile it, I lost ZLE!!! All seems to
>work, zle.so, comp1.so, compctl.so are loaded, bindkey shows all bindings,
>but when I try to use *any* bound character, I get no effects. '^P' gives
>fine message `'^P' not found" :-)

"'^P' not found" sounds like it's looking for a *function* called '^P'.
What bindkey instructions are you executing on startup?

-zefram


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

* Re: zsh-3.1.2-zefram3 - first experience
  1998-01-13 12:50 ` Andrew Main
@ 1998-01-13 14:36   ` Andrej Borsenkow
  1998-01-13 14:52     ` Andrew Main
  0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 1998-01-13 14:36 UTC (permalink / raw)
  To: Andrew Main; +Cc: zsh-workers

On Tue, 13 Jan 1998, Andrew Main wrote:

> 
> >4. Finally, after I managed to compile it, I lost ZLE!!! All seems to
> >work, zle.so, comp1.so, compctl.so are loaded, bindkey shows all bindings,
> >but when I try to use *any* bound character, I get no effects. '^P' gives
> >fine message `'^P' not found" :-)
> 
> "'^P' not found" sounds like it's looking for a *function* called '^P'.
> What bindkey instructions are you executing on startup?
> 

Oops!! I totally forgot, that libzsh.so is not installed when I do
make install :-( 

This opens up two questions:

  1. libzsh.so *must* be installed. I think, it was on Zoltan's to do
     list ...

  2. There must be a way for several dynamic ZSH versions to coexist. It 
     can be done in (at least) two ways:

     - easy and portable :)
         just build (and link with) libzsh.x.y.z.so instead of libzsh.so
         It will run on every system which supports shared libraries

     - at least on SVR4 is possible to give shared library a name (-h 
       option). If library libfoo.so was built with -h libfoo.so.x.y.z, 
       then after initial linking with -lfoo run time loader will look
       for libfoo.so.x.y.z. I think, it works this way on Linux as well. 

Zefram, I think you were the author of most dynamic hacks. What do you
think?

BTW this version defaults to -O -g compiler options and -s linker option.
I would expect developer version to not be stripped, and -O -g doesn't
work with most compilers.


-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@sni.de
-------------------------------------------------------------------------



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

* Re: zsh-3.1.2-zefram3 - first experience
  1998-01-13 14:36   ` Andrej Borsenkow
@ 1998-01-13 14:52     ` Andrew Main
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Main @ 1998-01-13 14:52 UTC (permalink / raw)
  To: borsenkow.msk; +Cc: zefram, zsh-workers

Andrej Borsenkow wrote:
>Oops!! I totally forgot, that libzsh.so is not installed when I do
>make install :-( 

Ah yes, I forgot about that too.  libzsh isn't required on any of the
platforms I've ever built zsh on.

>  1. libzsh.so *must* be installed. I think, it was on Zoltan's to do
>     list ...

Aside: everyone's talking about Zoltan in the past tense.  I forget to
mention it yesterday, but he did answer the ping that I cced to the list.
He says he no longer has sufficient time to work on zsh, but he does
plan to make at least one more release.

>  2. There must be a way for several dynamic ZSH versions to coexist. It 
>     can be done in (at least) two ways:

The modules themselves are fine -- they have been installed in a
version-dependent directory from day one.  (See, I learn from other
people's mistakes.)  libzsh needs a version number in its name.

>     - easy and portable :)
>         just build (and link with) libzsh.x.y.z.so instead of libzsh.so
>         It will run on every system which supports shared libraries

Precisely.

>BTW this version defaults to -O -g compiler options and -s linker option.
>I would expect developer version to not be stripped, and -O -g doesn't
>work with most compilers.

Huh?  autoconf likes to use "-O -g", but the zsh configuration overrides
that, so zsh will never default to using both -O and -g.  You must have
specified that explicitly by exporting CFLAGS to the configure script.
As for -s, this is used by default if you do not enable debugging.
Again, you can override that in the environment.

-zefram


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

end of thread, other threads:[~1998-01-13 15:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-13 12:08 zsh-3.1.2-zefram3 - first experience Andrej Borsenkow
1998-01-13 12:50 ` Andrew Main
1998-01-13 14:36   ` Andrej Borsenkow
1998-01-13 14:52     ` Andrew Main

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