Thread: cannot get build (initdb) to work after trying for a week

cannot get build (initdb) to work after trying for a week

From
"Eric"
Date:
I am getting truly desperate!  I am trying to build any version of
Postgres on Windows from source.  First experience with Postgres
source.  I have struggled for days trying to solve a problem. Would be
willing to pay for the solution!!!

The following error occurred when issuing a vanilla initdb command on
my Windows system.

FATAL:  could not select a suitable default timezone
DETAIL:  It appears that your GMT time zone uses leap seconds.
PostgreSQL does not support leap seconds.

I built this from 8.1.8 source under msys/mingw.  Also tried 8.2.2.
Everything builds fine but initdb always reports the above error and
quits.

I was able to run successfully from 8.1.5 binaries on the same
system.  This would lead me to believe that it is a simple compiler
switch somewhere that would alleviate this problem.

I have tried variations of configure, including and not including
mingw includes and libs.

I also had to create a typedef int ssize_t in a couple of files to get
the compile finished.  Maybe this is related.  Other than that, have
not touched any code.

Given that an 8.1.5 binary dist worked for me, what flags were
provided to build that version?  Simply configure, then make?


Re: cannot get build (initdb) to work after trying for a week

From
Alvaro Herrera
Date:
Eric wrote:
> I am getting truly desperate!  I am trying to build any version of
> Postgres on Windows from source.  First experience with Postgres
> source.  I have struggled for days trying to solve a problem. Would be
> willing to pay for the solution!!!
>
> The following error occurred when issuing a vanilla initdb command on
> my Windows system.
>
> FATAL:  could not select a suitable default timezone
> DETAIL:  It appears that your GMT time zone uses leap seconds.
> PostgreSQL does not support leap seconds.

Try specifying a timezone in postgresql.conf.  For initdb, I'd try
specifying it in the TZ environment variable.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: cannot get build (initdb) to work after trying for a week

From
Magnus Hagander
Date:
Eric wrote:
> I am getting truly desperate!  I am trying to build any version of
> Postgres on Windows from source.  First experience with Postgres
> source.  I have struggled for days trying to solve a problem. Would be
> willing to pay for the solution!!!
>
> The following error occurred when issuing a vanilla initdb command on
> my Windows system.
>
> FATAL:  could not select a suitable default timezone
> DETAIL:  It appears that your GMT time zone uses leap seconds.
> PostgreSQL does not support leap seconds.
>
> I built this from 8.1.8 source under msys/mingw.  Also tried 8.2.2.
> Everything builds fine but initdb always reports the above error and
> quits.

This could happen if the timezone files aren't properly installed. This
should normally happen when you do "make install", but verify that they
are actually present (in share/timezone).

> I also had to create a typedef int ssize_t in a couple of files to get
> the compile finished.  Maybe this is related.  Other than that, have
> not touched any code.

I don't think that's related, but it's a clear indicator that something
in your environment is broken. Because it should build without any such
changes.

//Magnus

Re: cannot get build (initdb) to work after trying for a week

From
"Eric"
Date:
Thanks for responding Magnus.

I did reinstall both msys and mingw, as well as blow away the source
and start over from scratch.  Maybe there is a stray file or directory
that's not getting deleted on the clean.  Also, does clean just clean
up the compile environment, or does it also clean up the install?  I
did manually remove directories too but I suppose I could have missed
something.

Out of desperation, I decided to try everything on my wife's mac,
remembering that os x is unix.  Didn't take long at all to download
all the dev tools I needed, get a clean compile and get things running
there.

Can't remember if it was  in this forum, but a few people asked why I
was downloading source and not binary - I am experimenting with a
different indexing (multi-dimensional) method.  I looked hard at GiST,
but it doesn't look like GiST supports multi-dimensional indexing
methods unless all the dimensions are in a single column.  I need to
see each column in the index before making a decision about search
paths to take, branches to follow, etc.  GiST appears to support one
column at a time - i.e. if my index is lastname, firstname, then take
a look at lastname, and if that's a tie, then look at firstname.  But
it won't let you look at lastname and firstname at the same time, then
make decisions.  Other than that, looks like an outstanding feature.

Finally, as a newcomer to PG, I'm in search of general development
resources.  Any good places to go besides the PG documentation and the
pgsql newsgroups?

Regards, Eric


Re: cannot get build (initdb) to work after trying for a week

From
Magnus Hagander
Date:
Eric wrote:
> Thanks for responding Magnus.
>
> I did reinstall both msys and mingw, as well as blow away the source
> and start over from scratch.  Maybe there is a stray file or directory
> that's not getting deleted on the clean.  Also, does clean just clean
> up the compile environment, or does it also clean up the install?  I
> did manually remove directories too but I suppose I could have missed
> something.

Clean cleans the build environment only,


> Finally, as a newcomer to PG, I'm in search of general development
> resources.  Any good places to go besides the PG documentation and the
> pgsql newsgroups?

http://archives.postgresql.org/pgsql-hackers

//Magnus