libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Add --lt-* options to shell wrapper


From: Charles Wilson
Subject: Re: [PATCH] Add --lt-* options to shell wrapper
Date: Thu, 18 Feb 2010 21:48:45 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

Ralf Wildenhues wrote:
> See above for the two cases.  With them fixed, I think the patch looks
> to be in fairly good shape, except that shell quoting bugs are really
> hard to detect when reading the doubly-quoted code.  So please fix
> above, resend, and apply if you don't hear back after 72 hours.

Squashed together and reposted from:

http://lists.gnu.org/archive/html/libtool-patches/2009-12/msg00015.html
and followon
http://lists.gnu.org/archive/html/libtool-patches/2010-01/msg00048.html
with more additions arising from Ralf's further comments this week:

    * libltdl/config/ltmain.m4sh (func_emit_wrapper_impl): Renamed to...
    (func_emit_wrapper): This. Old version removed.
    (func_parse_lt_options, func_lt_dump_args, func_exec_program_core):
    Use $LINENO, not @@LINENO@@.
    (func_opts_contain_lt): Removed.
    (func_exec_program): Rewrite to avoid forks and requoting.


This (combination) was the second of the two patches whose /first/
72hour rule invocation was here:
http://lists.gnu.org/archive/html/libtool-patches/2010-02/msg00003.html

Starting a new clock. No regressions attributable to these changes, on
cygwin or mingw.  No test failures at all on linux.

Consolidated changelog:

2010-02-18  Charles Wilson  <...>

        Add --lt-* options to shell wrapper
        * libltdl/config/ltmain.m4sh (func_emit_wrapper): Call
        func_parse_lt_options early. Use func_exec_program.
        (func_emit_wrapper:func_parse_lt_options): New function.
        (func_emit_wrapper:func_lt_dump_args): New function.
        (func_emit_wrapper:func_exec_program_core): New function.
        (func_emit_wrapper:func_exec_program): New function.

Test results:

It does not appear that there were any regressions caused by THESE
changes.  There are a few items that need investigation, but...later.


cygwin
======================================================================
All old tests passed.

New tests:
48: deplib in subdir                 FAILED (deplib-in-subdir.at:140)
69: dlloader API                     FAILED (dlloader-api.at:416)
92: C++ exception handling           FAILED (exceptions.at:254)
102: Run tests with low max_cmd_len  FAILED (cmdline_wrap.at:43)

048:
----------------------------------
libtool: install: cp .libs/m3.exe
.../tests/testsuite.dir/048/inst/bin/m3.exe
../../libtool/tests/deplib-in-subdir.at:140: $LIBTOOL --mode=clean rm -f
sub1/liba1.la sub1/liba2.la sub1/liba3.la       sub2/subsub/libb1.la
sub2/subsub/libb2.la sub2/subsub/libb3.la          sub3/subsub/m1$EXEEXT
sub3/subsub/m2$EXEEXT sub3/subsub/m3$EXEEXT
stderr:
.../libtool: line 1693: sub3/subsub/sub3/subsub/.libs/m1_ltshwrapper: No
such file or directory

in func_mode_uninstall, func_ltwrapper_scriptname_result is wrong
because objdir has been reset to be fullpathto, rather than just .libs,
before call to func_ltwrapper_scriptname.  So, when trying to source the
script, it dies.

069:
----------------------------------
 who knows, but it's somewhere in libltdl not libtool

--- expout      2010-02-18 03:12:56.231600000 -0500
+++ .../tests/testsuite.dir/at-groups/69/stdout 2010-02-18
03:13:09.261600000 -0500
@@ -9,11 +9,7 @@
 first_open denies a request
 result: module_symbol
 first_open denies a request
-last_open ("last"): last_ctx
-last_sym (last): last_ctx
-result: last_symbol
-first_open denies a request
 last_open denies a request
+lt_dlopen failed: file not found
 first_exit: first_ctx
-last_close (last): last_ctx
 last_exit: last_ctx


092:
----------------------------------
segfault in executable.  Pretty sure this isn't a problem in ltmain.m4sh

test "X$host" != "X$build" && test -x "$lt_exe" && exit 77;     exit
$lt_status; fi
stderr:
exceptions_in_prog
caught: exception in program
exceptions_in_lib
caught inside lib: exception in library
caught: exception from library
exceptions_in_module
caught inside module: exception in module
caught: exception from module
.../tests/testsuite.dir/at-groups/92/test-source: line 377:
5920 Segmentation fault      (core dumped)
$LIBTOOL --mode=execute -dlopen m/module.la "$lt_exe"
stdout:
../../libtool/tests/exceptions.at:254: exit code was 139, expected 0



102:
----------------------------------
low max_cmd_len: repeat of above errs


mingw:
======================================================================
FAIL: tests/tagdemo-make.test
FAIL: tests/tagdemo-make.test
FAIL: tests/tagdemo-make.test
FAIL: tests/tagdemo-make.test
27: C++ convenience archives         FAILED (convenience.at:99)
48: deplib in subdir                 FAILED (deplib-in-subdir.at:140)
62: C++ subdir-objects               FAILED (am-subdir.at:148)
89: (C++ template tests):simple template test   FAILED (template.at:89)
90: (C++ template tests):template test with subdirs FAILED
                                                    (template.at:241)
91: C++ static constructors          FAILED (ctor.at:62)
92: C++ exception handling           FAILED (exceptions.at:242)
102: Run tests with low max_cmd_len  FAILED (cmdline_wrap.at:43)

Basically, it appears that C++ support is borked on MinGW, because all
of the failures except #48 are c++ related.  It has something to do with
the new 4.4.0 compiler, which ships the import library for the C++
runtime as libstdc++_s.a, but the .la file shipped with gcc claims that
library_names='libstdc++.dll.a'.

This is really a packaging bug in MinGW's g++, but the fix is not
simple. Unlike cygwin, in which the default linking behavior and default
runtime usage agree (ld prefers .dll.a, and gcc prefers to link to
dynamic runtimes) -- mingw-gcc and mingw-ld disagree on the proper
default behavior with regards to the runtime libs.  mingw-ld prefers
.dll.a, but mingw-gcc defaults to -static-libstdc++.  To make this work
(in the absence of libtool), the import library is given a non-standard
name (libstdc++_s.a).

Cygwin shows (showed?) similar issues with you tried to mix
-static-libstdc++ with libtool.

Anyway, fixing that is beyond the scope of this patch.  The only
remaining test failure is the #48, which fails for the same reasons as
described above.

Linux:
======================================================================
All test passed, in both the old and new testsuites.

Attachment: 0027-Add-lt-options-to-shell-wrapper-rev3.patch
Description: Text Data


reply via email to

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