
Hi, my binary distribution http://www.haskell.org/ghc/dist/6.8.2/maeder/ghc-6.8.2-i386-unknown-linux.ta... creates binaries that fail on some i386 linux boxes with: timer_create: Invalid argument I've built the distribution with gcc version 4.1.2 20061115 (prerelease) (SUSE Linux) and the file lib/ghc-6.8.2/include/ghcautoconf.h contains: #define HAVE_TIMER_CREATE 1 The failing machine uses gcc version 3.3.5 and ./configure within the ghc-6.8.2 sources says: checking for a working timer_create(CLOCK_REALTIME)... no Take this as a warning when using my binary-dist above (or when building your own). Or is there a work around (apart from creating a new binary-dist using ghc-6.6.1)? Cheers Christian

Hi Christian, On Thu, Mar 06, 2008 at 05:59:50PM +0100, Christian Maeder wrote:
#define HAVE_TIMER_CREATE 1
Or is there a work around (apart from creating a new binary-dist using ghc-6.6.1)?
I don't think using ghc 6.6.1 will make a difference. However, if you alter mk/config.h after running configure, so that it thinks it doesn't have timer_create, then you should get a bindist that works on older machines. I'm not sure why we have both HAVE_TIMER_CREATE and USE_TIMER_CREATE. Thanks Ian

Ian Lynagh wrote:
Hi Christian,
On Thu, Mar 06, 2008 at 05:59:50PM +0100, Christian Maeder wrote:
#define HAVE_TIMER_CREATE 1
Or is there a work around (apart from creating a new binary-dist using ghc-6.6.1)?
I don't think using ghc 6.6.1 will make a difference.
At least our ghc-6.6.1 binary-dist works better, maybe because it was built with an older gcc.
However, if you alter mk/config.h after running configure, so that it thinks it doesn't have timer_create, then you should get a bindist that works on older machines.
ok, thanks.
I'm not sure why we have both HAVE_TIMER_CREATE and USE_TIMER_CREATE.
I'd like to know, too. Christian

Christian Maeder wrote:
Ian Lynagh wrote:
I'm not sure why we have both HAVE_TIMER_CREATE and USE_TIMER_CREATE.
I'd like to know, too.
It's because the configure script checks for more than just the existence of timer_create() (HAVE_TIMER_CREATE), it checks that it works well enough to use (USE_TIMER_CREATE). Historical versions of Linux had broken implementations of timer_create() that we need to avoid. Unfortunately this means that taking a GHC binary built on a newer Linux will not work on an older version. timer_create() is needed so that we can avoid needing to use the SIGALRM signal, which interferes with other things (there are previous tickets on this, a search for SIGALRM should turn them up). Cheers, Simon

Simon Marlow wrote:
Unfortunately this means that taking a GHC binary built on a newer Linux will not work on an older version.
Do you know by chance which linux library (or rpm package) needs to be updated (if I run such an old version)?
timer_create() is needed so that we can avoid needing to use the SIGALRM signal, which interferes with other things (there are previous tickets on this, a search for SIGALRM should turn them up).
Yes, Thanks Christian

Christian Maeder wrote:
Simon Marlow wrote:
Unfortunately this means that taking a GHC binary built on a newer Linux will not work on an older version.
Do you know by chance which linux library (or rpm package) needs to be updated (if I run such an old version)?
It seems to be glibc. Can this one be easily updated? Christian

On Fri, 2008-03-14 at 18:30 +0100, Christian Maeder wrote:
Christian Maeder wrote:
Simon Marlow wrote:
Unfortunately this means that taking a GHC binary built on a newer Linux will not work on an older version.
Do you know by chance which linux library (or rpm package) needs to be updated (if I run such an old version)?
It seems to be glibc. Can this one be easily updated?
Generally no. Every single application depends on glibc. On most binary distros upgrading glibc requires upgrading everything else (at least between major versions that add new features). Duncan
participants (4)
-
Christian Maeder
-
Duncan Coutts
-
Ian Lynagh
-
Simon Marlow