all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bash headers path changed in 4.4 (core-updates)
@ 2016-10-16  0:55 Leo Famulari
  2016-10-17 13:28 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2016-10-16  0:55 UTC (permalink / raw)
  To: guix-devel

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

Is this intentional?

[0]
https://hydra.gnu.org/build/1538148/log/tail-reload

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bash headers path changed in 4.4 (core-updates)
  2016-10-16  0:55 Bash headers path changed in 4.4 (core-updates) Leo Famulari
@ 2016-10-17 13:28 ` Ludovic Courtès
  2016-10-17 20:07   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-10-17 13:28 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

Leo Famulari <leo@famulari.name> 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’s 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’s even a .pc
file), so I removed that phase and let ‘make install’ do its thing.

‘bash.pc’ contains this:

--8<---------------cut here---------------start------------->8---
headersdir=${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’ll have to manually adjust them for now.

I believe this patch should work, though I haven’t yet been able to
rebuild recutils:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1301 bytes --]

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)

[-- Attachment #3: Type: text/plain, Size: 45 bytes --]


How does that sound?

Thanks,
Ludo’.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Bash headers path changed in 4.4 (core-updates)
  2016-10-17 13:28 ` Ludovic Courtès
@ 2016-10-17 20:07   ` Ludovic Courtès
  2016-10-17 21:16     ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-10-17 20:07 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

ludo@gnu.org (Ludovic Courtès) skribis:

> I believe this patch should work, though I haven’t yet been able to
> rebuild recutils:

I pushed a variant of it as c21af659b4e6871b9576278cd5745881c696fd70.

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bash headers path changed in 4.4 (core-updates)
  2016-10-17 20:07   ` Ludovic Courtès
@ 2016-10-17 21:16     ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2016-10-17 21:16 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Mon, Oct 17, 2016 at 10:07:52PM +0200, Ludovic Courtès wrote:
> ludo@gnu.org (Ludovic Courtès) skribis:
> 
> > I believe this patch should work, though I haven’t yet been able to
> > rebuild recutils:
> 
> I pushed a variant of it as c21af659b4e6871b9576278cd5745881c696fd70.

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-17 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-16  0:55 Bash headers path changed in 4.4 (core-updates) Leo Famulari
2016-10-17 13:28 ` Ludovic Courtès
2016-10-17 20:07   ` Ludovic Courtès
2016-10-17 21:16     ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.