zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: "make check" with libzsh (e.g. FreeBSD)
@ 2001-06-02 15:49 Bart Schaefer
  2001-06-02 17:48 ` Andrej Borsenkow
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2001-06-02 15:49 UTC (permalink / raw)
  To: zsh-workers

In zsh-workers/14451, Andrej wrote:
} 
} On Wed, 23 May 2001, Oliver Kiddle wrote:
} 
} > x86 FreeBSD 4.2-stable
} >
} > make check yields several
} > /usr/libexec/ld-elf.so.1: Shared object "libzsh-4.0.1-pre-5.so" not found
} >
} > It seems that make check uses a `make install.modules' but libzsh is
} > installed as part of `make install.bin'. We need to fix this but I'm not
} > sure I fully understand this part of the Makefiles. Isn't this an issue
} > for cygwin?
} >
} 
} No, it was there long before. I suspect, that tests were never run on a
} system that needed libzsh (or already installed version was silently
} used).
} 
} Exactly on Cygwin it runs correctly, because it tries first to find DLL in
} the same directory as executable.

Does this patch fix it?  Unfortunately $(DLLD) is the only reasonable
symbol to test that is available in Test/Makefile; $(LIBZSH) is defined in
Src/Makefile.in only.  So this may needlessly export LD_LIBRARY_PATH on a
system that does not require libzsh, but that should be harmless, right?

Index: Test/Makefile.in
===================================================================
diff -c -r1.1.1.1 Test/Makefile.in
--- Test/Makefile.in	2001/04/09 20:14:14	1.1.1.1
+++ Test/Makefile.in	2001/06/02 15:29:29
@@ -45,7 +45,11 @@
 	  cd $(dir_top) && \
 	  $(MAKE) MODDIR=`pwd`/$(subdir)/Modules install.modules > /dev/null; \
 	fi
-	-for f in $(sdir)/$(TESTNUM)*.ztst; do \
+	-if test -n "$(DLLD)"; then \
+	  LD_LIBRARY_PATH="`cd $(dir_top); pwd`/Src:$$LD_LIBRARY_PATH"; \
+	  export LD_LIBRARY_PATH; \
+	fi; \
+	for f in $(sdir)/$(TESTNUM)*.ztst; do \
 	  $(dir_top)/Src/zsh +Z -f $(sdir)/ztst.zsh $$f; \
 	done
 	rm -rf Modules .zcompdump

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: PATCH: "make check" with libzsh (e.g. FreeBSD)
  2001-06-02 15:49 PATCH: "make check" with libzsh (e.g. FreeBSD) Bart Schaefer
@ 2001-06-02 17:48 ` Andrej Borsenkow
  2001-06-03  0:52   ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Andrej Borsenkow @ 2001-06-02 17:48 UTC (permalink / raw)
  To: zsh-workers

On Sat, 2 Jun 2001, Bart Schaefer wrote:

> In zsh-workers/14451, Andrej wrote:
> }
> } On Wed, 23 May 2001, Oliver Kiddle wrote:
> }
> } > x86 FreeBSD 4.2-stable
> } >
> } > make check yields several
> } > /usr/libexec/ld-elf.so.1: Shared object "libzsh-4.0.1-pre-5.so" not found
> } >
> } > It seems that make check uses a `make install.modules' but libzsh is
> } > installed as part of `make install.bin'. We need to fix this but I'm not
> } > sure I fully understand this part of the Makefiles. Isn't this an issue
> } > for cygwin?
> } >
> }
> } No, it was there long before. I suspect, that tests were never run on a
> } system that needed libzsh (or already installed version was silently
> } used).
> }
> } Exactly on Cygwin it runs correctly, because it tries first to find DLL in
> } the same directory as executable.
>
> Does this patch fix it?  Unfortunately $(DLLD) is the only reasonable
> symbol to test that is available in Test/Makefile; $(LIBZSH) is defined in
> Src/Makefile.in only.  So this may needlessly export LD_LIBRARY_PATH on a
> system that does not require libzsh, but that should be harmless, right?
>

It is harmless all right. The actual problem is interaction between
LD_RUN_PATH encoded in executable and LD_LIBRARY_PATH. I.e. when two
libraries exist, which one is used. It may result in obscure test
failures.

