chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Use local -rpath in tests [was: Re: [PATCH


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Use local -rpath in tests [was: Re: [PATCH] Fix finalizer issue on non-GCable constants]
Date: Fri, 21 Mar 2014 08:39:31 +0100
User-agent: Mutt/1.4.2.3i

On Thu, Mar 20, 2014 at 10:04:51PM +0100, Peter Bex wrote:
> This rpath is in PREFIX, but when this path doesn't exist, it will fail
> to find libchicken.so and will then look in LD_LIBRARY_PATH for the
> library.  That means it works when CHICKEN really isn't installed yet,
> but if you just built a newer version which you haven't installed yet,
> it'll run all the tests against the previously built CHICKEN!
> 
> The solution is very simple: just pass -rpath in the COMPILATION_OPTIONS.

I forgot to mention: This works for the binary tools called form the
runtests.sh scripts (notably csi, for the interpreted tests) because
they aren't linked with an -rpath at first.  On platforms that have
NEEDS_RELINKING (most of the *nix variants), the binaries will be
relinked with a correct rpath just before installation.  Without a
hardcoded rpath, the LD_LIBRARY_PATH (which runtests.sh exports)
will be honored.

> This can be tested in a straightforward way:
> 
> - build and install under PREFIX "A"
> - make spotless
> - patch runtime.c to have panic(C_text("wrong libchicken.so!\n")); at
>    the end of CHICKEN_initialize()
> - build and install under PREFIX "B" (using CHICKEN under "A")
> - revert patch and build again with PREFIX "B", but *don't* install
>    (using CHICKEN under "A")
> - run "make check"

It would be nice if someone on OS X could test this.  I have so far
tested it on Linux and the three Windows variants.  runtest.bat does
not need to be patched because Windows uses a different algorithm
to find libraries, which doesn't really involve an rpath in our case.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]