Skip site navigation (1) Skip section navigation (2)

Re: lib problems

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: lib problems
Date: 2003-10-10 00:31:49
Message-ID: 200310100031.h9A0Vn622757@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
Andrew Dunstan wrote:
> 
> OK, I have a C version of initdb that apparently works fine on
> Unix, and is only missing signal handling. (If anyone is curious
> and/or adventurous I can email you a copy).
> 
> When I compile on W32/Mingw I get this:
> 
> $ make gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
> -DPGBINDIR=\"/usr/local/pgsql/bin\"
> -DPGDATADIR=\"/usr/local/pgsql/share\" -L../../../src/port
> initdb.o -lpgport -o initdb
> ../../../src/port/libpgport.a(dirmod.o)(.text+0xe1):dirmod.c: undefined reference to `errstart'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0xef):dirmod.c: undefined reference to `elog_finish'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0x11a):dirmod.c: undefined reference to `errstart'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0x128):dirmod.c: undefined reference to `elog_finish'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0x1df):dirmod.c: undefined reference to `errstart'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0x1ef):dirmod.c: undefined reference to `elog_finish'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0x21a):dirmod.c: undefined reference to `errstart'
> ../../../src/port/libpgport.a(dirmod.o)(.text+0x22a):dirmod.c: undefined reference to `elog_finish'
> make: *** [initdb] Error 1
> 
> The strange thing is I didn't get that this morning, but I assume
> it's clearly because I added some unlink calls.
> 
> Anyone have clues about how to fix this? Compile a copy of
> dirmod.c with FRONTEND defined, maybe? Or just remove the logging
> statements from pgunlink altogether - unlink should really be
> silent.

You should define FRONTEND.  That is the proper way to handle those
function calls becaues they don't have to be atomic for clients.

> BTW, if the W32 timing problems that apply to unlink() also
> apply to rmdir(), we'll need a replacement for that too.

No, that one should be fine.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2003-10-10 00:32:14
Subject: Re: lib problems
Previous:From: Peter EisentrautDate: 2003-10-08 17:38:30
Subject: Re: setlocale

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group