The only proper workaround is to recompile zsh with different LD_RUN_PATH
value. Or use libtool - I guess, it is quite usable now. If it supports
Cygwin (there were issues) then it supports at least the same systems as
zsh internal tweaks.

-andrej


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

* Re: PATCH: "make check" with libzsh (e.g. FreeBSD)
  2001-06-02 17:48 ` Andrej Borsenkow
@ 2001-06-03  0:52   ` Bart Schaefer
  2001-06-03  8:40     ` Andrej Borsenkow
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2001-06-03  0:52 UTC (permalink / raw)
  To: Andrej Borsenkow, zsh-workers

On Jun 2,  9:48pm, Andrej Borsenkow wrote:
} Subject: Re: PATCH: "make check" with libzsh (e.g. FreeBSD)
}
} The actual problem is interaction between LD_RUN_PATH encoded in
} executable and LD_LIBRARY_PATH. I.e. when two libraries exist, which
} one is used. It may result in obscure test failures.

This is hardly ever going to be a problem except for someone who is
trying to keep up with individual patches.  For everyone else, the
version number will change between installs.

} The only proper workaround is to recompile zsh with different LD_RUN_PATH
} value. Or use libtool - I guess, it is quite usable now.

I've had nothing but trouble with it the last several times I tried to
use it.  Not because of any particular flaw in its function, but because
it now depends on the availability of various compatibility libraries,
which I've been unable to compile because they in turn depend on the very
latest gcc/glibc, or for various other reasons.

IMO using libtool would have the opposite of the intended effect -- it
would restrict the number of platforms on which zsh can easily be compiled.
However, I'm prepared to be convinced otherwise.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: PATCH: "make check" with libzsh (e.g. FreeBSD)
  2001-06-03  0:52   ` Bart Schaefer
@ 2001-06-03  8:40     ` Andrej Borsenkow
  2001-06-03 18:04       ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Andrej Borsenkow @ 2001-06-03  8:40 UTC (permalink / raw)
  To: zsh-workers

On Sun, 3 Jun 2001, Bart Schaefer wrote:

>
> This is hardly ever going to be a problem except for someone who is
> trying to keep up with individual patches.
>

And these are exactly those who need tests :-)
 -andrej


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

* Re: PATCH: "make check" with libzsh (e.g. FreeBSD)
  2001-06-03  8:40     ` Andrej Borsenkow
@ 2001-06-03 18:04       ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2001-06-03 18:04 UTC (permalink / raw)
  To: zsh-workers

On Jun 3, 12:40pm, Andrej Borsenkow wrote:
} Subject: Re: PATCH: "make check" with libzsh (e.g. FreeBSD)
}
} On Sun, 3 Jun 2001, Bart Schaefer wrote:
} 
} > This is hardly ever going to be a problem except for someone who is
} > trying to keep up with individual patches.
} 
} And these are exactly those who need tests :-)

Actually, I was thinking that the tests are really needed by people who
are building on a new platform for the first time.  The developers are
more likely to know what they're doing -- for example, as of right now,
you can't run "make check" for a static build without knowing that you
have to change the default linkage of zpty.

In any case, *re*compiling with a different LD_RUN_PATH doesn't seem to
be an option.  We could, however, compile two different zsh binaries --
e.g., zsh and zsh-test -- and use the zsh-test binary for "make check".
On systems without libzsh, zsh-test could just be a link to zsh, but
where libzsh was needed, it'd be a separate binary with LD_RUN_PATH set
to the build directory.

Then we'd have to update the tests to always run zsh-test rather than
just zsh.  We'd still need an LD_LIBRARY_PATH patch in Test/Makefile.in
for systems that don't use an LD_RUN_PATH.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

end of thread, other threads:[~2001-06-03 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-02 15:49 PATCH: "make check" with libzsh (e.g. FreeBSD) Bart Schaefer
2001-06-02 17:48 ` Andrej Borsenkow
2001-06-03  0:52   ` Bart Schaefer
2001-06-03  8:40     ` Andrej Borsenkow
2001-06-03 18:04       ` Bart Schaefer

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