delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/07/06/00:40:09

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-50.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_OBFU_PART_INA,TW_DL,TW_YG
X-Spam-Check-By: sourceware.org
Subject: Re: cygport patch: suppress libtool fixup step
From: "Yaakov (Cygwin/X)" <yselkowitz AT users DOT sourceforge DOT net>
To: cygwin <cygwin AT cygwin DOT com>
In-Reply-To: <4C329465.3090305@acm.org>
References: <4C3215FC DOT 3010309 AT cwilson DOT fastmail DOT fm> <4C329465 DOT 3090305 AT acm DOT org>
Date: Mon, 05 Jul 2010 23:39:18 -0500
Message-ID: <1278391158.7128.40.camel@YAAKOV04>
Mime-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019