Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzRGX-0008AU-1l for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Oct 2016 16:41:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bzRGW-0003PH-GC for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Oct 2016 16:41:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bzRGV-0003Oa-8e for pgsql-bugs@postgresql.org; Wed, 26 Oct 2016 16:41:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bzRGS-0002iY-Oo for pgsql-bugs@postgresql.org; Wed, 26 Oct 2016 16:41:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9QGfH4O004271; Wed, 26 Oct 2016 12:41:17 -0400 From: Tom Lane To: Sandeep Thakkar cc: "pgsql-bugs@postgresql.org" Subject: Re: Compilation of timezone source with zic fails (on mountpoint) In-reply-to: References: Comments: In-reply-to Sandeep Thakkar message dated "Tue, 25 Oct 2016 21:33:06 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4269.1477500077.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 26 Oct 2016 12:41:17 -0400 Message-ID: <4270.1477500077@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Sandeep Thakkar 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/timezo= ne/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) !=3D 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) !=3D 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 --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs