X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <3ee066b40710092020r1a2b2368ya30e98334d0c62db@mail.gmail.com> Date: Wed, 10 Oct 2007 08:50:15 +0530 From: "antony baxter" To: cygwin AT cygwin DOT com Subject: Re: libuuid MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l9A3KQed009437 René, [snip] >> uuid.o:uuid.c:(.text+0x174): undefined reference to `_uuid_unparse_lower' >> uuid.o:uuid.c:(.text+0x2fd): undefined reference to `_uuid_unparse_lower' >> collect2: ld returned 1 exit status >> dllwrap: gcc exited with status 1 > > Wrong library. > > The problem is, where are those functions defined? There are 2 uuid libraries, > one is /usr/lib/w32api/libuuid.a, but that doesn't have functions that start > with uuid. The other is /usr/lib/e2fsprogs/libuuid.a and ... bingo! that one > has the uuid_compare, etc. functions. > > So change the command, and BTW libpostgres is also static, so my next guess is: > > dllwrap -o uuid.dll --def uuid.def uuid.o > /usr/lib/postgresql/pgxs/src/../../src/utils/dllinit.o -L/usr/lib > -L/usr/lib/e2fsprogs -Wl,-Bstatic -lpostgres -luuid -Wl,-Bdynamic Ok - much better. Thank you very much. This time bombed out with dllinit.o not found, so changed that path: dllwrap -o uuid.dll --def uuid.def uuid.o /usr/lib/postgresql/pgxs/src/utils/dllinit.o -L/usr/lib -L/usr/lib/e2fsprogs -Wl,-Bstatic -lpostgres -luuid -Wl,-Bdynamic and I now only get: uuid.o:uuid.c:(.text+0x174): undefined reference to `_uuid_unparse_lower' uuid.o:uuid.c:(.text+0x2fd): undefined reference to `_uuid_unparse_lower' collect2: ld returned 1 exit status dllwrap: gcc exited with status 1 > Another hint of what may be wrong was on your first message, the "warning: > implicit declaration of function `uuid_unparse_lower'" means that the code > is so bad that they didn't even include the header. Their uuid.c does include , but /usr/include/uuid/uuid.h doesn't include the uuid_unparse_lower function; nor does strings /usr/lib/e2fsprogs/libuuid.a | grep lower return anything. Latest Cygwin version of e2fsprogs is 1.35-3, but the latest release on Sourceforge is 1.40.2. Downloaded that release, checked lib/uuid.h and the new uuid_unparse_lower function is there. Tried building the whole packge, but it doesn't build out of the box (error at the bottom if anyone's interested) - however it does build libuuid. So, updated /usr/include/uuid/* and /usr/lib/e2fsprogs/libuuid.a, and now it builds and works perfectly. Thanks very much for your help, Ant. [ latest e2fsprogs build errors. configure runs fine; make bombs out with: message.o: In function `print_e2fsck_message': /home/jon/src/e2fsprogs-1.40.2/e2fsck/message.c:307: undefined reference to `_inode_uid' /home/jon/src/e2fsprogs-1.40.2/e2fsck/message.c:310: undefined reference to `_inode_gid' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libintl.a(dcigettext.o):dcigettext.c:(.text+0x6e1): undefined reference to `_libiconv_open' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libintl.a(dcigettext.o):dcigettext.c:(.text+0x8e3): undefined reference to `_libiconv' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libintl.a(dcigettext.o):dcigettext.c:(.text+0x9ab): undefined reference to `_libiconv_open' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libintl.a(relocatable.o):relocatable.c:(.text+0x57): undefined reference to `_libiconv_set_relocation_prefix' collect2: ld returned 1 exit status make[2]: *** [e2fsck.static] Error 1 make[2]: Leaving directory `/home/jon/src/e2fsprogs-1.40.2/e2fsck' make[1]: *** [all-progs-recursive] Error 1 make[1]: Leaving directory `/home/jon/src/e2fsprogs-1.40.2' make: *** [all] Error 2 ] -- 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/