X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <50860.131.130.2.114.1226399564.squirrel@webmail.univie.ac.at> In-Reply-To: <4918529B.EB17C3C@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> Date: Tue, 11 Nov 2008 11:32:44 +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 >> gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict-aliasing >> -pipe -I/ >> usr/local/include -DUSEIMPORTLIB -O3 -DVERSION=\"0.02\" >> -DXS_VERSION=\"0.02\" >> "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" UUID.c >> rm -f blib/arch/auto/UUID/UUID.dll >> g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols >> -Wl,--stack,838 >> 8608 -Wl,--enable-auto-image-base -L/usr/local/lib -L/usr/lib/e2fsprogs >> -Wl,-Bst >> atic -luuid -Wl,-Bdynamic UUID.o -o blib/arch/auto/UUID/UUID.dll >> \ >> /usr/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.a \ >> >> UUID.o:UUID.c:(.text+0xe): undefined reference to `_uuid_generate' > > The ordering here is wrong. -luuid must come after UUID.o on the > command line if the linker is to resolve uuid_* symbols in UUID.o from > the -luuid library. > > With standard autoconf this is achieved by the convention that -l > arguments must go in LIBS not LDFLAGS. I don't know if the perl system > uses the same convention, but whatever it uses, the -luuid argument does > not belong where it's currently being set. > > Brian Thank you so very much! You were right, it is a solution to change to the right order by manually executing: g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -L/usr/lib/e2fsprogs UUID.o -luuid -o blib/arch/auto/UUID/UUID.dll /usr/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.a 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 results to the not functioning g++ line without ... -L/usr/lib/e2fsprogs UUID.o -luuid ... (which was the reason for (unfortunately) false editing of the Makefile). At the beginning I can even see: ... MakeMaker ARGV: (q[LIBS=-L/usr/lib/e2fsprogs]) ... # LIBS => [q[-luuid]] ... But it does not seem to affect the g++ call. 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? Thank you 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/