On Mon, 2006-10-02 at 21:01 +0200, Enrico Scholz wrote: > Axel.Thimm@xxxxxxxxxx (Axel Thimm) writes: > > You missed the beginning of this discussion: There *are* packages of > > this millenium that break when *.la files are blindly removed. > > Ok; there are some projects from the last millenium which are still > requiring .la files. But it should be really trivial to fix them by > writing > > | lt_dlopenext("libfoo"); > > instead of > > | lt_dlopen("libfoo.la"); > > arts is an example of a program so broken. I'm attaching a patch that fixes it. It is a little more involved than I'd hoped as arts (and apparently other kde packages) include an older version of libtool with some broken .m4 files for detecting the shared object extension (The first half of this bug: http://bugs.kde.org/show_bug.cgi?id=93359 ) Explanation of patch: *.mcopclass: These files have the name of the module that needs to be loaded. Due to the use of lt_dlopen(), they use libfoo.la. With the switch to lt_dlopenext() these can safely become libfoo. extensionloader.cc: Here's where we switch from lt_dlopen() to lt_dlopenext(). acinclude.m4, ltdl.m4: Probably only ltdl.m4 needs to be changed here. Basically I replaced the erroroneous detection with the simple check of newer libtools. This step is needed because arts includes its own, somewhat dated, copy of libltdl. Do we want to get rid of that anyway (because we want to use system libraries whenever possible)? Or does arts need this specific version of libltdl for some reason? With this patch, I am able to build an artsd that doesn't segfault when running other KDE apps that generate sound. It's possible that there are other issues beyond this as I don't normally run KDE. Rex, if you can throw me some problem packages I'll be happy to look into what is causing things to break. Note that this is not a vote for or against removing .la files when they are used as loadable modules. It's just a patch that demonstrates what has to be done to fix the code to not require .la files. Also note that according to the wording of the proposed draft, arts would still be in violation even though the shared objects are loadable modules rather than libraries intended for linking. -Toshio
Index: arts-1.5.4/soundserver/FileInputStream.mcopclass =================================================================== --- arts-1.5.4.orig/soundserver/FileInputStream.mcopclass +++ arts-1.5.4/soundserver/FileInputStream.mcopclass @@ -2,4 +2,4 @@ Interface=Arts::FileInputStream,Arts::In Author="Stefan Westerfeld <stefan@xxxxxxxxxxxx>" URL="http://www.arts-project.org" Language=C++ -Library=libkmedia2.la +Library=libkmedia2 Index: arts-1.5.4/soundserver/GSLPlayObject.mcopclass =================================================================== --- arts-1.5.4.orig/soundserver/GSLPlayObject.mcopclass +++ arts-1.5.4/soundserver/GSLPlayObject.mcopclass @@ -3,5 +3,5 @@ Author="Hans Meine <hans_meine@xxxxxxx>" URL="http://www.arts-project.org/" Extension=wav,mp3,ogg Language=C++ -Library=libartsgslplayobject.la +Library=libartsgslplayobject MimeType=audio/wav,audio/x-wav,audio/x-mp3,audio/x-mp1,audio/x-mp2,audio/vorbis,application/ogg Index: arts-1.5.4/soundserver/WavPlayObject.mcopclass =================================================================== --- arts-1.5.4.orig/soundserver/WavPlayObject.mcopclass +++ arts-1.5.4/soundserver/WavPlayObject.mcopclass @@ -3,5 +3,5 @@ Author="Stefan Westerfeld <stefan@space. URL="http://www.arts-project.org" Extension=wav Language=C++ -Library=libartswavplayobject.la +Library=libartswavplayobject MimeType=audio/wav,audio/x-wav Index: arts-1.5.4/mcop/extensionloader.cc =================================================================== --- arts-1.5.4.orig/mcop/extensionloader.cc +++ arts-1.5.4/mcop/extensionloader.cc @@ -57,7 +57,7 @@ ExtensionLoader::ExtensionLoader(const s StartupManager::setExtensionLoader(this); lt_dlinit(); - handle = lt_dlopen(dlfilename.c_str()); + handle = lt_dlopenext(dlfilename.c_str()); StartupManager::setExtensionLoader(0); Index: arts-1.5.4/x11/X11GlobalComm.mcopclass =================================================================== --- arts-1.5.4.orig/x11/X11GlobalComm.mcopclass +++ arts-1.5.4/x11/X11GlobalComm.mcopclass @@ -1,3 +1,3 @@ Language=C++ -Library=libx11globalcomm.la +Library=libx11globalcomm Interface=Arts::Object,Arts::GlobalComm,Arts::X11GlobalComm Index: arts-1.5.4/acinclude.m4 =================================================================== --- arts-1.5.4.orig/acinclude.m4 +++ arts-1.5.4/acinclude.m4 @@ -12040,28 +12040,12 @@ fi ])# AC_LTDL_SYS_DLOPEN_DEPLIBS AC_DEFUN([AC_LTDL_SHLIBEXT], -[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which extension is used for shared libraries], libltdl_cv_shlibext, [dnl -( - last= - case "$host_os" in - cygwin* | mingw*) - last=".dll" - ;; - *) - for spec in $library_names_spec; do - last="$spec" - done - ;; - esac -changequote(, ) - echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest -changequote([, ]) -) -libltdl_cv_shlibext=`cat conftest` -rm -f conftest -]) +module=yes +eval libltdl_cv_shlibext=$shrext + ]) if test -n "$libltdl_cv_shlibext"; then AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", [Define to the extension used for shared libraries, say, ".so". ]) Index: arts-1.5.4/libltdl/ltdl.m4 =================================================================== --- arts-1.5.4.orig/libltdl/ltdl.m4 +++ arts-1.5.4/libltdl/ltdl.m4 @@ -118,27 +118,11 @@ fi ])# AC_LTDL_SYS_DLOPEN_DEPLIBS AC_DEFUN([AC_LTDL_SHLIBEXT], -[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl +[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which extension is used for shared libraries], libltdl_cv_shlibext, [dnl -( - last= - case "$host_os" in - cygwin* | mingw*) - last=".dll" - ;; - *) - for spec in $library_names_spec; do - last="$spec" - done - ;; - esac -changequote(, ) - echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest -changequote([, ]) -) -libltdl_cv_shlibext=`cat conftest` -rm -f conftest +module=yes +eval libltdl_cv_shlibext=$shrext ]) if test -n "$libltdl_cv_shlibext"; then AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
Attachment:
signature.asc
Description: This is a digitally signed message part
-- Fedora-packaging mailing list Fedora-packaging@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-packaging