pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: Compilation of timezone source with zic fails (on mountpoint)
Date: Wed, 26 Oct 2016 12:41:17 -0400
Message-ID: <4270.1477500077@sss.pgh.pa.us> (raw)
In-Reply-To: <CANFyU94_p6mqRQc2i26PFp5QAOQGB++AjGX=FO8LDpXw0GSTjw@mail.gmail.com>
References: <CANFyU94_p6mqRQc2i26PFp5QAOQGB++AjGX=FO8LDpXw0GSTjw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> writes:
> During building of the ongoing PG updates (9.6.1, 9.5.5 to 9.1.24), we
> found that the build failed for Linux on 9.3 and 9.2 with the following
> error:
> ...
> warning: "./data/backward", line 125: symbolic link used because hard link
> failed: Operation not permitted
> .*/zic: link from
> /mnt/hgfs/pginstaller-repo/**server/staging/linux/share/postgresql/timezone/US/Eastern
> failed: Operation not permitted*
> make[2]: *** [install] Error 1

> On investigating, we found that it was because of the few commits in the
> new updates related to zic.c which tries to create hard links. These hard
> links failed to create on our build farm because we were building the
> source on the mount point (/mnt/hgfs/) where hard links cannot be created.
> The Linux machine is a Virtual Machine hosted on VMware Fusion on the Mac
> Server and the Fusion doesn't allow to create hard links inside the shared
> location. It errors out with "Operation not permitted". Symbolic links can
> be created though.

I took a closer look at this.  As I said earlier, zic has always attempted
to use hard links, and now that I look, the fallback to symlinks has been
there right along as well.  So you were always getting those warnings on
that platform.  What is new, apparently, is this bit at the end of zic.c's
main() which came in with tzcode2016c (ie, our *previous* set of releases):

	if (warnings && (ferror(stderr) || fclose(stderr) != 0))
		return EXIT_FAILURE;

I cannot reproduce any failure locally by forcing "warnings" on, but I
speculate that for some reason fclose(stderr) fails on your platform.

We could probably persuade the IANA guys that fclose() is a bad idea here
and fflush() would be saner.  Could you determine whether "make install"
passes in that environment if you replace this code with

	if (warnings && (fflush(stderr) != 0 || ferror(stderr)))
		return EXIT_FAILURE;

?

Independently of that, though, I think it's a bad idea to be using such
an environment as your build platform, because it means you are getting
different results (different package contents) depending on whether you
happen to build with the install target directory on that mount or not.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (10+ messages)  latest in thread

Message-ID: <4270.1477500077@sss.pgh.pa.us>
Permalink:  ../4270.1477500077@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4270.1477500077@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sandeep.thakkar@enterprisedb.com
  Subject: Re: Compilation of timezone source with zic fails (on mountpoint)
  In-Reply-To: <4270.1477500077@sss.pgh.pa.us>
  References: <CANFyU94_p6mqRQc2i26PFp5QAOQGB++AjGX=FO8LDpXw0GSTjw@mail.gmail.com> <4270.1477500077@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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