This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot compile UUID module


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]