Re: [SCM] GNU Libtool branch, master, updated. v2.2.10-49-gc13532a
Den 2010-07-04 20:26 skrev Ralf Wildenhues: Oh well. So, is anyone of you working on a testsuite addition, so I'd be doing double work? I'm not, I haven't even looked at what the code does. I was only looking through the patch, hunting for that other regression when I found this hunk which looked suspicious and asked a quick question. Then Gary answered with OK to push, so I figured I'd have to write a patch first. It seemed so simple and I had Gary behind me so I didn't even run a test. But it seems nothing is ever as simple as it looks... Cheers, Peter
Re: [PATCH] [cygwin|mingw] fix dlpreopen with --disable-static (take 8?)
Hi Chuck, On 3 Jul 2010, at 22:34, Charles Wilson wrote: It's non-timely and off-point reviews that I tire of. The non-timely bit is just a reflection of the manpower and free time issues that all open source projects are subject to, so that kinda goes with the territory. Nobody likes it, but...you just gotta live with it. By off-point I mean discussing non-germane or wishlist items as part of a review. If the reviewer isn't VERY careful, such off-topic dicta can appear to imply that acceptance of a particular patch is predicated on solving longstanding wishlist items or software design misfeatures that long predate the patch in question. Most potential contributors -- myself included -- are scratching their own itch: X doesn't work, and I want to fix it. It's discouraging to be told (or THINK you are told) we won't fix X until you or somebody else fixes huge, gaping, gargantuan problems Y and Z. Those problems are really hard to solve, and have existed for years. They are SO hard that none of US experts have even tried to tackle it. BUT...we won't accept your patch for X until somebody steps up to the plate for Y and Z Which...sounds a whole lot like We appreciate the submission of your manuscript The Life and Times of an New York Meter Maid. However, at this time there are no opportunities for additional entries in our New York True Life book series. Thank you for your interest in Bob's Publishing Company, and Keep Writing! Unless the contributor of patch X goes off to scratch YOUR itch regarding Y and Z. That's not the way free software contributors are best motivated. On 6/28/2010 3:23 AM, Gary V. Vaughan wrote: Nevertheless, please do remember that it is a *review*, and if you find yourself disagreeing with something (excepting an outright veto of course), Ralf and I are both acutely aware that you are the one doing the work on these patches and the last thing we want to do is retard the progress of Libtool on Windows, so please don't be afraid to say on balance, I'd rather see this patch move Libtool forward in some small way without addressing issue X right now. Often, we'll concede in exchange for a TODO item! :) That's an...interesting take. I've never assumed that ANY contribution would be acceptable unless it received an actual approval by a maintainer. I mean, really: here's this patch, and no single maintainer has endorsed it without some significant objection -- and I should feel free as a non-maintainer to say well, I disagree, so I'm pushing anyway?? Just to clarify, that isn't what I meant -- rather, well, I disagree, and as you can see, despite its faults, patch X alone already makes things less bad than they were previously. Is it okay if I push X in its current state, and then tackle Y later? I've no inclination to work on Z, but I'll put a reference to this thread in libtool/TODO so it isn't entirely forgotten. And I believe that we'll often say sure, or good point, go ahead. Maybe you mean after a few more rounds of negotiation on the mailing list, maintainers may acquiesce with reservation to an un-revised version of particular patch... That too. On 28 Jun 2010, at 13:10, Ralf Wildenhues wrote: * Charles Wilson wrote on Mon, Jun 28, 2010 at 12:05:40AM CEST: On 6/27/2010 4:43 PM, Ralf Wildenhues wrote: I don't see this method as the new method of choice. We already have a mechanism for years to transport values to the libtool script with _LT_DECLs and _LT_TAGDECLs, and at least for small code snippets, Yeah, that's the problem. I wrote _LT_DECL and _LT_TAGDECL to propagate shell variable declarations to the libtool script, and I fear it will behave badly if we try to use that mechanism for shoehorning anything else through, especially because it works by doing a *lot* of booking-keeping at m4 time. That's what I thought. Windows postinstall_cmds is pretty much the outer limit, IMO: postinstall_cmds=base_file=\\\`basename \\\${file}\\\`~ dlpath=\\\`\$SHELL 21 -c '. \$dir/'\\\${base_file}'i; echo \\\$dlname'\\\`~ dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~ test -d \\\$dldir || mkdir -p \\\$dldir~ \$install_prog \$dir/\$dlname \\\$dldir/\$dlname~ chmod a+x \\\$dldir/\$dlname~ if test -n '\$stripme' test -n '\$striplib'; then eval '\$striplib \\\$dldir/\$dlname' || exit \\\$?; fi Agreed. _LT_PROG_XSI_REPLACE is designed for swapping out fallback implementations of full functions (suitably decorated) for more efficient implementations based on the build-time environment. I think that is exactly what you're trying to do, but it seems to me like you might be able to work more effectively in reverse: by putting the full Windows required implementations into ltmain.m4sh, and using _LT_PROG_XSI_REPLACE to replace them with stubs when configure is not building on (or for!!) a Windows machine? Well, my version _LT_PROG_FUNCTION_REPLACE is
Re: MSVC: Support for response files with $NM.
Hi Peter, On 2 Jul 2010, at 19:45, Peter Rosin wrote: Ok to push? 2010-07-01 Ralf Wildenhues ralf.wildenh...@gmx.de Peter Rosin p...@lysator.liu.se Support for response files with $NM. * libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) nm_file_list_spec: New tag variable. Set it to '@' if input files can be passed to $NM in a file named with the '@' option. * libltdl/config/ltmain.m4sh (func_mode_link): When nm_file_list_spec is nonempty, use it to avoid skipped_export. * doc/libtool.texi (libtool script contents): Document new variable. While I haven't tested (it should have no effect on the hosts I use anyway!), I read through the previous discussions. Also, by inspection, the code looks good to me, and more than 72 hours have passed without objections having been raised, so please go ahead and push! Cheers, -- Gary V. Vaughan (g...@gnu.org)
Re: MSVC: Make export.at pass
Hi Peter, On 5 Jul 2010, at 13:43, Peter Rosin wrote: I'd like to make the Export test work on MSVC. Therefore I'm asking if I can cherry-pick commit 89a3cdc7a57314fb3ca8f57bf47afd20809e5608 * tests/export.at [MSVC]: dllimport all imported variables. into master (the patch is also attached). Looks good. Please push. Cheers, -- Gary V. Vaughan (g...@gnu.org)
Re: MSVC: Support for response files with $NM.
Hi Gary, Den 2010-07-05 09:57 skrev Gary V. Vaughan: While I haven't tested (it should have no effect on the hosts I use anyway!), I read through the previous discussions. Also, by inspection, the code looks good to me, and more than 72 hours have passed without objections having been raised, so please go ahead and push! Thanks, pushed (and the export.at patch too). Cheers, Peter
MSVC: Preloading in ltdl doesn't heed libname_spec.
Hi! Inspired by the remarkable progress, I'm bringing up this patch again. The discussion dead-ended last time without anything being merged into any branch, but follow this thread to get up to speed: http://lists.gnu.org/archive/html/libtool-patches/2009-01/msg00152.html The patch has seen (very) minor adjustments to changes since then, but the principle is exactly the same. Cheers, Peter commit d2cec6695c6048487774c869d08ddd165ca3c21e Author: Peter Rosin peda@lysator.liu.se Date: Mon Jan 26 09:11:44 2009 +0100 Make preloading heed libname_spec. * libltdl/ltdl.c (libprefix): New static variable describing the prefix of static archives. (try_dlopen): Use libprefix. * libltdl/m4/ltdl.m4 (_LTDL_SETUP): Export prefix of static archives to config.h. diff --git a/ChangeLog b/ChangeLog index f5fa68f..73912d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-11-24 Peter Rosin peda@lysator.liu.se + + Make preloading heed libname_spec. + * libltdl/ltdl.c (libprefix): New static variable describing + the prefix of static archives. + (try_dlopen): Use libprefix. + * libltdl/m4/ltdl.m4 (_LTDL_SETUP): Export prefix of static + archives to config.h. + 2010-07-05 Peter Rosin peda@lysator.liu.se * tests/export.at [MSVC]: dllimport all imported variables. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 1213f0d..992584c 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -54,6 +54,10 @@ or obtained by writing to the Free Software Foundation, Inc., # define LT_LIBEXT a #endif +#if !defined(LT_LIBPREFIX) +# define LT_LIBPREFIX lib +#endif + /* This is the maximum symbol size that won't require malloc/free */ #undef LT_SYMBOL_LENGTH #define LT_SYMBOL_LENGTH 128 @@ -72,6 +76,7 @@ or obtained by writing to the Free Software Foundation, Inc., static const char objdir[] = LT_OBJDIR; static const char archive_ext[] = LT_ARCHIVE_EXT; static const char libext[] = LT_LIBEXT; +static const char libprefix[] = LT_LIBPREFIX; #if defined(LT_MODULE_EXT) static const char shlib_ext[] = LT_MODULE_EXT; #endif @@ -1272,8 +1277,8 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, if (vtable) { - /* name + . + libext + NULL */ - archive_name = MALLOC (char, LT_STRLEN (name) + strlen (libext) + 2); + /* libprefix + name + . + libext + NULL */ + archive_name = MALLOC (char, strlen (libprefix) + LT_STRLEN (name) + strlen (libext) + 2); *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if ((*phandle == NULL) || (archive_name == NULL)) @@ -1285,7 +1290,14 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, /* Preloaded modules are always named according to their old archive name. */ - sprintf (archive_name, %s.%s, name, libext); + if (strncmp(name, lib, 3) == 0) + { + sprintf (archive_name, %s%s.%s, libprefix, name + 3, libext); + } + else + { + sprintf (archive_name, %s.%s, name, libext); + } if (tryall_dlopen (newhandle, archive_name, advise, vtable) == 0) { diff --git a/libltdl/m4/ltdl.m4 b/libltdl/m4/ltdl.m4 index 93de12a..bf1c9bb 100644 --- a/libltdl/m4/ltdl.m4 +++ b/libltdl/m4/ltdl.m4 @@ -410,6 +410,11 @@ AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) m4_pattern_allow([LT_LIBEXT])dnl AC_DEFINE_UNQUOTED([LT_LIBEXT],[$libext],[The archive extension]) +name= +lt_libprefix=`eval \\$ECHO \$libname_spec\` +m4_pattern_allow([LT_LIBPREFIX])dnl +AC_DEFINE_UNQUOTED([LT_LIBPREFIX],[$lt_libprefix],[The archive prefix]) + name=ltdl LTDLOPEN=`eval \\$ECHO \$libname_spec\` AC_SUBST([LTDLOPEN])
Re: MSVC: Preloading in ltdl doesn't heed libname_spec.
On Mon, 5 Jul 2010, Peter Rosin wrote: Inspired by the remarkable progress, I'm bringing up this patch again. It would be good if the progress was even more remarkable. Yesterday's libtool was doing quite good with the tests but I am seeing plenty of failures now for all Unixish targets. Even Linux blows failures all over the place. Not to worry, it is likely something simple. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: MSVC: Preloading in ltdl doesn't heed libname_spec.
On Mon, 5 Jul 2010, Bob Friesenhahn wrote: On Mon, 5 Jul 2010, Peter Rosin wrote: Inspired by the remarkable progress, I'm bringing up this patch again. It would be good if the progress was even more remarkable. Yesterday's libtool was doing quite good with the tests but I am seeing plenty of failures now for all Unixish targets. Even Linux blows failures all over the place. Not to worry, it is likely something simple. Perhaps things are not all that bad. While 35 of 110 tests fail under Debian Linux, only these two extra are failing under FreeBSD, OS-X, and Solaris: FAIL: tests/mdemo2-make.test FAIL: tests/pdemo-make.test Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
Re: MSVC: Preloading in ltdl doesn't heed libname_spec.
Hi Peter, any chance you could post your patches inline? Thanks. * Peter Rosin wrote on Mon, Jul 05, 2010 at 02:45:28PM CEST: http://lists.gnu.org/archive/html/libtool-patches/2009-01/msg00152.html This is ok with nits below addressed, thanks. Make preloading heed libname_spec. * libltdl/ltdl.c (libprefix): New static variable describing the prefix of static archives. (try_dlopen): Use libprefix. * libltdl/m4/ltdl.m4 (_LTDL_SETUP): Export prefix of static archives to config.h. Please mention which test case is fixed on which system/compiler by this patch (the ones you know for sure). --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -54,6 +54,10 @@ or obtained by writing to the Free Software Foundation, Inc., # define LT_LIBEXT a #endif +#if !defined(LT_LIBPREFIX) +# define LT_LIBPREFIX lib +#endif + /* This is the maximum symbol size that won't require malloc/free */ #undef LT_SYMBOL_LENGTH #define LT_SYMBOL_LENGTH 128 @@ -72,6 +76,7 @@ or obtained by writing to the Free Software Foundation, Inc., static const char objdir[]= LT_OBJDIR; static const char archive_ext[] = LT_ARCHIVE_EXT; static const char libext[]= LT_LIBEXT; +static const char libprefix[] = LT_LIBPREFIX; #if defined(LT_MODULE_EXT) static const char shlib_ext[] = LT_MODULE_EXT; #endif @@ -1272,8 +1277,8 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, if (vtable) { - /* name + . + libext + NULL */ - archive_name = MALLOC (char, LT_STRLEN (name) + strlen (libext) + 2); + /* libprefix + name + . + libext + NULL */ + archive_name = MALLOC (char, strlen (libprefix) + LT_STRLEN (name) + strlen (libext) + 2); *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle)); if ((*phandle == NULL) || (archive_name == NULL)) @@ -1285,7 +1290,14 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, /* Preloaded modules are always named according to their old archive name. */ - sprintf (archive_name, %s.%s, name, libext); + if (strncmp(name, lib, 3) == 0) + { + sprintf (archive_name, %s%s.%s, libprefix, name + 3, libext); + } + else + { + sprintf (archive_name, %s.%s, name, libext); + } if (tryall_dlopen (newhandle, archive_name, advise, vtable) == 0) { --- a/libltdl/m4/ltdl.m4 +++ b/libltdl/m4/ltdl.m4 @@ -410,6 +410,11 @@ AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) m4_pattern_allow([LT_LIBEXT])dnl AC_DEFINE_UNQUOTED([LT_LIBEXT],[$libext],[The archive extension]) +name= +lt_libprefix=`eval \\$ECHO \$libname_spec\` This is simpler, less buggy, and more efficiently written as eval lt_libprefix=\$libname_spec\ +m4_pattern_allow([LT_LIBPREFIX])dnl +AC_DEFINE_UNQUOTED([LT_LIBPREFIX],[$lt_libprefix],[The archive prefix]) + name=ltdl LTDLOPEN=`eval \\$ECHO \$libname_spec\` This, too. AC_SUBST([LTDLOPEN]) Cheers, Ralf