all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Mark H Weaver <mhw@netris.org>, Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: heads-up: Haskell updates
Date: Thu, 15 Feb 2018 12:04:04 +0100	[thread overview]
Message-ID: <20180215120404.0a96b628@scratchpost.org> (raw)
In-Reply-To: <87a7waodaa.fsf@netris.org>

Hi Mark,
Hi Ricardo,

On Thu, 15 Feb 2018 03:41:33 -0500
Mark H Weaver <mhw@netris.org> wrote:

> Given that it's using #ifdef to detect this, I'd expect the result to
> depend only on the _headers_ being used to compile, and not the actual
> kernel running the build.

Yes, that's precisely the problem.

* The [glibc or kernel] headers determine whether the ghc compilation detects it
* The Linux kernel determines whether the functionality is actually present at
runtime when any ghc program (like ghc-pkg) runs.

Linus takes backward compatibility seriously - the constants
or functionality are not going to vanish from Linux later.

So the only problematic case is that the build process finds MADV_FREE
but the running Linux doesn't yet have it and a ghc program runs on it.

Reading MADV_DONTNEED docs again, MADV_DONTNEED pretty much does the same
as MADV_FREE - but MADV_DONTNEED promises to make later accesses to the
range succeed (by providing a new zero-filled page if necessary) while
MADV_FREE promises to make them fail.

So one could fall back to MADV_DONTNEED - should be fine, though a little weird
for an allocator.

If that's the case and the build still fails, let's just apply the Haskell patch
to ghc (or update ghc if there's a newer release).

> why it works for Ricardo but not for Andreas and Hydra.

At runtime it depends on the Linux kernel version present whether
the deallocation will work or not.

So I suspect that Ricardo has a Linux >= 4.5 but Andreas and Hydra
have a Linux < 4.5.  Is that correct?

Ricardo, you said you built on master - but in master's glibc the situation
is the same:

~/x/glibc-2.25$ grep -r MADV_FREE bits
./bits/mman-linux.h:# define MADV_FREE    8     /* Free pages only if memory pressure.  */

Still would fail for Linux < 4.5.

> Note that on our 'master' branch we are using Linux-libre-4.4 kernel
> headers, but on 'core-updates' we're using 4.9 kernel headers.
[...]
> I suppose if one reads the error message literally:
> 
>   Control/Monad/Trans/Resource/Internal.hs:302:10: error:
>       • Could not deduce (MonadBase IO (Strict.StateT s m))
>           arising from the superclasses of an instance declaration
>         from the context: MonadResource m
>           bound by the instance declaration
>           at Control/Monad/Trans/Resource/Internal.hs:302:10-63
>       • In the instance declaration for
>           ‘MonadResource (Strict.StateT s m)’

I think it just didn't update one of the packages or the package database
and now it got the wrong version where someone changed the type signature
on one side and the other side is stale.

  parent reply	other threads:[~2018-02-15 11:04 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 12:48 heads-up: Haskell updates Ricardo Wurmus
2018-02-14 14:20 ` Ludovic Courtès
2018-02-14 16:46   ` Ricardo Wurmus
2018-02-14 18:46 ` Mark H Weaver
2018-02-14 19:19   ` Ricardo Wurmus
2018-02-14 19:39     ` Ricardo Wurmus
2018-02-14 19:44       ` Ricardo Wurmus
2018-02-14 21:23       ` Mark H Weaver
2018-02-14 21:39         ` Andreas Enge
2018-02-14 22:42           ` Ricardo Wurmus
2018-02-14 22:47       ` Danny Milosavljevic
2018-02-15  8:41         ` Mark H Weaver
2018-02-15  9:17           ` Ricardo Wurmus
2018-02-15 10:38             ` Mark H Weaver
2018-02-15 14:02             ` Timothy Sample
2018-02-15 15:05               ` Ricardo Wurmus
2018-02-17 12:50               ` Ricardo Wurmus
2018-02-17 13:04                 ` Ricardo Wurmus
2018-02-17 15:18                   ` Andreas Enge
2018-02-17 16:11                     ` Ricardo Wurmus
2018-02-17 20:00                       ` Mark H Weaver
2018-02-17 20:24                         ` core-updates, last call? Leo Famulari
2018-02-17 23:16                           ` Ricardo Wurmus
2018-02-18 21:45                             ` Pjotr Prins
2018-02-18 22:44                               ` Ricardo Wurmus
2018-02-18 20:42                       ` heads-up: Haskell updates Chris Marusich
2018-02-15 10:29           ` Mark H Weaver
2018-02-15 11:04           ` Danny Milosavljevic [this message]
2018-02-15 11:08             ` Danny Milosavljevic
2018-02-15 11:12             ` Andreas Enge
2018-02-15 15:44             ` Ricardo Wurmus
2018-02-15 17:03               ` Danny Milosavljevic
2018-02-15 17:46                 ` Leo Famulari
2018-02-15 18:12                 ` Mark H Weaver
2018-02-16 15:26                 ` Danny Milosavljevic
2018-02-16 16:31                   ` Marius Bakke
2018-02-16 17:43                     ` Ricardo Wurmus
2018-02-16 18:12                       ` Marius Bakke
2018-02-16 18:29                         ` Leo Famulari
2018-02-16 22:14                           ` Mark H Weaver
2018-02-16 18:15                       ` Mark H Weaver
2018-02-17  0:33                         ` Ricardo Wurmus
2018-02-17 12:11                       ` Oleg Pykhalov
2018-02-17 12:18                         ` Ricardo Wurmus
2018-02-17 12:55                           ` Oleg Pykhalov
2018-02-17 13:00                             ` Ricardo Wurmus
2018-02-17 13:38                               ` Timothy Sample
2018-02-17 14:42                                 ` Ricardo Wurmus
2018-02-17 16:04                                   ` Timothy Sample
2018-02-17 23:22                                     ` Ricardo Wurmus
2018-02-17 15:51                               ` Oleg Pykhalov
2018-02-17 19:48               ` Mark H Weaver
2018-02-17 19:54             ` Mark H Weaver
2018-02-17 21:51               ` Danny Milosavljevic
2018-02-17 22:32                 ` Timothy Sample

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180215120404.0a96b628@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=mhw@netris.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.