unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Run ./nix/sync-with-upstream after pull!
@ 2013-12-18 23:06 Ludovic Courtès
  2013-12-18 23:31 ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2013-12-18 23:06 UTC (permalink / raw)
  To: guix-devel

Hi!

After pulling commit 0c5028f, you’ll should get an error like this when
building:

--8<---------------cut here---------------start------------->8---
nix/libutil/hash.cc:244:13: error: member ‘guix_hash_context nix::Ctx::md5’ with constructor not allowed in union
     MD5_CTX md5;
             ^
nix/libutil/hash.cc:244:13: note: unrestricted unions only available with -std=c++11 or -std=gnu++11
--8<---------------cut here---------------end--------------->8---

Make sure to run ./nix/sync-with-upstream to fix that (this script has
an additional patch rule to fix that.)

Thanks,
Ludo’.

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

* Re: Run ./nix/sync-with-upstream after pull!
  2013-12-18 23:06 Run ./nix/sync-with-upstream after pull! Ludovic Courtès
@ 2013-12-18 23:31 ` Andreas Enge
  2013-12-18 23:43   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2013-12-18 23:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Thu, Dec 19, 2013 at 12:06:49AM +0100, Ludovic Courtès wrote:
> Make sure to run ./nix/sync-with-upstream to fix that (this script has
> an additional patch rule to fix that.)

When doing this, I get:

sync-with-upstream: `..' is not the valid top-level source directory


When I do "cd nix; ./sync-with-upstream", I get:

(lots of messages)
`./libstore/pathlocks.hh' -> `../../nix/./libstore/pathlocks.hh'
removed `../nix/libstore/schema.sql.hh'
`../nix-upstream/COPYING' -> `../nix/COPYING'
`../nix-upstream/AUTHORS' -> `../nix/AUTHORS'
sed: can't read ../nix/libutil/hash.{cc,hh}: No such file or directory

The files ../nix/libutil/hash.cc and ../nix/libutil/hash.hh exist, but
apparently the command looks for a single file with { and } in its name.

The following modification solves the problem:
diff --git a/nix/sync-with-upstream b/nix/sync-with-upstream
index bb3a68b..dc7a7e3 100755
--- a/nix/sync-with-upstream
+++ b/nix/sync-with-upstream
@@ -76,5 +76,7 @@ sed -i "$top_srcdir/nix/libstore/gc.cc"                               
 # context is expected to truly copy the underlying hash context.  The copy
 # constructor cannot be used in 'Ctx' if that's a union, so turn it into a
 # structure (we can afford to two wasted words.)
-sed -i "$top_srcdir/nix/libutil/hash".{cc,hh}  \
+sed -i "$top_srcdir/nix/libutil/hash".cc       \
+    -e 's|union Ctx|struct Ctx|g'
+sed -i "$top_srcdir/nix/libutil/hash".hh       \
     -e 's|union Ctx|struct Ctx|g'

Andreas

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

* Re: Run ./nix/sync-with-upstream after pull!
  2013-12-18 23:31 ` Andreas Enge
@ 2013-12-18 23:43   ` Ludovic Courtès
  2013-12-18 23:53     ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2013-12-18 23:43 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> skribis:

> On Thu, Dec 19, 2013 at 12:06:49AM +0100, Ludovic Courtès wrote:
>> Make sure to run ./nix/sync-with-upstream to fix that (this script has
>> an additional patch rule to fix that.)
>
> When doing this, I get:
>
> sync-with-upstream: `..' is not the valid top-level source directory
>
>
> When I do "cd nix; ./sync-with-upstream",

Right, that’s actually the right command.  :-)

> I get:
>
> (lots of messages)
> `./libstore/pathlocks.hh' -> `../../nix/./libstore/pathlocks.hh'
> removed `../nix/libstore/schema.sql.hh'
> `../nix-upstream/COPYING' -> `../nix/COPYING'
> `../nix-upstream/AUTHORS' -> `../nix/AUTHORS'
> sed: can't read ../nix/libutil/hash.{cc,hh}: No such file or directory
>
> The files ../nix/libutil/hash.cc and ../nix/libutil/hash.hh exist, but
> apparently the command looks for a single file with { and } in its name.

What does ‘/bin/sh --version’ report?  I bet it’s dash instead of Bash.

> The following modification solves the problem:
> diff --git a/nix/sync-with-upstream b/nix/sync-with-upstream
> index bb3a68b..dc7a7e3 100755
> --- a/nix/sync-with-upstream
> +++ b/nix/sync-with-upstream
> @@ -76,5 +76,7 @@ sed -i "$top_srcdir/nix/libstore/gc.cc"                               
>  # context is expected to truly copy the underlying hash context.  The copy
>  # constructor cannot be used in 'Ctx' if that's a union, so turn it into a
>  # structure (we can afford to two wasted words.)
> -sed -i "$top_srcdir/nix/libutil/hash".{cc,hh}  \
> +sed -i "$top_srcdir/nix/libutil/hash".cc       \
> +    -e 's|union Ctx|struct Ctx|g'
> +sed -i "$top_srcdir/nix/libutil/hash".hh       \
>      -e 's|union Ctx|struct Ctx|g'

I’ve applied something similar.

Thanks,
Ludo’.

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

* Re: Run ./nix/sync-with-upstream after pull!
  2013-12-18 23:43   ` Ludovic Courtès
@ 2013-12-18 23:53     ` Andreas Enge
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Enge @ 2013-12-18 23:53 UTC (permalink / raw)
  To: Ludovic Courtès

On Thu, Dec 19, 2013 at 12:43:25AM +0100, Ludovic Courtès wrote:
> What does ‘/bin/sh --version’ report?  I bet it’s dash instead of Bash.

"Illegal option --"  ;-)

But I confirm it is dash in debian. And that your fix works.

Andreas

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

end of thread, other threads:[~2013-12-19 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18 23:06 Run ./nix/sync-with-upstream after pull! Ludovic Courtès
2013-12-18 23:31 ` Andreas Enge
2013-12-18 23:43   ` Ludovic Courtès
2013-12-18 23:53     ` Andreas Enge

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).