Subject: Re: Missing Library?
To: Colin Wood <cwood@ichips.intel.com>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 10/10/1997 15:42:16
> 
> Henry B. Hotz wrote:
> > 
> > This is a touch off-topic, but I just tried building Postgres and it failed
> > as follows:
> > 
> > >gmake[2]: Leaving directory `/usr/local/dist/postgresql-6.2/src/backend/utils'
> > >sion.o -L/usr/local/lib -lcrypt -lcompat -lm -ltermcap -lcurses
> > >access/SUBSYS.o: warning: mktemp() possibly used unsafely, consider using
> > >mkstem
> > >p()

Man mktemp explains that there is a possable race condition between checking
if a file exists and creating it. mkstemp doesn't have that race condition.

> > >storage/SUBSYS.o: Undefined symbol `_S_INIT_LOCK' referenced from text segment
> > >storage/SUBSYS.o: Undefined symbol `_S_UNLOCK' referenced from text segment
> [snip]
> > >storage/SUBSYS.o: More undefined symbol _S_UNLOCK refs follow
> > >gmake[1]: *** [postgres] Error 1
> > >gmake[1]: Leaving directory `/usr/local/dist/postgresql-6.2/src/backend'
> > >gmake: *** [all] Error 2
> > 
> > 2) The undefined symbol stuff looks like a missing library, but I don't
> > know which one.  Could the configure be picking up the wrong locking
> > mechanism for this OS?
> > 
> > I'm running -current of Sept 27.  Postgres 6.2.
> 
> The problem is that m68k either lacks a "test and set" instruction, or
> else the glue code to work this instruction into Postgres is missing for
> m68k. 

The 68k has such an instruction, so I'd bet the TAS glue is missing.

> The NetBSD-specific stuff for PostgreSQL is mainly
> NetBSD/i386-specific :-(  I found that making a change to one of the
> header files fixed the problem.  The change basically involved making the
> locking functions not use a "test and set" instruction implementation if
> the NetBSD platform is m68k-based.  I'm fairly sure that it compiled ok at
> this point.

Take care,

Bill