From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Wouter Bijlsma" Newsgroups: gmane.lisp.guile.bugs Subject: bug#73582: guile-3.0 build system adding unnecessary pkg-config & guile-config compile flags Date: Mon, 30 Sep 2024 21:43:27 +0200 Message-ID: <89ad74f1-eaff-44fa-83f3-151404e19053@app.fastmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=9b52f2b89d9b4b899e3168551a8bd327 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22114"; mail-complaints-to="usenet@ciao.gmane.io" To: 73582@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Tue Oct 01 17:55:36 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1svfDs-0005bA-58 for guile-bugs@m.gmane-mx.org; Tue, 01 Oct 2024 17:55:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svfDa-0005Jo-6H; Tue, 01 Oct 2024 11:55:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svfDM-00059m-6k for bug-guile@gnu.org; Tue, 01 Oct 2024 11:55:08 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svfDL-0000Sy-US for bug-guile@gnu.org; Tue, 01 Oct 2024 11:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:Date:MIME-Version:To:Subject; bh=skwhtqV12ahvfAn44s9rWtxFqi0kzthGxDwGCHQhdXU=; b=K5Kl8VkYtwits9nrL5g+ceXa+XtWRkbEyPqLHiw4rBg05ZDNBZr4OnCIE7vZ/gMacN2FiFMC8MSg9yV++XqfyIUmk4ixOwgW984iyO96PvpZ6XJfteVZI9EHs2ddvFJzue3AEIzagPpdR3tVHZbxZhOkResbpQ32mhi/YdP+oCkyCf4tlm2crNOnbDS0vdqz/kh9tcKAUO++57B5te9RjxBHdMsSfh8Yp+ZIPh11FdXreQWReHhlKgd7NfLdYzcpgoHa552knZezBsnsEZCbGPSeROMuvUtzu5QUPXWc3yD4e0+kYNpuEakp06V8r08cUyiaBm7yI8mgHYWGWb9rtA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svfDL-0006IA-4L for bug-guile@gnu.org; Tue, 01 Oct 2024 11:55:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Wouter Bijlsma" Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 01 Oct 2024 15:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73582 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172779808524097 (code B ref -1); Tue, 01 Oct 2024 15:55:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Oct 2024 15:54:45 +0000 Original-Received: from localhost ([127.0.0.1]:52230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svfD2-0006GV-Jy for submit@debbugs.gnu.org; Tue, 01 Oct 2024 11:54:45 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svMJn-0003rq-1w for submit@debbugs.gnu.org; Mon, 30 Sep 2024 15:44:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svMJF-0003LN-G7 for bug-guile@gnu.org; Mon, 30 Sep 2024 15:43:53 -0400 Original-Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svMJD-00027L-6u for bug-guile@gnu.org; Mon, 30 Sep 2024 15:43:53 -0400 Original-Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 8E2D91380509 for ; Mon, 30 Sep 2024 15:43:48 -0400 (EDT) Original-Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-10.internal (MEProxy); Mon, 30 Sep 2024 15:43:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= wouterbijlsma.nl; h=cc:content-type:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1727725428; x=1727811828; bh=skwhtqV12a hvfAn44s9rWtxFqi0kzthGxDwGCHQhdXU=; b=QBqBWQoE7wqolZbiTEtHGvyGQY HiQVcfB/T27QuRcDVeetbNiPMGJ/OTiuLG3oPAxrS00pf95JOQcIAi8VdeVtLiEH jnNz+x5R2moBEr0WKUZeRjwTveNe1kGjb7mYJyCsdZuI/Q87kEOBHkk96fsb+4iA nJxdwtaW+TlxXHwS59PXLDRKuZMfcysKnpiB03HoYEPfziI1FORfrkoHovLRK+RL vLe8YPoS+nkCL8n+EVvyNfht34GOCDZOg2nbV3kFsfYJrbZSifDpxzvBoBU046yA WXP9BS5aqX4iECl40MLpE+iqpfBl9z99wyCORrFlJZwYRiQRsqxxbhE5miFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1727725428; x=1727811828; bh=skwhtqV12ahvfAn44s9rWtxFqi0kzthGxDw GCHQhdXU=; b=WO/vGvV+pVOXkQWJGI4i4Vg1mbE/T1Iz4qB3gWjutJe031bCDtY M5u0r4luEAlzmZOOpukP/1NEbn1DFaxAqQ4porz9Q/nO/JXi6FAhVNliNI4Bk1ca NwV1tfKGcqyGjPwfGsQu+6lERuQUpncchCkfr4PgwKidQmFMMOb3kwPhNTN43TBB TQWPB6J3qX57lmrebGsbV5fNjk4fCCOOle+mu27DnQIHpFWvT37M0KMtJ2EJ2rpB urMllQbeXIwO0gfSj3Mb/GCrrypmMyTzMN75eKdtbvr1wF6y0TjxUA9lZilDV2HN FdhiEWh2h7CRviHzmUQKPX1wBcyLcmKrp0w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduhedgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggff fhvffkufgtsegrtderreertddtnecuhfhrohhmpedfhghouhhtvghruceuihhjlhhsmhgr fdcuoeifohhuthgvrhesfihouhhtvghrsghijhhlshhmrgdrnhhlqeenucggtffrrghtth gvrhhnpeeivdfhffehgeeufeetgeeiudduudegfeffueejfffgjefftedthefgudeihffh tdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeifoh huthgvrhesfihouhhtvghrsghijhhlshhmrgdrnhhlpdhnsggprhgtphhtthhopedupdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhgqdhguhhilhgvsehgnhhurdhorh hg X-ME-Proxy: Feedback-ID: ib07144fb:Fastmail Original-Received: by mailuser.phl.internal (Postfix, from userid 501) id 4DE8D3020080; Mon, 30 Sep 2024 15:43:48 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=103.168.172.144; envelope-from=wouter@wouterbijlsma.nl; helo=fout-a1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 01 Oct 2024 11:54:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11000 Archived-At: --9b52f2b89d9b4b899e3168551a8bd327 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello, I believe I may have found a bug in the guile 3.0 build system. When configuring and building on systems that have libgmp installed, the guile build system will add '-I$LIBGMP_PREFIX' to the set of compiler flags reported by 'pkg-config --cflags guile-3.0' (and hence also 'guile-config compile'). At least on my configuration (Arch Linux), the value of $LIBGMP_PREFIX is (predictably) '/usr', which results in '-I/usr' being added to the GUILE_CFLAGS in the 'configure' script, which will subsequently be substituted for @GUILE_CFLAGS@ to generate the meta/guile-3.0.pc pkg-config script that will be installed along with guile. The net result is that any project that uses pkg-config to find guile (e.g. from CMake) will implicitly add -I/usr to its own compiler flags, which is not just unnecessary but also causes IDE's that use the compiler flags to find include directories to index, to recursively have to index everything in /usr (which is a lot). I cannot imagine a prefix path to be intentionally added as an include path, and simply removing it does not break anything (not building guile itself, nor building projects that depend on it), so I assume this is a bug? The code that adds $LIBGMP_PREFIX to the $GUILE_CFLAGS is in the 'configure.ac' script, which defines the GMP checking code, to end up in the configure script. As mentioned, if I simply remove it from the configure script, guile compiles fine, and projects that use the generated pkg-config also build without issue. All this is using the latest guile 3.0.10 tarball by the way. Regards, -Wouter --9b52f2b89d9b4b899e3168551a8bd327 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
Hello,

I believe I may have found a bug in the guile 3.0 b= uild system.

When configuring and building = on systems that have libgmp installed, the guile build system will add '= -I$LIBGMP_PREFIX' to the set of compiler flags reported by 'pkg-config -= -cflags guile-3.0' (and hence also 'guile-config compile'). At least on = my configuration (Arch Linux), the value of $LIBGMP_PREFIX is (predictab= ly) '/usr', which results in '-I/usr' being added to the GUILE_CFLAGS in= the 'configure' script, which will subsequently be substituted for @GUI= LE_CFLAGS@ to generate the meta/guile-3.0.pc pkg-config script that will= be installed along with guile.

The net re= sult is that any project that uses pkg-config to find guile (e.g. from C= Make) will implicitly add -I/usr to its own compiler flags, which is not= just unnecessary but also causes IDE's that use the compiler flags to f= ind include directories to index, to recursively have to index everythin= g in /usr (which is a lot).

I cannot imagin= e a prefix path to be intentionally added as an include path, and simply= removing it does not break anything (not building guile itself, nor bui= lding projects that depend on it), so I assume this is a bug?
<= div>
The code that adds $LIBGMP_PREFIX to the $GUILE_CFLAG= S is in the 'configure.ac' script, which defines the GMP checking code, = to end up in the configure script. As mentioned, if I simply remove it f= rom the configure script, guile compiles fine, and projects that use the= generated pkg-config also build without issue.

All th= is is using the latest guile 3.0.10 tarball by the way.

Regards,
-Wouter
--9b52f2b89d9b4b899e3168551a8bd327--