delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/10/09/23:20:41

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" <antony DOT baxter AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: libuuid
MIME-Version: 1.0
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
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 <uuid/uuid.h>, 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/


- Raw text -


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