delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/11/08:03:00

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <49198243.C8DABCB4@dessent.net>
Date: Tue, 11 Nov 2008 05:01:55 -0800
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Cannot compile UUID module
References: <50153 DOT 131 DOT 130 DOT 2 DOT 114 DOT 1226326969 DOT squirrel AT webmail DOT univie DOT ac DOT at> <4918529B DOT EB17C3C AT dessent DOT net> <50860 DOT 131 DOT 130 DOT 2 DOT 114 DOT 1226399564 DOT squirrel AT webmail DOT univie DOT ac DOT at>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Alexander Stadler wrote:

> So my next question is: Do you know what parameters are needed so that the
> Makefile will be created with the right settings (without manually
> executing g++ after the crashed first make)?
> 
> Because creating it with:
> perl Makefile.PL LIBS=-L/usr/lib/e2fsprogs

I would have tried LIBS='-L/usr/lib/e2fsprogs -luuid'.

> At the beginning I can even see:
> ...
> MakeMaker ARGV: (q[LIBS=-L/usr/lib/e2fsprogs])
> ...
> #     LIBS => [q[-luuid]]

Note that this line is commented out.  From past threads it seems that
MakeMaker does not pass-thru -l arguments specified by the module author
to the generated Makefile that it cannot find in the default library
search directories.  The fact that libuuid.a is in a non-default
location (requiring an -L to locate it) on Cygwin seems to trip it up
and cause -luuid to be omitted.  But I would have suspected that with
-L/usr/lib/e2fsprogs specified in a LDFLAGS override that MakeMaker
would have added the directory to its list of search directories and let
the option through.  This is just speculation, having not tried it
myself I don't know the real cause.  

Another commonly seen scenario is that the author of the module only
tested it on systems where specifying the arguments with an incorrect
order is tolerated.  When this happens the Makefile itself can be
incorrect with no way to fix it but patching it to use the right order.

> And by the way, in the PostgreSQL posts dllwrap was used with
> -Wl,-Bstatic,-luuid,-Bdynamic so when do I need the -Bstatic, -Bdynamic
> and should I use it too?

Anything advocating the use of dllwrap should be highly suspect as old
and inaccurate.  It should not be needed in any modern workflow.

-Bstatic is useful when you have both a shared and a static version of
the same library and you want to prefer the static version, since the
default is to prefer the shared.  That is why you see it used in pairs,
switching to static for one -l option and then back to shared so that no
options found later on the command line are affected.

On Cygwin this means if you had both an import library libuuid.dll.a and
a static library libuuid.a, you would need to use -Wl,-Bstatic to make
the linker use the static version when resolving -luuid instead of the
import library.  However, in this case again the advice is highly
suspect because there is no shared version of the uuid library in the
e2fsprogs package, only a static one, so specifying -Bstatic is
extraneous and useless.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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