René Berber
Wed Oct 10 02:42:00 GMT 2007

Antony Baxter wrote:

> I've just tried:
> dllwrap -o uuid.dll --def uuid.def uuid.o
>   /usr/lib/postgresql/pgxs/src/../../src/utils/dllinit.o -L/usr/lib -lpostgres
>   -Wl,-Bstatic -luuid -Wl,-Bdynamic
> All three give the same errors:
> 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
> Probably should have mentioned: latest Cygwin DLL, Cygwin (not native Windows)
> PostgreSQL 8.1.4, latest w32api.

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

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.
René Berber

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list