libtool-patches
[Top][All Lists]
Advanced

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

Re: mdemo ltdl failure


From: Charles Wilson
Subject: Re: mdemo ltdl failure
Date: Wed, 25 Apr 2007 10:29:57 -0400
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Revised patch attached.  Differences from Ralf's version are minor:
98c98
< +       set x `uname -r`
---
> +       set x `uname -r | $SED -e 's/^\([[0-9\.]]*\).*/\1/'`
100,102c100,102
< +       lt_os_major=$[]2
< +       lt_os_minor=$[]3
< +       lt_os_micro=$[]4
---
> +       lt_os_major=$[]{2-0}
> +       lt_os_minor=$[]{3-0}
> +       lt_os_micro=$[]{4-0}


TESTING
===================================================================

Testing was successful.  Test configuration was
  (1) used autoconf-2.59, automake-1.9.6
(2) using libtool-HEAD from 2007-Apr-24 with the attached patch (that is, my "cwrapper emits wrapper script" patch and "eliminate wrapper script from '.'" patch were NOT present.

(NOTES: "works" means that mdemo-conf/mdemo-make/mdemo-exec passes. Also, I checked every libltdl ahd mdemo/mlib shared library explicitly using objdump or nm to determine whether system argz functions were imported, or whether it exported its own replacement argz functions. In each case, the results "track" with what should be expected, for each of the six test cases below)

(1) broken cygwin kernel (1.5.24-2 used, but any older would do)
     --reports that system argz is broken, builds successfully
       using libltdl's argz
     --resultant libraries and mdemo tests also work after dropping
       in a fixed cygwin kernel.

(2) fixed cygwin kernel (official snapshot from 20070330)
     --reports that system argz works, builds successfully using
       system argz
     --resultant libraries coredump if you drop in a broken cygwin
       kernel after the fact.  This is expected: broken cygwin is
       "broken" precisely because its argz facility coredumps on
       argz_insert().

(3) fixed cygwin kernel, but with 'export $lt_cv_sys_argz_works=no'.
     --reports that system argz does not work (cached), and builds
       successfully using libltdl's argz
     --resultant libraries works fine even after dropping in a
       broken cygwin kernel.

(4) linux (whose system argz is OK)
     --reports that system argz works, builds successfully using
       system argz, works.

(5) linux, but with 'export $lt_cv_sys_argz_works=no'.
     --reports that system argz does not work (cached), and builds
       successfully using libltdl's argz.  The result works.

(6) mingw, which doesn't have any system argz facility at all
     --because the argz functions are not declared, the section
       of the configure script that reports whether system argz
       works is not even run, nor is the cache checked.  configure
       has already decided to use the libltdl-supplied argz.
     --and, in fact, build is completed successfully using libltdl
       supplied argz, and the result works.

Also, ran the entire testsuite under conditions (1), (4), and (6):
___________________________________________________________
(1) cygwin --
======================
All 115 tests passed
(9 tests were not run)  <<<< no gfortran
======================
 14: Java convenience archives       FAILED (convenience.at:273)
 16: Link order of deplibs.          FAILED (link-order2.at:129)
 51: Run tests with low max_cmd_len  FAILED (cmdline_wrap.at:43)
testsuite.log attached.
___________________________________________________________
(4) linux --
====================
All 106 tests passed
====================
49 tests behaved as expected.
2 tests were skipped.
No testsuite.log necessary.
___________________________________________________________
(6) mingw -- it actually ran tbe new testsuite this time
======================
All 115 tests passed
(9 tests were not run)  <<<< no gfortran
======================
 14: Java convenience archives       FAILED (convenience.at:273)
 16: Link order of deplibs.          FAILED (link-order2.at:129)
 25: DESTDIR with in-package deplibs FAILED (destdir.at:131)
 33: installable libltdl             FAILED (standalone.at:69)
 37: installable libltdl             FAILED (subproject.at:99)
 41: installable libltdl             FAILED (nonrecursive.at:143)
 44: installable libltdl             FAILED (recursive.at:113)
 51: Run tests with low max_cmd_len  FAILED (cmdline_wrap.at:43)
testsuite.log attached.

Note that 33,37,41,44 appear to be due to msys trying to execute "INSTALL" as if it were install.exe. Not sure about 25, but 14/16/51 are the same as cygwin.

PATCH
===================================================================

ChangeLog:

2007-04-25  Charles Wilson  <address@hidden>
            Ralf Wildenhues  <address@hidden>

        * libltdl/argz_.h: ensure error_t definition is obtained
        in same mechanism system argz.h would have.
        * libltdl/libltdl/lt__glibc.h: also detect if
        SYSTEM_ARGZ_IS_BROKEN when determining whether to re#def
        argz* functions.
        * libltdl/m4/argz.m4 (gl_FUNC_ARGZ): add new test to check
        if $host's argz facilities are known bad.  Err on the side
        of caution if cross-compiling.

--
Chuck





Index: libltdl/argz_.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/argz_.h,v
retrieving revision 1.7
diff -u -r1.7 argz_.h
--- libltdl/argz_.h     25 Mar 2007 12:12:42 -0000      1.7
+++ libltdl/argz_.h     25 Apr 2007 03:10:59 -0000
@@ -1,6 +1,6 @@
 /* lt__argz.h -- internal argz interface for non-glibc systems
 
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007 Free Software Foundation, Inc.
    Written by Gary V. Vaughan, 2004
 
    NOTE: The canonical source of this file is maintained with the
@@ -32,6 +32,8 @@
 #define LT__ARGZ_H 1
 
 #include <stdlib.h>
+#define __need_error_t
+#include <errno.h>
 #include <sys/types.h>
 
 #if defined(LTDL)
Index: libltdl/libltdl/lt__glibc.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/libltdl/lt__glibc.h,v
retrieving revision 1.8
diff -u -r1.8 lt__glibc.h
--- libltdl/libltdl/lt__glibc.h 25 Mar 2007 12:12:43 -0000      1.8
+++ libltdl/libltdl/lt__glibc.h 25 Apr 2007 03:11:02 -0000
@@ -1,6 +1,6 @@
 /* lt__glibc.h -- support for non glibc environments
 
-   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
    Written by Gary V. Vaughan, 2004
 
    NOTE: The canonical source of this file is maintained with the
@@ -37,7 +37,7 @@
 #  include <config.h>
 #endif
 
-#if !defined(HAVE_ARGZ_H)
+#if !defined(HAVE_ARGZ_H) || defined(SYSTEM_ARGZ_IS_BROKEN)
 /* Redefine any glibc symbols we reimplement to import the
    implementations into our lt__ namespace so we don't ever
    clash with the system library if our clients use argz_*
Index: libltdl/m4/argz.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/m4/argz.m4,v
retrieving revision 1.4
diff -u -r1.4 argz.m4
--- libltdl/m4/argz.m4  25 Mar 2007 12:12:43 -0000      1.4
+++ libltdl/m4/argz.m4  25 Apr 2007 03:11:02 -0000
@@ -1,13 +1,13 @@
 # Portability macros for glibc argz.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan <address@hidden>
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 4 argz.m4
+# serial 5 argz.m4
 
 AC_DEFUN([gl_FUNC_ARGZ],
 [gl_PREREQ_ARGZ
@@ -27,6 +27,50 @@
 ARGZ_H=
 AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next \
        argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
+
+dnl if have system argz functions, allow forced use of 
+dnl libltdl-supplied implementation (and default to do so
+dnl on "known bad" systems). Could use a runtime check, but
+dnl (a) detecting malloc issues is notoriously unreliable
+dnl (b) only known system that declares argz functions,
+dnl     provides them, yet they are broken, is cygwin
+dnl     releases prior to 16-Mar-2007 (1.5.24 and earlier)
+dnl So, it's more straightforward simply to special case 
+dnl this for known bad systems.
+AS_IF([test -z "$ARGZ_H"],
+    [AC_CACHE_CHECK(
+        [if argz actually works],
+        [lt_cv_sys_argz_works],
+        [case $host_os in #(
+        *cygwin*)
+          lt_cv_sys_argz_works=no
+          if test "$cross_compiling" != no; then
+            lt_cv_sys_argz_works="guessing no"
+          else
+            save_IFS=$IFS
+            IFS=-.
+            set x `uname -r | $SED -e 's/^\([[0-9\.]]*\).*/\1/'`
+            IFS=$save_IFS
+            lt_os_major=$[]{2-0}
+            lt_os_minor=$[]{3-0}
+            lt_os_micro=$[]{4-0}
+            if test "$lt_os_major" -gt 1 ||
+               { test "$lt_os_major" -eq 1 &&
+                 { test "$lt_os_minor" -gt 5 ||
+                   { test "$lt_os_minor" -eq 5 &&
+                     test "$lt_os_micro" -gt 24; }; }; }; then
+              lt_cv_sys_argz_works=yes
+            fi
+          fi
+          ;; #(
+        *) lt_cv_sys_argz_works=yes ;;
+        esac])
+     AS_IF([test $lt_cv_sys_argz_works != yes],
+        [AC_DEFINE([SYSTEM_ARGZ_IS_BROKEN], 1,
+                   [This value is set to 1 to indicate that the system argz 
facility does not work])
+        ARGZ_H=argz.h
+        AC_LIBOBJ([argz])])])
+
 AC_SUBST([ARGZ_H])
 ])
 

Attachment: libtool-2.1a-csw4-check-cygwin-testsuite.log.bz2
Description: Binary data

Attachment: libtool-2.1a-csw4-check-mingw-testsuite.log.bz2
Description: Binary data


reply via email to

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