X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: =?ISO-8859-1?Q?Ren=E9_Berber?= <r.berber@computer.org>
Subject:  Re: libuuid
Date:  Tue, 09 Oct 2007 21:41:38 -0500
Lines: 51
Message-ID: <fehe52$sfa$1@sea.gmane.org>
References:  <3ee066b40710091923q612ff18s469961f5ed363d76@mail.gmail.com>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1
Content-Transfer-Encoding:  quoted-printable
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
In-Reply-To: <3ee066b40710091923q612ff18s469961f5ed363d76@mail.gmail.com>
OpenPGP: url=hkp://wwwkeys.pgp.net
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Antony Baxter wrote:

[snip]
> I've just tried:
>=20
> dllwrap -o uuid.dll --def uuid.def uuid.o
>   /usr/lib/postgresql/pgxs/src/../../src/utils/dllinit.o -L/usr/lib -lpos=
tgres
>   -Wl,-Bstatic -luuid -Wl,-Bdynamic
...
> All three give the same errors:
>=20
> uuid.o:uuid.c:(.text+0xe): undefined reference to `_uuid_compare'
> uuid.o:uuid.c:(.text+0x55): undefined reference to `_uuid_generate_random'
> uuid.o:uuid.c:(.text+0x98): undefined reference to `_uuid_parse'
> 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
>=20
> Probably should have mentioned: latest Cygwin DLL, Cygwin (not native Win=
dows)
> PostgreSQL 8.1.4, latest w32api.

Wrong library.

The problem is, where are those functions defined?  There are 2 uuid librar=
ies,
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 o=
ne
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

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.
--=20
Ren=E9 Berber


--
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/

