On Mon, 2010-07-05 at 19:26 -0700, David Rothenberger wrote: > I was just packaging a new version of libao and it turns out I need this > patch, too. libao puts some plugin DLLs into /usr/lib/ao/plugins-2. > Those DLLs are *not* marked as modules for some reason, so cygport tries > to move them somewhere and change the dlname in the .la files.
It is not unheard of for the -module flag to be omitted when it should be used, but this is just a mistake. Remember, on ELF platforms shared objects are installed in the same directory and a versionless .so symlink is created, so neither -module nor -avoid-version are all that much noticeable if missing. In fact, the only cases where -module is *absolutely* required (IOW something will really break) are 1) on all platforms when omitting the "lib" prefix, 2) on PE platforms (Cygwin/MinGW), where w/o -module DLLs are installed into ../bin, and 3) on Mach-O platforms (Darwin), where there is a real difference between modules (MH_BUNDLEs) and libraries (MH_DYLIBs)[1]. So your average upstream, developing primarily for ELF platforms (*NIX/BSD), might very easily miss them. In the case of libao, those are clearly modules and should be linked as such. Therefore their *_la_LDFLAGS must be at least "-module -avoid-version -no-undefined". Such a patch would be portable and can (and should) be pushed upstream. > I'm not sure why the DLLs are not marked as modules, but they are not > marked as such in Debian, either. So, I'm trying to follow the Debian > packaging by including *.la files in the -dev package. Debian's packaging is just wrong. For one, static modules are completely useless, which is why cygport removes those. (In fact, in the case of libao, like other libraries which rely on dynamic module loading, it may just make sense to configure with --disable-static.) As for the module .la files, I package them alongside the DLLs as their only use would be libltdl loading. IOW for libao-1.0.0 I would do: PKG_NAMES="libao libao4 libao-common libao-devel" libao4_CONTENTS="usr/bin/cygao-4.dll usr/lib/ao/plugins-4/" libao_common_CONTENTS="etc/ usr/share/doc/ usr/share/man/" libao_devel_CONTENTS="usr/include/ usr/lib/lib* usr/lib/pkgconfig/ usr/share/aclocal/" HTH, Yaakov [1] http://www.finkproject.org/doc/porting/shared.php -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple