From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Bash headers path changed in 4.4 (core-updates) Date: Mon, 17 Oct 2016 15:28:14 +0200 Message-ID: <87d1izayvl.fsf@gnu.org> References: <20161016005500.GA18526@jasmine> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw7xq-0006IN-7i for guix-devel@gnu.org; Mon, 17 Oct 2016 09:28:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw7xn-0004YP-48 for guix-devel@gnu.org; Mon, 17 Oct 2016 09:28:26 -0400 In-Reply-To: <20161016005500.GA18526@jasmine> (Leo Famulari's message of "Sat, 15 Oct 2016 20:55:00 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Leo Famulari skribis: > While looking at the build failure of recutils on core-updates [0], I > noticed that the directory structure of bash:include changed from 4.3 to > 4.4. > > Using stdc.h as an example, For 4.3, our package creates a tree like this: > ./include/bash/stdc.h > > For 4.4, it's like this: > ./include/bash/include/stdc.h Note that there=E2=80=99s also include/bash/*.h. > Is this intentional? Sort of. It used to be that Bash did not install its headers by itself, so we had a phase to do that, roughly following what Debian did. With 4.4, the headers are officially installed (there=E2=80=99s even a .pc file), so I removed that phase and let =E2=80=98make install=E2=80=99 do it= s thing. =E2=80=98bash.pc=E2=80=99 contains this: --8<---------------cut here---------------start------------->8--- headersdir=3D${includedir}/bash [...] Cflags: ${SHOBJ_CFLAGS} ${CCFLAGS} -I${headersdir} -I${headersdir}/builtins= -I${headersdir}/include --8<---------------cut here---------------end--------------->8--- so everything should work fine for packages that use bash.pc. However, there are currently zero packages using bash.pc because that file is brand new, so we=E2=80=99ll have to manually adjust them for now. I believe this patch should work, though I haven=E2=80=99t yet been able to rebuild recutils: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index b7bd1f0..8262101 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -405,7 +405,19 @@ pictures, sounds, or video.") #:configure-flags (list (string-append "--with-bash-headers=" (assoc-ref %build-inputs "bash:include") - "/include/bash")))) + "/include/bash")) + + #:phases (modify-phases %standard-phases + (add-before 'build 'set-bash4.4-header-location + (lambda _ + ;; Adjust the header search path for Bash 4.4 + ;; in accordance with 'bash.pc'. + (substitute* "bash/Makefile.in" + (("AM_CPPFLAGS = (.*)$" _ rest) + (string-append "AM_CPPFLAGS = " rest + " -I$(BASH_HEADERS)/include" + "\n"))) + #t))))) (native-inputs `(("emacs" ,emacs-minimal) ("bc" ,bc) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable How does that sound? Thanks, Ludo=E2=80=99. --=-=-=--