X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <51369.131.130.2.114.1226410866.squirrel@webmail.univie.ac.at> In-Reply-To: <49198243.C8DABCB4@dessent.net> 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> <49198243 DOT C8DABCB4 AT dessent DOT net> Date: Tue, 11 Nov 2008 14:41:06 +0100 (CET) Subject: Re: Cannot compile UUID module From: "Alexander Stadler" To: cygwin AT cygwin DOT com User-Agent: SquirrelMail/1.4.10a MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com >> 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 Thank you for your detailed response! As i had to execute g++ independent I don't know if adding -L/usr/lib/e2fsprogs to the LDFLAGS would work because of the problem with the missing -luuid option. But when I specify perl Makefile.PL with LIBS='-L/usr/lib/e2fsprogs -luuid' the e2fsprogs option is used, but just appended at the end of the line, which is (as we/I know now) not working for the -luuid option.. . Alex -- 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/