pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Build error on Windows 10 of version 9.5.10 using Visual Studio 2015
2+ messages / 2 participants
[nested] [flat]

* Build error on Windows 10 of version 9.5.10 using Visual Studio 2015
@ 2017-12-13 16:51  Kenneth Reister <reister.kenneth@cimcor.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Kenneth Reister @ 2017-12-13 16:51 UTC (permalink / raw)
  To: pgsql-bugs

Steps:
extract source
copy tools\msvc\config_default.pl to  tools\msvc\config.pl and put in
custom path to our build of openssl
clean.bat
build.bat


zic.exe fails to compile with an internal fatal error from the
CompilerDriver.

I wound up having to change this function (zic.c:1811)
static void
convert(const int32 val, char *const buf)
{
int i;
int shift;
unsigned char *const b = (unsigned char *) buf;

for (i = 0, shift = 24; i < 4; ++i, shift -= 8)
b[i] = val >> shift;
}

to look like this:

static void
convert(const int32 val, char *const buf)
{
unsigned char *const b = (unsigned char *) buf;
b[0] = val >> 24;
b[1] = val >> 16;
b[2] = val >> 8;
b[3] = val >> 0;
}

I tried moving the next function (convert64) up above that function to see
if it was just griping about the "first" instance of the val >> shift, but
strangely it had no issue compiling convert64 and still failing on
convert.  Several devs here were surprised it would compile essentially the
same exact code for one function, but not the other.  Whether this was
truly a bug, or perhaps a problem with the system I tried it on I leave to
your investigation.  Since there is no real difference in functionality, I
proceeded with the change and my compile.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Build error on Windows 10 of version 9.5.10 using Visual Studio 2015
@ 2017-12-13 17:36  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Kenneth Reister <reister.kenneth@cimcor.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2017-12-13 17:36 UTC (permalink / raw)
  To: Kenneth Reister <reister.kenneth@cimcor.com>; +Cc: pgsql-bugs

Kenneth Reister <reister.kenneth@cimcor.com> writes:
> zic.exe fails to compile with an internal fatal error from the
> CompilerDriver.

Odd --- I can't see what's wrong with that code, either.

However, zic.c is not really our code: we get it from the IANA timezone
group, and are loath to make private changes except when really necessary.
If you want to pursue this, please report the problem to those guys:

https://www.iana.org/time-zones

I imagine the tz@iana.org mailing list is the right place to discuss it.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-12-13 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 16:51 Build error on Windows 10 of version 9.5.10 using Visual Studio 2015 Kenneth Reister <reister.kenneth@cimcor.com>
2017-12-13 17:36 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox