poke-devel
[Top][All Lists]
Advanced

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

Re: GNU poke 3.90.1 and pokefmt


From: Jose E. Marchesi
Subject: Re: GNU poke 3.90.1 and pokefmt
Date: Mon, 22 Jan 2024 22:47:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Bruno.

> The pokefmt saga is not solved. When I
> - take poke 3.90.1,
> - build it with CC and CXX values that use clang with ASAN and UBSAN,
> - do "make install" of these binaries,
> - build it again, this time with CC="clang" and CXX="clang++",
> I again get test failures related to pokefmt:
>
> ================================================================================
> Making a new site.exp file ...
> Using ../../testsuite/lib/poke.exp as tool init file.
> Test run by bruno on Mon Jan 22 18:39:52 2024
> Native configuration is x86_64-pc-linux-gnu
>
>                 === poke tests ===
>
> Schedule of variations:
>     unix
>
> Running target unix
> Using /usr/share/dejagnu/baseboards/unix.exp as board description file for 
> target.
> Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
> Using /build/poke-3.90.1/testsuite/config/unix.exp as 
> tool-and-target-specific interface file.
> Running /build/poke-3.90.1/testsuite/poke.cmd/cmd.exp ...
> Running /build/poke-3.90.1/testsuite/poke.libpoke/libpoke.exp ...
> Running /build/poke-3.90.1/testsuite/poke.map/map.exp ...
> Running /build/poke-3.90.1/testsuite/poke.pickles/pickles.exp ...
> Running /build/poke-3.90.1/testsuite/poke.pkl/pkl.exp ...
> Running /build/poke-3.90.1/testsuite/poke.pktest/pktest.exp ...
> Running /build/poke-3.90.1/testsuite/poke.pokefmt/pokefmt.exp ...
> ERROR: tcl error sourcing 
> /build/poke-3.90.1/testsuite/poke.pokefmt/pokefmt.exp.
> ERROR: /build/poke-3.90.1/build-64-clang/pokefmt/.libs/pokefmt: symbol lookup 
> error: /inst-x86_64-64/lib/libpoke.so.1: undefined symbol: 
> __asan_option_detect_stack_use_after_return
>     while executing
> "exec $POKEFMT < $fin > $fout"
>     (procedure "pokefmt_run" line 12)
>     invoked from within
> "pokefmt_run 1 "Hi" "Hi""
>     (file "/build/poke-3.90.1/testsuite/poke.pokefmt/pokefmt.exp" line 62)
>     invoked from within
> "source /build/poke-3.90.1/testsuite/poke.pokefmt/pokefmt.exp"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel #0 source /build/poke-3.90.1/testsuite/poke.pokefmt/pokefmt.exp"
>     invoked from within
> "catch "uplevel #0 source $test_file_name""
> Running /build/poke-3.90.1/testsuite/poke.pvm/pvm.exp ...
> Running /build/poke-3.90.1/testsuite/poke.repl/repl.exp ...
> Running /build/poke-3.90.1/testsuite/poke.std/std.exp ...
> Running /build/poke-3.90.1/testsuite/poke.time/time.exp ...
>
>                 === poke Summary ===
>
> # of expected passes            7971
> # of expected failures          3
> # of unsupported tests          3
> make[4]: *** [Makefile:5896: check-DEJAGNU] Error 2
> make[4]: Leaving directory '/build/poke-3.90.1/build-64-clang/testsuite'
> make[3]: *** [Makefile:5774: check-am] Error 2
> make[3]: Leaving directory '/build/poke-3.90.1/build-64-clang/testsuite'
> make[2]: *** [Makefile:5594: check-recursive] Error 1
> make[2]: Leaving directory '/build/poke-3.90.1/build-64-clang/testsuite'
> make[1]: *** [Makefile:2860: check-recursive] Error 1
> make[1]: Leaving directory '/build/poke-3.90.1/build-64-clang'
> make: *** [Makefile:3160: check] Error 2
> ================================================================================
>
> The unit tests reference both 'poke' and 'pokefmt'. The use of 'poke' does
> not access 'libpoke' in the installation directory, but the use of 'pokefmt'
> does. How come?
>
> We have libtool wrappers for 3 programs:
> -rwxrwxr-x 1 bruno bruno 155992 Jan 22 18:39 poked/.libs/poked
> -rwxrwxr-x 1 bruno bruno 132504 Jan 22 18:39 pokefmt/.libs/pokefmt
> -rwxrwxr-x 1 bruno bruno 437128 Jan 22 18:39 poke/.libs/poke
>
> Look at the line that sets LD_LIBRARY_PATH in these wrappers:
>
> poke/poke:
>     
> LD_LIBRARY_PATH="/build/poke-3.90.1/build-64-clang/libpoke/.libs:/inst-x86_64-64/lib:$LD_LIBRARY_PATH"
> pokefmt/pokefmt:
>     
> LD_LIBRARY_PATH="/inst-x86_64-64/lib:/build/poke-3.90.1/build-64-clang/libpoke/.libs:$LD_LIBRARY_PATH"
> poked/poked:
>     
> LD_LIBRARY_PATH="/inst-x86_64-64/lib:/build/poke-3.90.1/build-64-clang/libpoke/.libs:$LD_LIBRARY_PATH"
>
> The one in poke/poke is good. In it, the build dir overrides any global dirs.
> The other two are not good.
>
> The cause is that libgnu.la needs the /inst-x86_64-64/lib directory (for
> libtextstyle, libreadline, etc.) and is passed to libtool *first*!
>
> The following patch fixes this problem. (But no need to revert the LTV_* bump;
> that was useful in any case.)

Installed in both maint/poke-4 and master.
Thanks!

> Bruno
>
>>From 6a91e1428d1ccbb2972efab9ba235b69bddd9712 Mon Sep 17 00:00:00 2001
> From: Bruno Haible <bruno@clisp.org>
> Date: Mon, 22 Jan 2024 21:26:11 +0100
> Subject: [PATCH] pokefmt, poked: In the build dir, don't access a previously
>  installed libpoke.so.
>
> libgnu.la may reference libtextstyle, libreadline, and other libraries that 
> are
> installed in global locations. If it is listed before libpoke.la in a *_LDADD
> variable, these global locations have precedence over libpoke/.libs/ in the
> LD_LIBRARY_PATH, and pokefmt/pokefmt and poked/poked from the build dir may
> thus use libpoke.so from the global locations. This needs to be avoided.
>
> * pokefmt/Makefile.am (poked_LDADD): Mention libpoke.la before libgnu.la.
> * poked/Makefile.am (poked_LDADD): Likewise.
> ---
>  poked/Makefile.am   | 4 ++--
>  pokefmt/Makefile.am | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/poked/Makefile.am b/poked/Makefile.am
> index c526de81..5c196b51 100644
> --- a/poked/Makefile.am
> +++ b/poked/Makefile.am
> @@ -35,7 +35,7 @@ poked_CPPFLAGS = -I$(top_srcdir)/common \
>                   -I$(top_builddir)/gl -I$(top_srcdir)/gl \
>                   -I$(top_srcdir)/libpoke -I$(top_builddir)/libpoke
>  poked_CFLAGS = -Wall
> -poked_LDADD = $(top_builddir)/gl/libgnu.la \
> -              $(top_builddir)/libpoke/libpoke.la \
> +poked_LDADD = $(top_builddir)/libpoke/libpoke.la \
> +              $(top_builddir)/gl/libgnu.la \
>                -lpthread
>  poked_LDFLAGS =
> diff --git a/pokefmt/Makefile.am b/pokefmt/Makefile.am
> index 8f75b166..37a2f352 100644
> --- a/pokefmt/Makefile.am
> +++ b/pokefmt/Makefile.am
> @@ -78,6 +78,6 @@ pokefmt_CPPFLAGS = -I$(top_srcdir)/common \
>                     -I$(top_builddir)/gl -I$(top_srcdir)/gl \
>                     -I$(top_srcdir)/libpoke -I$(top_builddir)/libpoke
>  pokefmt_CFLAGS = -Wall
> -pokefmt_LDADD = $(top_builddir)/gl/libgnu.la \
> -                $(top_builddir)/libpoke/libpoke.la
> +pokefmt_LDADD = $(top_builddir)/libpoke/libpoke.la \
> +                $(top_builddir)/gl/libgnu.la
>  pokefmt_LDFLAGS =



reply via email to

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