libtool-patches
[Top][All Lists]
Advanced

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

Cygwin patches [resend]


From: Charles Wilson
Subject: Cygwin patches [resend]
Date: Sat, 19 Oct 2002 17:04:57 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2

Resent. Although the original submission was (eventually) archived, it doesn't seem to have been distributed on the mailing list thanks to mail.gnu.org flukiness last week. Trying again...hopefully this one will get distributed to the ml. [also copied directly to Bob, since he asked]

Charles Wilson wrote:

Here is the latest version of the cygwin patches. Note that I have done *nothing* to enable g77-based shared libs; so, they don't work. But that's okay by me, for now. [Besides, some of the work needed for *real* fortran shared libs on cygwin is in the g77 frontend itself, not just libtool --- see notes, below].


--Chuck

2002-10-15  Charles Wilson  <address@hidden>

        * libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): avoid long delay on
        cygwin/Win9x when computing commandline length.
        (AC_LIBTOOL_SYS_DYNAMIC_LINKER): fix postinstall_cmds when
        sources are in a subdirectory
        * ltdl.m4 (AC_LTDL_SYSSEARCHPATH): use $PATH_SEPARATOR, not
        $ac_path_separator
        * configure.ac: move depdemo-specific stuff.  You must configure
        libtool before you can try './libtool --features'.
        * mdemo-inst.test: set $PATH to include the directory in which
        the modules are instaled (on cygwin, DLL search path is the
        $PATH)

TEST RESULTS:

With cygwin's patched automake-1.6.2, libtool (CVS 2002-10-15) as
patched, passes all tests but:
  build-relink2             (***.dll not found win32 popups)
  quote
  f77demo-exec (after f77demo-conf)
  f77demo-exec (after f77demo-shared)

build-relink2:
-------------------

I fixed one bug, but another showed up: $PATH doesn't
get set properly when running this test...This test
used to get skipped on cygwin, but no longer?  Anyway, unlike
mdemo-inst, this test can't be fixed easily on cygwin.

quote:
-------------------
compile mode seems okay
install mode seems okay
link mode *always* fails -- like this:
 "failed: mkdir .libs
  gcc -o hell.exe -g -O -Wl,-someflag=test foo.o"
?? *mkdir* fails??
But it works fine in compile mode---
 "passed: mkdir .libs
  gcc -c "-DVAR= test    " foo.c  -DPIC -o .libs/foo.o
  gcc -c "-DVAR= test    " foo.c -o foo.o >/dev/null 2>&1"

f77demo-exec:
-------------------
the f77 frontend to gcc doesn't support declspec attributes -- nor
auto-import -- so shared libs built using f77 that 'export' DATA
items (common block variables?  It's been a long time since I used
Fortran) is a no-go.  This isn't a libtool problem -- it's a "g77
on cygwin building DLLs in the first place" problem.

In any case, there is *no* special support in libtool for handling
f77 shared libs on cygwin at all -- regardless of whether they attempt
to export DATA items or not.  So, both the -conf and -shared test regimes fail.

OTHER NOTES:
-------------------

PASSED:  build-relink

build-relink didn't get skipped like it used to be in 20020316-1.
We expect a failure here, and we got it -- so technically we PASSED
this test.  However, the failure mode was a Win32 popup "procedure
entry point foo could not be located in the dynamic link library
cyghello-2.dll" -- requiring manual intervention to dismiss the
popup...

This means you can't run the test suite unattended -- even if all tests "pass". 
 Good?  Bad?

PASSED: mdemo-inst (mdemo-conf and mdemo-shared):
-------------------

modules are not installed in the path, nor are they in
the same directory as the executable.  So, the test
fails because windows can't find the installed DLL.
This is a testing error, not a real error.  Set the
$PATH appropriately -- as the attached patch does -- and the test succeeds.


Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.268
diff -u -r1.268 libtool.m4
--- libtool.m4  15 Oct 2002 22:50:58 -0000      1.268
+++ libtool.m4  19 Oct 2002 20:58:27 -0000
@@ -620,6 +620,16 @@
     lt_cv_sys_max_cmd_len=-1;
     ;;
 
+  cygwin*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
   
   mingw*)
     # On msys 1.0 and win98, the maximum length was something like
@@ -1132,10 +1142,11 @@
   yes,cygwin* | yes,mingw*)
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='dlpath=`$SHELL 2>&1 -c '\''. $dir/${file}i;echo 
\$dlname'\''`~
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo 
\$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
+      $install_prog $dir/$dlname \$dldir/$dlname'
     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
       dlpath=$dir/\$dldll~
        $rm \$dlpath'
Index: ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/ltdl.m4,v
retrieving revision 1.43
diff -u -r1.43 ltdl.m4
--- ltdl.m4     28 Aug 2002 20:40:28 -0000      1.43
+++ ltdl.m4     19 Oct 2002 20:58:31 -0000
@@ -243,7 +243,7 @@
     if test -z "$sys_search_path"; then
       sys_search_path="$dir"
     else
-      sys_search_path="$sys_search_path$ac_path_separator$dir"
+      sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
     fi
   done
   AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
Index: depdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/depdemo/configure.ac,v
retrieving revision 1.4
diff -u -r1.4 configure.ac
--- depdemo/configure.ac        3 Mar 2002 03:19:55 -0000       1.4
+++ depdemo/configure.ac        19 Oct 2002 20:58:32 -0000
@@ -26,17 +26,6 @@
 AC_CONFIG_SRCDIR([main.c])
 
 
-## ------------------------------- ##
-## depdemo specific configuration. ##
-## ------------------------------- ##
-if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
-  STATIC=-static
-else
-  STATIC=
-fi
-AC_SUBST([STATIC])
-
-
 ## ------------------------ ##
 ## Automake Initialisation. ##
 ## ------------------------ ##
@@ -56,6 +45,15 @@
 AM_PROG_LIBTOOL
 AC_SUBST([LIBTOOL_DEPS])
 
+## ------------------------------- ##
+## depdemo specific configuration. ##
+## ------------------------------- ##
+if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
+  STATIC=-static
+else
+  STATIC=
+fi
+AC_SUBST([STATIC])
 
 ## ---------------------------- ##
 ## C headers required by cdemo. ##
Index: tests/mdemo-inst.test
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/mdemo-inst.test,v
retrieving revision 1.12
diff -u -r1.12 mdemo-inst.test
--- tests/mdemo-inst.test       3 Mar 2002 03:19:55 -0000       1.12
+++ tests/mdemo-inst.test       19 Oct 2002 20:58:32 -0000
@@ -24,6 +24,8 @@
 $make install || exit 1
 
 echo "= Executing installed programs"
+path_old=$PATH
+PATH=$prefix/lib:$PATH
 
 status=0
 if $prefix/bin/mdemo_static $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then :
@@ -44,4 +46,5 @@
   status=1
 fi
 
+PATH=$path_old
 exit $status

reply via email to

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