Re: compiling skalibs-1.4.1

From: Laurent Bercot <>
Date: Sat, 12 Oct 2013 22:54:30 +0100

On 12/10/2013 22:05, Jorge Almeida wrote:

> I'm really confused: I have
> (i) a TAI-10 system clock, AND
> (ii) a right timezone

  Ah, sorry, I misunderstood. So you have the right/ zones, and I guess
your TZ is configured to use them ?

  Then I'm not sure. Everything you dietcompile will choke on your TZ,
but lying to skalibs about your timezone is really dirty and won't work
in your case.

I think your best bet is to try and make skalibs work with musl: I
managed to do it and you're quite close. musl will correctly interpret,
for instance, "TZ=:right/Europe/Lisbon".

> An emergency is when I need all the help I can get, in particular a
> shell with history and tab completion, and colors. ash just doesn't cut
> it.

  I understand.

>> Does the problem go away if you compile with -D_POSIX_SOURCE ? That
>> could be an easy workaround.
> Nope.

  The <time.h> header in musl contains this piece of code:

#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
  || defined(_BSD_SOURCE)
#define __NEED_struct_timespec
#define __NEED_clockid_t
#define __NEED_timer_t
#define __NEED_pid_t
#define __NEED_locale_t

#include <bits/alltypes.h>

  and <bits/alltypes.h> defines struct timespec iff __NEED_struct_timespec
is defined. Also, later on, under the same conditions, CLOCK_REALTIME
gets defined.
  (I'm looking at musl-0.9.14 btw.)
  So it definitely should be working here; I'm suspecting that something in
your gcc specs, or flags, or whatever happens before the header inclusion,
is removing all the needed _FOOBAR_SOURCE.

  Can you browse your musl headers to try and find what's wrong ? In particular
look at the <features.h> header; also experiment with musl-gcc -v to see the
exact compilation lines. I can't help you much right now, because I don't have
access to a native musl system, and I'm off and on tonight. All I can say is
Works For Me (tm), which isn't helpful.

  Also, until I release the new execline version, changing the
     if (argc1 + 1 == argc) df = 0 ;
line in pipeline.c, replacing it with
     if (argc1 + 1 == argc) strerr_dief1x(100, "empty remainder") ;
will fix the bug.
  (I was trying to be smart and allow empty remainders, optimizing away a
potential doublefork in that case, which makes sense in foreground; but
it does not make sense in pipeline.)

  Good luck,

Received on Sat Oct 12 2013 - 21:54:30 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC