From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Retrieving the "include" directory for Emacs Modules Date: Sun, 08 Dec 2024 18:30:45 +0200 Message-ID: <86h67ef87e.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23261"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 08 17:32:01 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1tKKCO-0005vE-Tj for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 08 Dec 2024 17:32:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKKBx-0003EL-Kn; Sun, 08 Dec 2024 11:31:33 -0500 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 1tKKBs-0003B8-IC for help-gnu-emacs@gnu.org; Sun, 08 Dec 2024 11:31:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKKBs-0001Ak-AM for help-gnu-emacs@gnu.org; Sun, 08 Dec 2024 11:31:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=epvDPc1oofZq1RbZqiWcCp/ulEmhbYF5YMT0Or5VOfU=; b=SAXv2IA946xX Sxk5BCOsMgUJUwG4JcdUpOmmxnT3C4EIdNvSNNd/r0IGX2u4LSNasPX+6d4gxR7hVAkYftp852TCI rYU4IPfFjG059HbLTUouYNQkpRSMwPaNtad4uqNupHUpGDRgmRhtR62IeCndQIlXI/9qeBX9b3o2e yEBsOHn9aqClKee4Va6HMdRy/RqTKp23hmXwSEOWMXdpPFK4dO3LzqN+feCbqLXI/EAPoz0zoTF3J QV86FjlC4RuQWNfk63HjG1tFnpLvy6iv6MJiNpP+zQhpaqkFttPvCQMhXHbQbibthDSyYaNmnM/Ag ubQX/Ig+jmcEaWuVlfWSlw==; In-Reply-To: (message from Marco Antoniotti on Sun, 8 Dec 2024 16:18:15 +0100) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148694 Archived-At: > From: Marco Antoniotti > Date: Sun, 8 Dec 2024 16:18:15 +0100 > > sorry again: the behavior on Mac and Windows is different w.r.t. > data-directory (see previous message). I can try on a Linux machine > tomorrow. Note that I installed Emacs with brew on my Mac > > Case in point: if I try to install 'pq' from the package manager I get the > following error. > > gcc -I/Users/marcoxa/.emacs.d/elpa/pq-0.2 -I -I/usr/share/emacs/29.4 > -I/usr/local/include/postgresql@14 -std=gnu99 -ggdb3 -Wall -fPIC -c > pq-core.c > > pq-core.c:19:10: fatal error: 'emacs-module.h' file not found > 19 | #include > | ^~~~~~~~~~~~~~~~ > 1 error generated. > make: *** [pq-core.o] Error 1 > > which is not surprising as the include directory is not listed in the -I > options. It shouldn't be: if the compiler cannot find emacs-module.h, then your Emacs is installed incorrectly. The installation should put emacs-module.h where the compiler looks for include files. > Of course, I can muck around and ensure that the C_INCLUDE_PATH has the > right things in it, but the issue, as is, IMHO remains. You shouldn't need to mess with C_INCLUDE_PATH, because emacs-module.h is supposed to be in the C include path to begin with. > Having said that, another reason for needing a reliable > include-directory variable, > is to query Emacs in batch mode (I know: iti is expensive), to run a build > system outside Emacs for testing. Sorry, I don't understand that: what do you mean by "to run a build system"?