Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ar5Fu-0003sP-2w for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Apr 2016 15:01:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ar5Ft-0008VJ-2x for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Apr 2016 15:01:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ar5FF-0007mt-Ew for pgsql-bugs@postgresql.org; Fri, 15 Apr 2016 15:01:17 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ar5FC-0001gv-E1 for pgsql-bugs@postgresql.org; Fri, 15 Apr 2016 15:01:16 +0000 Received: from msg.df7cb.de (benz.df7cb.de [IPv6:2001:6f8:10ee:e:134::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 3qmgj45k6Rz3DyJ; Fri, 15 Apr 2016 17:01:12 +0200 (CEST) Date: Fri, 15 Apr 2016 17:01:12 +0200 From: Christoph Berg To: Tom Lane Cc: Andres Freund , Alvaro Herrera , Daniel Golle , pgsql-bugs@postgresql.org Subject: Re: BUG #14033: cross-compilation to ARM fails Message-ID: <20160415150111.GH11804@msg.df7cb.de> Mail-Followup-To: Christoph Berg , Tom Lane , Andres Freund , Alvaro Herrera , Daniel Golle , pgsql-bugs@postgresql.org References: <20160319165321.GB1744@makrotopia.org> <20160319223826.GA333151@alvherre.pgsql> <20160414094243.GC11804@msg.df7cb.de> <17999.1460693282@sss.pgh.pa.us> <20160415041314.tboagai3x2r74omq@alap3.anarazel.de> <6344.1460728679@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6344.1460728679@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.9 (--) 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 Re: Tom Lane 2016-04-15 <6344.1460728679@sss.pgh.pa.us> > Could we insist that for a cross-compilation, the appropriate instance > of pg_config has to be found first in the PATH under the name pg_config? > That turns it into a matter of preparing the build environment. The "compile twice" idea sounds very fragile, and I'm not sure if compiling things for the local machine is even feasible in a cross-compilation environment without relying on non-standard things. Couldn't we simply (?) have two implementations? Keep the current C implementation for Windows, and supply a sh implementation for all other systems? Of course maintaining two implementations of the same thing causes a maintenance burden, but pg_config is small. > A different line of thought is to expose the data as data rather than > an executable. For example, as a makefile fragment containing variable > assignments, which would be include'd by extension makefiles. There > are a lot of problems to be solved with this idea too, of course: > what do you do to make it play in non-make-based build systems? And > where would this file live? The lack of a PATH mechanism makes it > far harder for would-be users to find the file. Still, maybe we could > make something out of that approach. As Peter said in the Debian bug I was citing, people should actually be using pkg-config. I agree with that, but we don't even have a .pc interface yet for retrieving server variables, and until that or the pgxs-as-Makefile idea (which is nice too) are implemented, pg_config will still be used for years in existing code out there. Christoph -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs